Skip to content

Commit

Permalink
修正监控文字只能选择列表的问题(改回单项)
Browse files Browse the repository at this point in the history
  • Loading branch information
easychen committed May 25, 2022
1 parent 8d330e6 commit 5cff734
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"20220525220007"
"2022.05.25.23.41"
Binary file renamed ckc.20220525220007.zip → ckc.2022.05.25.23.41.zip
Binary file not shown.
1 change: 1 addition & 0 deletions docker.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1653493144
4 changes: 2 additions & 2 deletions docker/api/cron.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ for( const item of to_checks )
{
const title = '监测点['+item.title+']有新通知';

let desp = check_content?.substring(0,50) + (item.last_content ? ('←' + item.last_content.substring(0,50)):"");
let desp = check_content?.substring(0,50) + (item.last_content && item.when == 'change' ? ('←' + item.last_content.substring(0,50)):"");

if( check_html )
desp += "\r\n\r\n" + to_markdown(check_html);
desp += "\r\n\r\n---\r\n\r\n" + to_markdown(check_html);

// const title = check_content.length > 50 ? '监测点['+item.title+']有新通知' : ( '监测点['+item.title+']有新通知: ' + check_content + (item.last_content ? ('←' + item.last_content):"") );

Expand Down
4 changes: 2 additions & 2 deletions docker/api/func.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ async function monitor_dom_low(url, path, delay , cookies)
html += item.outerHTML ? item.outerHTML + "<br/>" : "";
}

return {text:texts.join(" \n "),html,all};
return {text:texts[0]||"",html,all};
}

async function monitor_dom(url, path, delay , cookies)
Expand Down Expand Up @@ -259,7 +259,7 @@ async function monitor_dom(url, path, delay , cookies)
if( item.innerText ) texts.push(item.innerText?.trim());
html += item.outerHTML ? item.outerHTML + "<br/>" : "";
}
return {html,text:texts.join(" \n "),"all":window.document.documentElement.innerHTML};
return {html,text:texts[0]||"","all":window.document.documentElement.innerHTML};
},path);
const { all,html, ...ret_short } = ret;
console.log("ret",ret_short);
Expand Down
2 changes: 1 addition & 1 deletion ext.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<div class='ext-info'><center>插件最后更新于2022-05-25 22:00:44 Build 20220525220007</center></div>
<div class='ext-info'><center>插件最后更新于2022-05-25 23:42:30 Build 2022.05.25.23.41</center></div>
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<title>Check酱官网</title>
</head>
<body>
<div class='ext-info'><center>插件最后更新于2022-05-25 22:00:44 Build 20220525220007</center></div><h1>Check酱</h1>
<div class='ext-info'><center>插件最后更新于2022-05-25 23:42:30 Build 2022.05.25.23.41</center></div><h1>Check酱</h1>
<p><strong>Check酱是一个通用网页内容监控工具,可以监测网页内容变化,并发送异动到微信</strong></p>
<p><g-emoji class="g-emoji" alias="warning" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/26a0.png">⚠️</g-emoji> docker目录下的代码仅供安全核查和编译多平台镜像,采用附加条件的GPLV3授权:</p>
<ol>
Expand All @@ -19,7 +19,7 @@
</ol>
<h2>TLDR版</h2>
<ul>
<li>Chrome/Edge浏览器插件:<a href="ckc.20220525220007.zip">下载</a></li>
<li>Chrome/Edge浏览器插件:<a href="ckc.2022.05.25.23.41.zip">下载</a></li>
<li>自架版云端 Docker 命令(<code class="notranslate">API Key</code><code class="notranslate">YouRAPiK1</code>):</li>
</ul>
<div class="highlight highlight-source-shell"><pre>docker run -e API_KEY=YouRAPiK1 -e TZ=Asia/Chongqing -e ERROR_IMAGE=NORMAL -p 8088:80 -v <span class="pl-smi">$PWD</span>:/data -d ccr.ccs.tencentyun.com/ftqq/checkchan:latest</pre></div>
Expand All @@ -43,7 +43,7 @@ <h3>安装</h3>
<blockquote>
<p>目前Check酱正在内测,尚未上架Edge商店,只能通过手工方式载入</p>
</blockquote>
<p>下载<a href="ckc.20220525220007.zip">插件ZIP包</a>,解压为目录(后文称其为A)。</p>
<p>下载<a href="ckc.2022.05.25.23.41.zip">插件ZIP包</a>,解压为目录(后文称其为A)。</p>
<p>打开Edge的插件页面,打开「开发者模式」,点击「Load Unpacked」,选择上边解压得到的目录A。</p>
<p><a target="_blank" rel="noopener noreferrer" href="image/20220521140506.png"><img src="image/20220521140506.png" alt="" style="max-width: 100%;"></a></p>
<p>成功载入的话,就可以看到Check酱界面了。如果失败,通常是因为解压时多了一层目录导致的,可以试试重新选择A目录的下一级目录</p>
Expand Down

1 comment on commit 5cff734

@vercel
Copy link

@vercel vercel bot commented on 5cff734 May 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

checkchan-dist – ./

ckc.ftqq.com
checkchan-dist-git-main-morexmore.vercel.app
checkchan-dist-morexmore.vercel.app

Please sign in to comment.