diff --git a/build.txt b/build.txt index 42724f8..be7a6ff 100644 --- a/build.txt +++ b/build.txt @@ -1 +1 @@ -"20220524221642" \ No newline at end of file +"20220525011511" \ No newline at end of file diff --git a/ckc.20220524221642.zip b/ckc.20220525011511.zip similarity index 98% rename from ckc.20220524221642.zip rename to ckc.20220525011511.zip index b674447..e6c7ca3 100644 Binary files a/ckc.20220524221642.zip and b/ckc.20220525011511.zip differ diff --git a/docker/Dockerfile b/docker/Dockerfile index f9701f4..7b6b348 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -10,6 +10,7 @@ COPY SourceHanSans.ttf /usr/share/fonts/TTF/SourceHanSans.ttf # 测试时注释掉下一行 COPY api /api +RUN cd /api/ && npm install COPY init.sh /init.sh RUN chmod +x /init.sh diff --git a/docker/api/func.js b/docker/api/func.js index 1691e4d..c602956 100644 --- a/docker/api/func.js +++ b/docker/api/func.js @@ -203,7 +203,9 @@ async function monitor_dom(url, path, delay , cookies) const page = await browser.newPage(); await page.setDefaultNavigationTimeout(delay+1000*5); // await page.setDefaultNavigationTimeout(0); - await page.setCookie( ...cookies ); + if( isIterable(cookies) ) + await page.setCookie( ...cookies ); + await page.evaluateOnNewDocument(() => { HTMLVideoElement.prototype.canPlayType = function () { return 'probably' }; }); try { @@ -254,3 +256,11 @@ async function monitor_dom(url, path, delay , cookies) } } +function isIterable(obj) { + // checks for null and undefined + if (obj == null) { + return false; + } + return typeof obj[Symbol.iterator] === 'function'; + } + diff --git a/ext.html b/ext.html index 0c00680..f4bcfc8 100644 --- a/ext.html +++ b/ext.html @@ -1 +1 @@ -
插件最后更新于2022-05-24 22:17:32 Build 20220524221642
\ No newline at end of file +
插件最后更新于2022-05-25 01:15:43 Build 20220525011511
\ No newline at end of file diff --git a/index.html b/index.html index 6109b1a..b1330d7 100644 --- a/index.html +++ b/index.html @@ -9,7 +9,7 @@ Check酱官网 -
插件最后更新于2022-05-24 22:17:32 Build 20220524221642

Check酱

+
插件最后更新于2022-05-25 01:15:43 Build 20220525011511

Check酱

监测网页内容变化,并发送异动到微信

⚠️ docker目录下的代码仅供安全核查和编译多平台镜像,采用附加条件的GPLV3授权:

    @@ -19,7 +19,7 @@

TLDR版

docker run -e API_KEY=YouRAPiK1 -e TZ=Asia/Chongqing -e ERROR_IMAGE=NORMAL -p 8088:80 -v $PWD:/data -d ccr.ccs.tencentyun.com/ftqq/checkchan:latest
@@ -43,7 +43,7 @@

目前Check酱正在内测,尚未上架Edge商店,只能通过手工方式载入

-

下载插件ZIP包,解压为目录(后文称其为A)。

+

下载插件ZIP包,解压为目录(后文称其为A)。

打开Edge的插件页面,打开「开发者模式」,点击「Load Unpacked」,选择上边解压得到的目录A。

成功载入的话,就可以看到Check酱界面了。如果失败,通常是因为解压时多了一层目录导致的,可以试试重新选择A目录的下一级目录