修正正则匹配模式
@@ -12,9 +12,9 @@
|
||||
|
||||
## 最新版本
|
||||
|
||||
- 插件·Chrome/Edge:2022.08.10.01.22 [下载](ckc.zip) ([Github下载地址,无需注册](https://github.com/easychen/checkchan-dist/raw/master/ckc.zip))
|
||||
- Docker镜像(云端+远程桌面二合一):2022.08.10.00.19 [Docker Hub](https://hub.docker.com/repository/docker/easychen/checkchan)
|
||||
- 文档:2022.08.10.01.22
|
||||
- 插件·Chrome/Edge:2022.08.11.00.33 [下载](ckc.zip) ([Github下载地址,无需注册](https://github.com/easychen/checkchan-dist/raw/master/ckc.zip))
|
||||
- Docker镜像(云端+远程桌面二合一):2022.08.11.00.16 [Docker Hub](https://hub.docker.com/repository/docker/easychen/checkchan)
|
||||
- 文档:2022.08.11.00.33
|
||||
- 更新日志:[GitHub](https://github.com/easychen/checkchan-dist/commits/main)
|
||||
- 生态:RSSHub浏览器插件整合版([源码](https://github.com/easychen/RSSHub-Radar-with-checkchan) | [下载](https://github.com/easychen/RSSHub-Radar-with-checkchan/releases/download/main/1.7.0.with-checkchan.zip))
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"appTitle": {
|
||||
"message": "Check酱"
|
||||
},
|
||||
"appDesc": {
|
||||
"message": "监控页面变动,并发送异动到微信。 Build.2022.08.10.01.22",
|
||||
"description":"亦支持http status、json和rss监测。配合自架云端,关电脑后也能运行。"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"files": {
|
||||
"main.css": "/static/css/main.0e42becb.chunk.css",
|
||||
"main.js": "/static/js/main.b985a5e4.chunk.js",
|
||||
"runtime-main.js": "/static/js/runtime-main.17191aad.js",
|
||||
"static/css/2.65280f5c.chunk.css": "/static/css/2.65280f5c.chunk.css",
|
||||
"static/js/2.465e7d2f.chunk.js": "/static/js/2.465e7d2f.chunk.js",
|
||||
"index.html": "/index.html",
|
||||
"precache-manifest.0fd7de5395cfc4062a9344bfcc8632d5.js": "/precache-manifest.0fd7de5395cfc4062a9344bfcc8632d5.js",
|
||||
"service-worker.js": "/service-worker.js",
|
||||
"static/media/index.scss": "/static/media/icons-20.cef8cdbb.woff"
|
||||
},
|
||||
"entrypoints": [
|
||||
"static/js/runtime-main.17191aad.js",
|
||||
"static/css/2.65280f5c.chunk.css",
|
||||
"static/js/2.465e7d2f.chunk.js",
|
||||
"static/css/main.0e42becb.chunk.css",
|
||||
"static/js/main.b985a5e4.chunk.js"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,542 @@
|
||||
// import html2canvas from './html2canvas.esm.js';
|
||||
|
||||
|
||||
let inspector = {};
|
||||
console.log( "load bg.js" );
|
||||
// javascript-obfuscator:disable
|
||||
async function show_inspector( tabid,inspector )
|
||||
{
|
||||
inspector = new DomInspector({
|
||||
maxZIndex: 9999,
|
||||
onClick: async (path) => {
|
||||
|
||||
if( window.confirm( "选择器为"+path+",是否转向到任务添加页面?" ) )
|
||||
{
|
||||
var getFavicon = function(){
|
||||
var favicon = undefined;
|
||||
var nodeList = document.getElementsByTagName("link");
|
||||
for (var i = 0; i < nodeList.length; i++)
|
||||
{
|
||||
if((nodeList[i].getAttribute("rel") == "icon")||(nodeList[i].getAttribute("rel") == "shortcut icon"))
|
||||
{
|
||||
favicon = nodeList[i].getAttribute("href");
|
||||
}
|
||||
}
|
||||
return favicon;
|
||||
}
|
||||
|
||||
let icon_url = getFavicon() || "/favicon.ico";
|
||||
if( icon_url.substring(0,4) != 'http' )
|
||||
{
|
||||
if( icon_url.substring(0,2) == '//' )
|
||||
{
|
||||
icon_url = window.location.protocol + icon_url;
|
||||
}else
|
||||
{
|
||||
if( icon_url.substring(0,1) != '/' ) icon_url = window.origin+ '/' + icon_url;
|
||||
else icon_url = window.origin + icon_url;
|
||||
}
|
||||
}
|
||||
|
||||
const url = 'index.html#/check/add?path='+encodeURIComponent(path)+'&title='+encodeURIComponent(window.document.title)+'&url='+encodeURIComponent(window.location.href)+'&icon='+encodeURIComponent(icon_url);
|
||||
|
||||
|
||||
|
||||
// 这里是 content script 同等权限,发送消息来调整网页
|
||||
const ret = await chrome.runtime.sendMessage({action: "redirect","url":url,"tabid":tabid},);
|
||||
console.log( "ret" , ret, inspector );
|
||||
// 因为给元素注入了onclick,这里还是要reload才行
|
||||
}else
|
||||
{
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
});
|
||||
inspector.enable();
|
||||
alert("可视化选择器已初始化,请移动鼠标选择要监测的区域后点击,取消请按ESC");
|
||||
console.log( "inspector2", inspector );
|
||||
document.addEventListener('keyup',e => {
|
||||
if (e.key === "Escape") inspector.disable();
|
||||
});
|
||||
}
|
||||
|
||||
// javascript-obfuscator:disable
|
||||
async function ck_get_content( path,delay=3000, ignore_path = "",click_path = "",data_path="",scroll_down="0" )
|
||||
{
|
||||
function sleep(ms) {
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(resolve, ms);
|
||||
});
|
||||
}
|
||||
|
||||
function dom_ready(ms)
|
||||
{
|
||||
return new Promise((resolve) => {
|
||||
const handle = setInterval( ()=>{
|
||||
console.log( document.readyState );
|
||||
if( document.readyState == 'complete' )
|
||||
{
|
||||
clearInterval(handle);
|
||||
resolve(true);
|
||||
}
|
||||
} , 1000 );
|
||||
if(ms) setTimeout(resolve, ms);
|
||||
});
|
||||
}
|
||||
|
||||
async function dom_mul_select( path, ignore_path = "",click_path = "",data_path="",scroll_down="0" )
|
||||
{
|
||||
// 滚动到页面底部
|
||||
if( scroll_down && parseInt(scroll_down) > 0 )
|
||||
{
|
||||
window.scrollTo(0,document.body.scrollHeight);
|
||||
await sleep(5000);
|
||||
}
|
||||
|
||||
// 点击特定区域
|
||||
if( click_path )
|
||||
{
|
||||
const click_path_items = click_path.split(",");
|
||||
for( let item of click_path_items )
|
||||
{
|
||||
const click_item = window.document.querySelector(item);
|
||||
if( click_item )
|
||||
{
|
||||
click_item.click();
|
||||
await sleep(1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if( ignore_path )
|
||||
window.document.querySelectorAll( ignore_path ).forEach( item => item.remove() );
|
||||
|
||||
let ret = window.document.querySelectorAll(path);
|
||||
if( !ret ) return false;
|
||||
let texts = [];
|
||||
let html = "";
|
||||
for( let item of ret )
|
||||
{
|
||||
item.querySelectorAll("[src]").forEach( item => { if( item.src.substr(0,4) != 'http' ) { item.src = window.origin +( item.src.substr(0,1) == '/' ? item.src : '/'+ item.src ) } } );
|
||||
|
||||
item.querySelectorAll("[href]").forEach( item => { if( item.href.substr(0,4) != 'http' ) { item.href = window.origin +( item.href.substr(0,1) == '/' ? item.href : '/'+ item.href ) } } );
|
||||
|
||||
if( item.innerText ) texts.push(item.innerText?.trim());
|
||||
html += item.outerHTML ? item.outerHTML + "<br/>" : "";
|
||||
}
|
||||
|
||||
let data_ret = "";
|
||||
if( data_path )
|
||||
{
|
||||
const data_path_items = data_path.split(",");
|
||||
for( let item of data_path_items )
|
||||
{
|
||||
const data_items = window.document.querySelectorAll(item);
|
||||
for( let data_item of data_items ){
|
||||
if( data_item )
|
||||
{
|
||||
data_ret += data_item.outerHTML ? data_item.outerHTML+"<br/>" : "";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return {text:path.indexOf(",") >= 0 ? texts.join("\n") :texts[0]||"",html,"data":data_ret};
|
||||
}
|
||||
|
||||
// await sleep(delay);
|
||||
await dom_ready();
|
||||
if( delay > 0 ) await sleep(delay);
|
||||
const ret = await dom_mul_select(path,ignore_path,click_path,data_path,scroll_down);
|
||||
// 直接提取
|
||||
if( ret )
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
else
|
||||
{
|
||||
// 失败的话,先延迟再尝试一次
|
||||
await sleep(3000);
|
||||
const ret2 = await dom_mul_select(path,ignore_path,click_path,data_path,scroll_down);
|
||||
if( ret2 )
|
||||
{
|
||||
return ret2;
|
||||
}
|
||||
else
|
||||
{
|
||||
await sleep(3000);
|
||||
// 再来一次
|
||||
const ret3 = await dom_mul_select(path,ignore_path,click_path,data_path,scroll_down);
|
||||
if( ret3 ) return ret;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
chrome.runtime.onMessage.addListener( (request, sender, sendResponse) => {
|
||||
|
||||
// console.log("in event listender", request);
|
||||
if (request.action === "redirect")
|
||||
{
|
||||
(async () =>{
|
||||
// 必须用update,直接给属性赋值没有用
|
||||
// 如果已经打开了窗口,重用窗口
|
||||
const [tab] = await chrome.tabs.query({ title:"Check酱" });
|
||||
// 否则创建一个新的
|
||||
const current_tab = await chrome.tabs.query({ active: true, currentWindow: true });
|
||||
const tabid = request.tabid || current_tab[0].id;
|
||||
|
||||
const tab2 = await chrome.tabs.get(tabid);
|
||||
console.log(tab2);
|
||||
|
||||
const that_tab = tab || tab2;
|
||||
// 重用模式下,刷新定位窗口
|
||||
// 不用刷新了,加了esc
|
||||
// if( tab )
|
||||
// {
|
||||
// await chrome.tabs.reload(tab2.id);
|
||||
// }
|
||||
|
||||
// await chrome.tabs.update(that_tab.id, {"url":request.url+'&icon='+encodeURIComponent(that_tab.favIconUrl),"active":true});
|
||||
// 不传递favicon了
|
||||
await chrome.tabs.update(that_tab.id, {"url":request.url,"active":true});
|
||||
// 强制刷新时hash值生效
|
||||
await chrome.tabs.reload(that_tab.id);
|
||||
sendResponse({"message":"done",request});
|
||||
})();
|
||||
return true;
|
||||
}
|
||||
if (request.action === "fetch")
|
||||
{
|
||||
(async () =>{
|
||||
const tab = await chrome.tabs.create({"url":request.url,"active":false,"pinned":true});
|
||||
|
||||
// console.log("request",request);
|
||||
if( request.ua )
|
||||
{
|
||||
await attach_debugger( tab.id );
|
||||
await send_debug_command(tab.id, 'Network.setUserAgentOverride', {
|
||||
userAgent: request.ua,
|
||||
});
|
||||
// console.log("reload");
|
||||
await chrome.tabs.reload(tab.id);
|
||||
await sleep(1000);
|
||||
|
||||
}
|
||||
// console.log( tab );
|
||||
// javascript-obfuscator:disable
|
||||
const r = await chrome.scripting.executeScript(
|
||||
{
|
||||
target: {tabId: tab.id},
|
||||
function: ck_get_content,
|
||||
args: [request.path,request.delay,request.ignore_path,request.click_path,request.data_path,request.scroll_down]
|
||||
});
|
||||
// console.log( r );
|
||||
|
||||
if( request.ua ) await detach_debugger(tab.id);
|
||||
|
||||
const result = r[0]?.result;
|
||||
console.log( "result", result );
|
||||
await chrome.tabs.remove(tab.id);
|
||||
sendResponse( result );
|
||||
})();
|
||||
|
||||
return true;
|
||||
|
||||
|
||||
}
|
||||
sendResponse({});
|
||||
return true;
|
||||
});
|
||||
|
||||
chrome.action.onClicked.addListener(function(activeTab)
|
||||
{
|
||||
tab_init();
|
||||
});
|
||||
|
||||
chrome.runtime.onInstalled.addListener(function (details)
|
||||
{
|
||||
// 在安装完成事件后
|
||||
chrome.contextMenus.create({
|
||||
// "id": `checkchanSelector-${Date.now()}`,
|
||||
"id": `checkchanSelector`,
|
||||
"title": "定位监测对象",
|
||||
"contexts": ["all"]
|
||||
});
|
||||
// 只创建一次
|
||||
chrome.alarms.create('check_change',
|
||||
{
|
||||
when: Date.now(),
|
||||
periodInMinutes: 1
|
||||
});
|
||||
|
||||
// chrome.alarms.create('auto_sync',
|
||||
// {
|
||||
// when: Date.now(),
|
||||
// periodInMinutes: 10
|
||||
// });
|
||||
|
||||
chrome.alarms.create('bg_cookie_sync',
|
||||
{
|
||||
when: Date.now(),
|
||||
periodInMinutes: 61
|
||||
});
|
||||
|
||||
console.log("create alarms");
|
||||
tab_init();
|
||||
});
|
||||
|
||||
function send_debug_command(tabid, method, params = {}) {
|
||||
return new Promise((resolve) => {
|
||||
chrome.debugger.sendCommand({ tabId:tabid }, method, params, resolve);
|
||||
});
|
||||
}
|
||||
|
||||
function attach_debugger(tabId, prevTab) {
|
||||
return new Promise((resolve) => {
|
||||
if (prevTab && tabId !== prevTab)
|
||||
chrome.debugger.detach({ tabId: prevTab });
|
||||
|
||||
chrome.debugger.attach({ tabId }, '1.3', () => {
|
||||
chrome.debugger.sendCommand({ tabId }, 'Page.enable', resolve);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function detach_debugger(tabId) {
|
||||
return new Promise((resolve) => {
|
||||
chrome.debugger.detach({ tabId },resolve);
|
||||
});
|
||||
}
|
||||
|
||||
async function tab_init()
|
||||
{
|
||||
// 首先查找名为[Check酱]的tab,没有再创建新的
|
||||
const [tab] = await chrome.tabs.query({ title:"Check酱" });
|
||||
// console.log( tab );
|
||||
if( tab )
|
||||
{
|
||||
await chrome.tabs.update(tab.id, {"active":true});
|
||||
// await chrome.tabs.update(tab.id, {"highlighted":true});
|
||||
}else
|
||||
{
|
||||
await chrome.tabs.create({"url":"index.html","pinned":true});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function selector_init( tabid )
|
||||
{
|
||||
chrome.scripting.executeScript(
|
||||
{
|
||||
target: {tabId: tabid},
|
||||
// files: ['init.js']
|
||||
function: show_inspector,
|
||||
args: [tabid,inspector]
|
||||
},
|
||||
(injectionResults)=>
|
||||
{
|
||||
console.log(injectionResults);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
chrome.contextMenus.onClicked.addListener(async(e)=>{
|
||||
console.log("menu clicked", e);
|
||||
const [tab] = await chrome.tabs.query({ active: true, currentWindow: true });
|
||||
selector_init(tab.id);
|
||||
});
|
||||
|
||||
function sleep(ms) {
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(resolve, ms);
|
||||
});
|
||||
}
|
||||
|
||||
// chrome.webRequest.onBeforeSendHeaders.addListener(
|
||||
// async details =>
|
||||
// {
|
||||
// let headers = details.requestHeaders;
|
||||
// const checks = (await load_data('checks')).filter( item => item.ua );
|
||||
// if( checks.length > 0 )
|
||||
// {
|
||||
// const domains = checks.map( item => new URL(item.url).host );
|
||||
// const uas = checks.map( item => item.ua );
|
||||
// // console.log( domains, uas );
|
||||
// for (var i = 0; i < headers.length; ++i)
|
||||
// {
|
||||
// if (headers[i].name.toLowerCase() === 'user-agent')
|
||||
// {
|
||||
// const host = new URL(details.url).host;
|
||||
// if( domains.includes(host) )
|
||||
// {
|
||||
// headers[i].value = uas[domains.indexOf(host)];
|
||||
// console.log("change headers", details.url , headers[i]);
|
||||
// }
|
||||
|
||||
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// return {requestHeaders: headers};
|
||||
// },
|
||||
// {urls: ["<all_urls>"]},
|
||||
// ["requestHeaders"]
|
||||
// );
|
||||
|
||||
chrome.alarms.onAlarm.addListener( async a =>
|
||||
{
|
||||
if( a.name == 'bg_cookie_sync' )
|
||||
{
|
||||
console.log( 'bg_cookie_sync' );
|
||||
// 读取api
|
||||
const settings = await kv_load('settings');
|
||||
if( !settings._hosted_api_base ) return false;
|
||||
// 开关
|
||||
if( parseInt( settings._hosted_auto_sync||0 ) <= 0 || parseInt( settings._hosted_sync_cookie||0 ) <= 0 ) return false;
|
||||
|
||||
console.log( 'bg_cookie_sync start', parseInt( settings._hosted_auto_sync||0 ), parseInt( settings._hosted_sync_cookie||0 ) );
|
||||
|
||||
// 读取 checks
|
||||
const checks = await load_data('checks');
|
||||
|
||||
// 获取 cookie
|
||||
const cookies = parseInt( settings._hosted_sync_cookie ) > 0 ? await get_cookie_by_checks( checks ) : [];
|
||||
|
||||
// 同步 checks 和 cookies
|
||||
const form = new FormData();
|
||||
form.append( 'key',settings._hosted_api_key||"" );
|
||||
form.append( 'checks',JSON.stringify(checks) );
|
||||
form.append( 'cookies',JSON.stringify(cookies) );
|
||||
try {
|
||||
const response = await fetch( settings._hosted_api_base+'/checks/upload', {
|
||||
method: 'POST',
|
||||
body: form
|
||||
} );
|
||||
|
||||
const ret = await response.json();
|
||||
console.log( "ret", ret );
|
||||
return ret;
|
||||
|
||||
} catch (error) {
|
||||
console.log("请求服务器失败。"+error);
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
async function kv_save( data, key = 'settings' )
|
||||
{
|
||||
let kv = [];
|
||||
for( const setting of data )
|
||||
{
|
||||
kv.push({"key":setting,"value":this[setting]});
|
||||
}
|
||||
await save_data(kv, key);
|
||||
}
|
||||
|
||||
async function kv_load( key = 'settings' )
|
||||
{
|
||||
let opt = {};
|
||||
const kv = await load_data( key );
|
||||
|
||||
if( kv && Array.isArray(kv) )
|
||||
for( const item of kv )
|
||||
{
|
||||
if( item.key )
|
||||
opt[item.key] = item.value || "";
|
||||
}
|
||||
|
||||
return opt;
|
||||
}
|
||||
|
||||
async function get_cookie_by_checks( checks )
|
||||
{
|
||||
let ret_cookies = {};
|
||||
// 获取cookie
|
||||
if( chrome.cookies )
|
||||
{
|
||||
const cookies = await chrome.cookies.getAll({});
|
||||
let domains = [];
|
||||
for( const item of checks )
|
||||
{
|
||||
// console.log( "item", item );
|
||||
const domain = new URL( item.url ).host;
|
||||
if( !domains.includes( domain ) )
|
||||
domains.push( domain );
|
||||
}
|
||||
// console.log( domains );
|
||||
for( const domain of domains )
|
||||
{
|
||||
ret_cookies[domain] = [];
|
||||
for( const cookie of cookies )
|
||||
{
|
||||
// console.log( "cookie", cookie, domain, domain.indexOf(cookie.domain) );
|
||||
if( domain.indexOf(cookie.domain) >= 0 )
|
||||
{
|
||||
ret_cookies[domain].push( cookie );
|
||||
}
|
||||
}
|
||||
}
|
||||
}else
|
||||
{
|
||||
console.log("not chrome cookie...");
|
||||
}
|
||||
return ret_cookies;
|
||||
}
|
||||
|
||||
async function storage_set( key, value )
|
||||
{
|
||||
return new Promise((resolve, reject) => {
|
||||
chrome.storage.local.set( {[key]:value}, function () {
|
||||
return resolve(true);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async function storage_get( key )
|
||||
{
|
||||
return new Promise((resolve, reject) => {
|
||||
chrome.storage.local.get([key], function (result) {
|
||||
if (result[key] === undefined) {
|
||||
resolve(null);
|
||||
} else {
|
||||
resolve(result[key]);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async function load_data( key = 'checks' )
|
||||
{
|
||||
const data = chrome?.storage ? await storage_get(key) : window.localStorage.getItem( key );
|
||||
// console.log("load",key,data);
|
||||
try {
|
||||
return JSON.parse(data);
|
||||
} catch (error) {
|
||||
return data||[];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async function save_data( data, key = 'checks')
|
||||
{
|
||||
// chrome.storage.local.set({key:JSON.stringify(data)});
|
||||
const ret = chrome?.storage ? await storage_set( key, JSON.stringify(data) ) : window.localStorage.setItem( key, JSON.stringify(data) );
|
||||
return ret;
|
||||
}
|
||||
@@ -0,0 +1,225 @@
|
||||
// console.log( "bg", window.origin );
|
||||
|
||||
const host = window.location.host;
|
||||
const url = window.location.href;
|
||||
const pathname = window.location.pathname;
|
||||
const button_base_style = "position: fixed; bottom: 20px; left: 20px; z-index: 9999; background-color: #295a8a; color:white; border-radius: 5px;";
|
||||
|
||||
async function main()
|
||||
{
|
||||
await insert_content( host, url, pathname );
|
||||
}
|
||||
|
||||
main();
|
||||
|
||||
async function insert_content( host, url, pathname )
|
||||
{
|
||||
if( host === 'item.jd.com' )
|
||||
{
|
||||
const reg = /\/(\d+).html/;
|
||||
const id = Array.isArray(pathname.match(reg)) ? pathname.match(reg)[1]:null;
|
||||
console.log( "id", id );
|
||||
if( !id ) return false;
|
||||
const path = `.price.J-p-${id}`;
|
||||
jd_insert_button(path);
|
||||
}
|
||||
|
||||
if( host === 'www.amazon.cn' )
|
||||
{
|
||||
const reg = /\/dp\/(.+?)$/;
|
||||
const id = Array.isArray(pathname.match(reg)) ? pathname.match(reg)[1]:null;
|
||||
console.log( "id", id );
|
||||
if( !id ) return false;
|
||||
const path = `#corePriceDisplay_desktop_feature_div span.a-offscreen`;
|
||||
zcn_insert_button(path);
|
||||
}
|
||||
|
||||
if( host === 'weixin.sogou.com' && pathname === '/weixin' )
|
||||
{
|
||||
const path = ".news-box ul li dl:nth-child(3) > dd > a:nth-child(1)";
|
||||
const button = document.createElement("button");
|
||||
button.innerHTML = "监测最新文章";
|
||||
button.style = button_base_style+"margin-top:10px;margin-bottom:10px;";
|
||||
button.onclick = async()=>{
|
||||
|
||||
const icon_url = "https://www.sogou.com/favicon.ico";
|
||||
|
||||
const url = 'index.html#/check/add?path='+encodeURIComponent(path)+'&title='+encodeURIComponent(window.document.title)+'&url='+encodeURIComponent(window.location.href)+'&icon='+encodeURIComponent(icon_url);
|
||||
|
||||
const ret = await chrome.runtime.sendMessage({action: "redirect","url":url,"tabid":null},);
|
||||
}
|
||||
// document.querySelector(".gzh-box2").appendChild( button );
|
||||
document.body?.appendChild( button );
|
||||
}
|
||||
|
||||
if( host === 'www.douyin.com' )
|
||||
{
|
||||
const reg = /\/user\/(.+)/;
|
||||
const id = Array.isArray(pathname.match(reg)) ? pathname.match(reg)[1]:null;
|
||||
console.log( "id", id );
|
||||
if( !id ) return false;
|
||||
const path = "div#root > div > div:nth-of-type(2) > div > div > div:nth-of-type(4) > div > div > div > span";
|
||||
const button = document.createElement("button");
|
||||
button.innerHTML = "监测作品总数";
|
||||
button.style = button_base_style+"padding:5px;padding-left:10px;padding-right:10px;";
|
||||
button.onclick = async()=>{
|
||||
|
||||
const icon_url = "https://www.douyin.com/favicon.ico";
|
||||
|
||||
const url = 'index.html#/check/add?path='+encodeURIComponent(path)+'&title='+encodeURIComponent(window.document.title)+'&url='+encodeURIComponent(window.location.href)+'&icon='+encodeURIComponent(icon_url);
|
||||
|
||||
const ret = await chrome.runtime.sendMessage({action: "redirect","url":url,"tabid":null},);
|
||||
}
|
||||
// document.querySelector("div#root > div > div:nth-of-type(2) > div > div > div:nth-of-type(4) > div > div").appendChild( button );
|
||||
document.body?.appendChild( button );
|
||||
|
||||
}
|
||||
|
||||
// https://m.weibo.cn/profile/5048301588
|
||||
if( host === 'm.weibo.cn' )
|
||||
{
|
||||
const reg = /\/profile\/(.+)/;
|
||||
const id = Array.isArray(pathname.match(reg)) ? pathname.match(reg)[1]:null;
|
||||
console.log( "id", id );
|
||||
if( !id ) return false;
|
||||
const path = ".wb-item:nth-of-type(1)";
|
||||
const ignore_path = ".wb-item .m-text-cut,.wb-item .f-footer-ctrl,.wb-item .card-video";
|
||||
const button = document.createElement("button");
|
||||
button.innerHTML = "监测更新";
|
||||
button.style = button_base_style+"margin-left:10px;";
|
||||
button.onclick = async()=>{
|
||||
|
||||
const icon_url = "https://m.weibo.cn/favicon.ico";
|
||||
|
||||
const url = 'index.html#/check/add?path='+encodeURIComponent(path)+'&title='+encodeURIComponent(window.document.title)+'&url='+encodeURIComponent(window.location.href)+'&icon='+encodeURIComponent(icon_url)+'&ignore_path='+encodeURIComponent(ignore_path);
|
||||
|
||||
const ret = await chrome.runtime.sendMessage({action: "redirect","url":url,"tabid":null},);
|
||||
}
|
||||
// await sleep(1000);
|
||||
// document.querySelector(".prf-handle.m-box").appendChild( button );
|
||||
document.body?.appendChild( button );
|
||||
|
||||
}
|
||||
|
||||
if( host === 'space.bilibili.com' )
|
||||
{
|
||||
const reg = /\/(.+)\/video/;
|
||||
const id = Array.isArray(pathname.match(reg)) ? pathname.match(reg)[1]:null;
|
||||
console.log( "id", id );
|
||||
if( !id ) return false;
|
||||
const path = "div#submit-video-list > ul:nth-of-type(2) > li:nth-of-type(1)";
|
||||
const ignore_path = "div#submit-video-list > ul:nth-of-type(2) > li:nth-of-type(1) .meta";
|
||||
const button = document.createElement("button");
|
||||
button.innerHTML = "监测更新";
|
||||
button.style = button_base_style+"padding:5px;";
|
||||
button.onclick = async()=>{
|
||||
|
||||
const icon_url = "https://space.bilibili.com/favicon.ico";
|
||||
|
||||
const url = 'index.html#/check/add?path='+encodeURIComponent(path)+'&title='+encodeURIComponent(window.document.title)+'&url='+encodeURIComponent(window.location.href)+'&icon='+encodeURIComponent(icon_url)+'&ignore_path='+encodeURIComponent(ignore_path);
|
||||
|
||||
const ret = await chrome.runtime.sendMessage({action: "redirect","url":url,"tabid":null},);
|
||||
}
|
||||
document.body?.appendChild( button );
|
||||
|
||||
}
|
||||
|
||||
// message.bilibili.com
|
||||
if( host === 'message.bilibili.com' )
|
||||
{
|
||||
const reg = /#\/(reply)/;
|
||||
const id = Array.isArray(url.match(reg)) ? url.match(reg)[1]:null;
|
||||
console.log( "id", id );
|
||||
if( !id ) return false;
|
||||
const path = "div#link-message-container > div > div:nth-of-type(2) > div:nth-of-type(2) > div > div > div > div > div > div .center-box";
|
||||
const ignore_path = "div#link-message-container > div > div:nth-of-type(2) > div:nth-of-type(2) > div > div > div > div > div > div .action-field, div#link-message-container > div > div:nth-of-type(2) > div:nth-of-type(2) > div > div > div > div > div > div textarea";
|
||||
const button = document.createElement("button");
|
||||
button.innerHTML = "监测最新回复";
|
||||
button.style = button_base_style+"padding:5px;";
|
||||
button.onclick = async()=>{
|
||||
|
||||
const icon_url = "https://www.bilibili.com/favicon.ico";
|
||||
|
||||
const url = 'index.html#/check/add?path='+encodeURIComponent(path)+'&title='+encodeURIComponent(window.document.title)+'&url='+encodeURIComponent(window.location.href)+'&icon='+encodeURIComponent(icon_url)+'&ignore_path='+encodeURIComponent(ignore_path);
|
||||
|
||||
const ret = await chrome.runtime.sendMessage({action: "redirect","url":url,"tabid":null},);
|
||||
}
|
||||
document.body?.appendChild( button );
|
||||
|
||||
}
|
||||
|
||||
// .ep-list-wrapper .ep-item:last-child
|
||||
if( host === 'www.bilibili.com' )
|
||||
{
|
||||
const reg = /bangumi\/play\/(.+)/;
|
||||
const id = Array.isArray(pathname.match(reg)) ? pathname.match(reg)[1]:null;
|
||||
console.log( "id", id );
|
||||
if( !id ) return false;
|
||||
const path = ".ep-list-wrapper .ep-item:last-child";
|
||||
const ignore_path = ".ep-list-wrapper .ep-item:last-child .badge";
|
||||
const button = document.createElement("button");
|
||||
button.innerHTML = "监测更新";
|
||||
button.style = button_base_style+"padding:5px;";
|
||||
button.onclick = async()=>{
|
||||
|
||||
const icon_url = "https://space.bilibili.com/favicon.ico";
|
||||
|
||||
const url = 'index.html#/check/add?path='+encodeURIComponent(path)+'&title='+encodeURIComponent(window.document.title)+'&url='+encodeURIComponent(window.location.href)+'&icon='+encodeURIComponent(icon_url)+'&ignore_path='+encodeURIComponent(ignore_path);
|
||||
|
||||
const ret = await chrome.runtime.sendMessage({action: "redirect","url":url,"tabid":null},);
|
||||
}
|
||||
document.body?.appendChild( button );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function zcn_insert_button(path)
|
||||
{
|
||||
const button = document.createElement("button");
|
||||
button.innerHTML = "监测价格";
|
||||
button.style = button_base_style+"margin-left:10px;margin-right:10px;";
|
||||
|
||||
button.onclick = async()=>{
|
||||
|
||||
const icon_url = "https://www.amazon.cn/favicon.ico";
|
||||
|
||||
const url = 'index.html#/check/add?path='+encodeURIComponent(path)+'&title='+encodeURIComponent(window.document.title)+'&url='+encodeURIComponent(window.location.href)+'&icon='+encodeURIComponent(icon_url);
|
||||
|
||||
const ret = await chrome.runtime.sendMessage({action: "redirect","url":url,"tabid":null},);
|
||||
}
|
||||
// document.querySelector("#corePriceDisplay_desktop_feature_div .a-price").appendChild( button );
|
||||
document.body?.appendChild( button );
|
||||
}
|
||||
|
||||
|
||||
function jd_insert_button(path)
|
||||
{
|
||||
const button = document.createElement("button");
|
||||
button.style = button_base_style;
|
||||
button.innerHTML = "监测价格";
|
||||
button.onclick = async()=>{
|
||||
|
||||
const icon_url = "https://www.jd.com/favicon.ico";
|
||||
|
||||
const url = 'index.html#/check/add?path='+encodeURIComponent(path)+'&title='+encodeURIComponent(window.document.title)+'&url='+encodeURIComponent(window.location.href)+'&icon='+encodeURIComponent(icon_url);
|
||||
|
||||
const ret = await chrome.runtime.sendMessage({action: "redirect","url":url,"tabid":null},);
|
||||
}
|
||||
// document.querySelector(".p-price").appendChild( button );
|
||||
document.body?.appendChild( button );
|
||||
}
|
||||
|
||||
function sleep(ms) {
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(resolve, ms);
|
||||
});
|
||||
}
|
||||
|
After Width: | Height: | Size: 22 KiB |
@@ -0,0 +1 @@
|
||||
<!doctype html><html lang="zh-cn"><head><meta charset="utf-8"/><link rel="icon" href="/logo.color.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="web content monitor"/><link rel="apple-touch-icon" href="logo.color.png"/><link rel="manifest" href="/manifest.json"/><title>...</title><link rel="stylesheet" href="/tailwind.min.css"><link href="/static/css/2.65280f5c.chunk.css" rel="stylesheet"><link href="/static/css/main.0e42becb.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script src="/static/js/runtime-main.17191aad.js"></script><script src="/static/js/2.465e7d2f.chunk.js"></script><script src="/static/js/main.b985a5e4.chunk.js"></script></body></html>
|
||||
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"manifest_version": 3,
|
||||
"name": "__MSG_appTitle__",
|
||||
"description": "__MSG_appDesc__",
|
||||
"default_locale": "zh_CN",
|
||||
"version": "0.9.6",
|
||||
"icons": {
|
||||
"512": "logo.color.png"
|
||||
},
|
||||
"action": {
|
||||
"default_title": "Check酱"
|
||||
},
|
||||
"permissions": [
|
||||
"cookies","scripting","tabs","notifications","storage", "alarms","contextMenus","debugger","unlimitedStorage"
|
||||
],
|
||||
"host_permissions": [
|
||||
"http://*/*","https://*/*"
|
||||
],
|
||||
"content_security_policy": {
|
||||
"extension_pages": "script-src 'self'; object-src 'self'; script-src-elem 'self' 'unsafe-inline';"
|
||||
},
|
||||
"background": {
|
||||
"service_worker": "start.js",
|
||||
"type": "module"
|
||||
}
|
||||
,
|
||||
"content_scripts": [{
|
||||
"js": ["dom-inspector.min.js","content.js"],
|
||||
"matches": ["http://*/*","https://*/*"]
|
||||
}]
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
# 教程
|
||||
|
||||
| 📼 新版使用 | 📼 完全教程 |
|
||||
| --- | --- |
|
||||
| [① 新版使用·B站·20分钟](https://www.bilibili.com/video/BV1vT411E7JV) | [② 完全教程·B站·近2小时](https://www.bilibili.com/video/BV1K94y1m7tt) |
|
||||
|
||||
# RSS
|
||||
|
||||
> Check酱支持订阅RSS内容。配合[RSS Hub](https://github.com/DIYgod/RSSHub)可以监测上千内容源。
|
||||
|
||||
| 推荐RSS源 | 浏览器自动发现插件 | 视频教程 |
|
||||
| --- | --- | --- |
|
||||
| [RssHub官网🪜](https://docs.rsshub.app/) | RSSHub浏览器插件Check酱整合版[ GitHub下载🪜](https://github.com/easychen/RSSHub-Radar-with-checkchan/releases/tag/main) | [B站·Check酱+RSSHub使用教程](https://www.bilibili.com/video/BV1JY4y1P71b) |
|
||||
|
||||
# 电商
|
||||
|
||||
##  京东·监测价格
|
||||
|
||||
| 📱 手机 | 💻 电脑 | 📺 平板电视 | 📖 图书 | 其他商品 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| [小米12S Ultra](https://u.jd.com/HwsX0Ef) | [MacMini M1版](https://u.jd.com/HLshflX) | [红米86寸超大屏](https://u.jd.com/HLbIZom)| [《三体》全集](https://u.jd.com/HwbsWql) | 🔍 [搜索](https://search.jd.com/Search?keyword=%E6%95%B0%E5%AD%97%E9%94%AE%E7%9B%98%E6%97%A0%E7%BA%BF) |
|
||||
|
||||
> ⚠️ 支持电脑版商品页面( 网址如 item.jd.com/***.html ),通过左下角「监测价格」按钮添加任务
|
||||
|
||||
---
|
||||
|
||||
##  亚马逊·海外购
|
||||
|
||||
| 💾 硬盘 | 🧸 玩具 | 💿 数码 | 其他商品 |
|
||||
| --- | --- | --- | --- |
|
||||
| [WD18T硬盘](https://www.amazon.cn/dp/B08KY32HFR) | [柯南拼图](https://www.amazon.cn/dp/B076KJGKDW) | [Chromecast3播放器](https://www.amazon.cn/dp/B07KC5GS5J) | 🔍 [搜索](https://www.amazon.cn/s?k=%E7%BE%8E%E6%B5%93%E7%83%A7) |
|
||||
|
||||
> ⚠️ 支持电脑版商品页面( 网址如 www.amazon.cn/dp/*** ),通过左下角「监测价格」按钮添加任务
|
||||
|
||||
# 社交媒体
|
||||
|
||||
##  微博
|
||||
|
||||
| 🎈 作者 | 👨🏻🏫 教育 | ⚒️ 创造 | 🍛 美食 | 🎹 音乐 | 其他账号 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| [Easy](https://m.weibo.cn/profile/1088413295) | [李永乐老师](https://m.weibo.cn/profile/3325704142) | [手工耿](https://m.weibo.cn/profile/3108949955) | [美食作家王刚](https://m.weibo.cn/profile/6288254740) | [刘若英](https://m.weibo.cn/profile/1681213010) | 🔍 [搜索](https://m.weibo.cn/search?containerid=100103type%3D1%26q%3D%E6%96%B0%E7%9F%A5%E5%8D%9A%E4%B8%BB) ·「用户」标签页 |
|
||||
|
||||
> ⚠️ 支持H5版微博用户页面( 网址如 m.weibo.cn/profile/$UID ),通过左下角「监测更新」按钮添加任务
|
||||
|
||||
---
|
||||
|
||||
##  微信·订阅号
|
||||
|
||||
| 💾 软件 | 🚀 效率 | 🥘 美食 | 其他账号 |
|
||||
| --- | --- | --- | --- |
|
||||
| [小众软件](https://weixin.sogou.com/weixin?type=1&s_from=input&query=appinncom&ie=utf8&_sug_=n&_sug_type_=)| [少数派](https://weixin.sogou.com/weixin?type=1&s_from=input&query=sspaime&ie=utf8&_sug_=n&_sug_type_=&w=01019900&sut=1319&sst0=1658764155615&lkt=0%2C0%2C0) | [美食台](https://weixin.sogou.com/weixin?type=1&s_from=input&query=foodvideo&ie=utf8&_sug_=n&_sug_type_=&w=01019900&sut=1664&sst0=1658764610151&lkt=0%2C0%2C0) | 🔍 [搜索](https://weixin.sogou.com/weixin?type=1&s_from=input&query=fangtangtongxue&ie=utf8&_sug_=y&_sug_type_=&w=01019900&sut=2508&sst0=1658730700552&lkt=0%2C0%2C0) |
|
||||
|
||||
> ⚠️ 搜狗搜索结果页面,通过左下角「监测最新文章」按钮添加任务
|
||||
|
||||
|
||||
# 视频
|
||||
|
||||
##  B站·UP主最新视频
|
||||
|
||||
| 🎈 作者 | 其他账号 |
|
||||
| --- | --- |
|
||||
| [方糖气球](https://space.bilibili.com/10185878/video) | 🔍 [搜索](https://search.bilibili.com/upuser?keyword=%E6%96%B9%E7%B3%96%E6%B0%94%E7%90%83) ·「TA的视频」标签页 |
|
||||
|
||||
> 搜索结果点账号进主页 →「TA的视频」( space.bilibili.com/***/video ),点左下角「监测更新」按钮添加任务
|
||||
|
||||
---
|
||||
|
||||
##  B站·番剧更新
|
||||
|
||||
| 👻 悬疑 | ✨ 特效 | 更多番剧 |
|
||||
| --- | --- | --- |
|
||||
| [夏日重现](https://www.bilibili.com/bangumi/play/ss41417) | [凡人修仙传](https://www.bilibili.com/bangumi/play/ss28747) | 🔍 [搜索](https://search.bilibili.com/bangumi?keyword=%E8%BE%89%E5%A4%9C%E5%A4%A7%E5%B0%8F%E5%A7%90) |
|
||||
|
||||
> 搜索结果点账号进主页 →「TA的视频」( www.bilibili.com/bangumi/play/*** ),点左下角「监测更新」按钮添加任务
|
||||
|
||||
---
|
||||
|
||||
##  抖音·作品总数
|
||||
|
||||
| 🥘 美食 | 其他账号 |
|
||||
| --- | --- |
|
||||
| [【寻真味】佬美](https://www.douyin.com/user/MS4wLjABAAAAHwf1DAfgUg4cxizx9nLC1JozAR1P-jGOhagrX9pgLz8) | 🔍 [搜索](https://www.douyin.com/search/%E5%AF%BB%E7%9C%9F%E5%91%B3?source=switch_tab&type=user) |
|
||||
|
||||
> 搜索结果点账号进主页( www.douyin.com/user/*** ),点左下角「监测作品总数」按钮添加任务
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
self.__precacheManifest = (self.__precacheManifest || []).concat([
|
||||
{
|
||||
"revision": "5d3f01c97c0ab12bae7a5f7e1674e402",
|
||||
"url": "/index.html"
|
||||
},
|
||||
{
|
||||
"revision": "5c12cce1404dabf49f3a",
|
||||
"url": "/static/css/2.65280f5c.chunk.css"
|
||||
},
|
||||
{
|
||||
"revision": "f861aed79b16d1b199fd",
|
||||
"url": "/static/css/main.0e42becb.chunk.css"
|
||||
},
|
||||
{
|
||||
"revision": "5c12cce1404dabf49f3a",
|
||||
"url": "/static/js/2.465e7d2f.chunk.js"
|
||||
},
|
||||
{
|
||||
"revision": "f861aed79b16d1b199fd",
|
||||
"url": "/static/js/main.b985a5e4.chunk.js"
|
||||
},
|
||||
{
|
||||
"revision": "4d30565b04f5f2725c56",
|
||||
"url": "/static/js/runtime-main.17191aad.js"
|
||||
},
|
||||
{
|
||||
"revision": "05f1cdadfe476395f60e233b15c22155",
|
||||
"url": "/static/media/icons-16.05f1cdad.eot"
|
||||
},
|
||||
{
|
||||
"revision": "3c1c220e7a18286503fb431c7a7fe183",
|
||||
"url": "/static/media/icons-16.3c1c220e.woff"
|
||||
},
|
||||
{
|
||||
"revision": "3cde8748332d1de6b1ae1c2dc5850754",
|
||||
"url": "/static/media/icons-16.3cde8748.ttf"
|
||||
},
|
||||
{
|
||||
"revision": "0a5c76518a68c185baa2c6744456918c",
|
||||
"url": "/static/media/icons-20.0a5c7651.eot"
|
||||
},
|
||||
{
|
||||
"revision": "51ec31f302d0072808e1f83f85fea4cd",
|
||||
"url": "/static/media/icons-20.51ec31f3.ttf"
|
||||
},
|
||||
{
|
||||
"revision": "cef8cdbb9d0ba82e6e19fb0eeba2ac3d",
|
||||
"url": "/static/media/icons-20.cef8cdbb.woff"
|
||||
}
|
||||
]);
|
||||
@@ -0,0 +1,2 @@
|
||||
# https://www.robotstxt.org/robotstxt.html
|
||||
User-agent: *
|
||||
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* Welcome to your Workbox-powered service worker!
|
||||
*
|
||||
* You'll need to register this file in your web app and you should
|
||||
* disable HTTP caching for this file too.
|
||||
* See https://goo.gl/nhQhGp
|
||||
*
|
||||
* The rest of the code is auto-generated. Please don't update this file
|
||||
* directly; instead, make changes to your Workbox build configuration
|
||||
* and re-run your build process.
|
||||
* See https://goo.gl/2aRDsh
|
||||
*/
|
||||
|
||||
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");
|
||||
|
||||
importScripts(
|
||||
"/precache-manifest.0fd7de5395cfc4062a9344bfcc8632d5.js"
|
||||
);
|
||||
|
||||
self.addEventListener('message', (event) => {
|
||||
if (event.data && event.data.type === 'SKIP_WAITING') {
|
||||
self.skipWaiting();
|
||||
}
|
||||
});
|
||||
|
||||
workbox.core.clientsClaim();
|
||||
|
||||
/**
|
||||
* The workboxSW.precacheAndRoute() method efficiently caches and responds to
|
||||
* requests for URLs in the manifest.
|
||||
* See https://goo.gl/S9QRab
|
||||
*/
|
||||
self.__precacheManifest = [].concat(self.__precacheManifest || []);
|
||||
workbox.precaching.precacheAndRoute(self.__precacheManifest, {});
|
||||
|
||||
workbox.routing.registerNavigationRoute(workbox.precaching.getCacheKeyForURL("/index.html"), {
|
||||
|
||||
blacklist: [/^\/_/,/\/[^/?]+\.[^/]+$/],
|
||||
});
|
||||
@@ -0,0 +1,4 @@
|
||||
import './background.js';
|
||||
// importScripts('background.js');
|
||||
// importScripts('background.js','check.js');
|
||||
//code
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){function t(t){for(var n,p,f=t[0],l=t[1],a=t[2],c=0,s=[];c<f.length;c++)p=f[c],Object.prototype.hasOwnProperty.call(o,p)&&o[p]&&s.push(o[p][0]),o[p]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n]);for(i&&i(t);s.length;)s.shift()();return u.push.apply(u,a||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,f=1;f<r.length;f++){var l=r[f];0!==o[l]&&(n=!1)}n&&(u.splice(t--,1),e=p(p.s=r[0]))}return e}var n={},o={1:0},u=[];function p(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,p),r.l=!0,r.exports}p.m=e,p.c=n,p.d=function(e,t,r){p.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},p.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},p.t=function(e,t){if(1&t&&(e=p(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(p.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)p.d(r,n,function(t){return e[t]}.bind(null,n));return r},p.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(t,"a",t),t},p.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p.p="/";var f=this["webpackJsonpft-app"]=this["webpackJsonpft-app"]||[],l=f.push.bind(f);f.push=t,f=f.slice();for(var a=0;a<f.length;a++)t(f[a]);var i=l;r()}([]);
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"appTitle": {
|
||||
"message": "Check酱"
|
||||
},
|
||||
"appDesc": {
|
||||
"message": "监控页面变动,并发送异动到微信。 Build.2022.08.10.01.22",
|
||||
"description":"亦支持http status、json和rss监测。配合自架云端,关电脑后也能运行。"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"files": {
|
||||
"main.css": "/static/css/main.0e42becb.chunk.css",
|
||||
"main.js": "/static/js/main.b985a5e4.chunk.js",
|
||||
"runtime-main.js": "/static/js/runtime-main.17191aad.js",
|
||||
"static/css/2.65280f5c.chunk.css": "/static/css/2.65280f5c.chunk.css",
|
||||
"static/js/2.465e7d2f.chunk.js": "/static/js/2.465e7d2f.chunk.js",
|
||||
"index.html": "/index.html",
|
||||
"precache-manifest.0fd7de5395cfc4062a9344bfcc8632d5.js": "/precache-manifest.0fd7de5395cfc4062a9344bfcc8632d5.js",
|
||||
"service-worker.js": "/service-worker.js",
|
||||
"static/media/index.scss": "/static/media/icons-20.cef8cdbb.woff"
|
||||
},
|
||||
"entrypoints": [
|
||||
"static/js/runtime-main.17191aad.js",
|
||||
"static/css/2.65280f5c.chunk.css",
|
||||
"static/js/2.465e7d2f.chunk.js",
|
||||
"static/css/main.0e42becb.chunk.css",
|
||||
"static/js/main.b985a5e4.chunk.js"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,542 @@
|
||||
// import html2canvas from './html2canvas.esm.js';
|
||||
|
||||
|
||||
let inspector = {};
|
||||
console.log( "load bg.js" );
|
||||
// javascript-obfuscator:disable
|
||||
async function show_inspector( tabid,inspector )
|
||||
{
|
||||
inspector = new DomInspector({
|
||||
maxZIndex: 9999,
|
||||
onClick: async (path) => {
|
||||
|
||||
if( window.confirm( "选择器为"+path+",是否转向到任务添加页面?" ) )
|
||||
{
|
||||
var getFavicon = function(){
|
||||
var favicon = undefined;
|
||||
var nodeList = document.getElementsByTagName("link");
|
||||
for (var i = 0; i < nodeList.length; i++)
|
||||
{
|
||||
if((nodeList[i].getAttribute("rel") == "icon")||(nodeList[i].getAttribute("rel") == "shortcut icon"))
|
||||
{
|
||||
favicon = nodeList[i].getAttribute("href");
|
||||
}
|
||||
}
|
||||
return favicon;
|
||||
}
|
||||
|
||||
let icon_url = getFavicon() || "/favicon.ico";
|
||||
if( icon_url.substring(0,4) != 'http' )
|
||||
{
|
||||
if( icon_url.substring(0,2) == '//' )
|
||||
{
|
||||
icon_url = window.location.protocol + icon_url;
|
||||
}else
|
||||
{
|
||||
if( icon_url.substring(0,1) != '/' ) icon_url = window.origin+ '/' + icon_url;
|
||||
else icon_url = window.origin + icon_url;
|
||||
}
|
||||
}
|
||||
|
||||
const url = 'index.html#/check/add?path='+encodeURIComponent(path)+'&title='+encodeURIComponent(window.document.title)+'&url='+encodeURIComponent(window.location.href)+'&icon='+encodeURIComponent(icon_url);
|
||||
|
||||
|
||||
|
||||
// 这里是 content script 同等权限,发送消息来调整网页
|
||||
const ret = await chrome.runtime.sendMessage({action: "redirect","url":url,"tabid":tabid},);
|
||||
console.log( "ret" , ret, inspector );
|
||||
// 因为给元素注入了onclick,这里还是要reload才行
|
||||
}else
|
||||
{
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
});
|
||||
inspector.enable();
|
||||
alert("可视化选择器已初始化,请移动鼠标选择要监测的区域后点击,取消请按ESC");
|
||||
console.log( "inspector2", inspector );
|
||||
document.addEventListener('keyup',e => {
|
||||
if (e.key === "Escape") inspector.disable();
|
||||
});
|
||||
}
|
||||
|
||||
// javascript-obfuscator:disable
|
||||
async function ck_get_content( path,delay=3000, ignore_path = "",click_path = "",data_path="",scroll_down="0" )
|
||||
{
|
||||
function sleep(ms) {
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(resolve, ms);
|
||||
});
|
||||
}
|
||||
|
||||
function dom_ready(ms)
|
||||
{
|
||||
return new Promise((resolve) => {
|
||||
const handle = setInterval( ()=>{
|
||||
console.log( document.readyState );
|
||||
if( document.readyState == 'complete' )
|
||||
{
|
||||
clearInterval(handle);
|
||||
resolve(true);
|
||||
}
|
||||
} , 1000 );
|
||||
if(ms) setTimeout(resolve, ms);
|
||||
});
|
||||
}
|
||||
|
||||
async function dom_mul_select( path, ignore_path = "",click_path = "",data_path="",scroll_down="0" )
|
||||
{
|
||||
// 滚动到页面底部
|
||||
if( scroll_down && parseInt(scroll_down) > 0 )
|
||||
{
|
||||
window.scrollTo(0,document.body.scrollHeight);
|
||||
await sleep(5000);
|
||||
}
|
||||
|
||||
// 点击特定区域
|
||||
if( click_path )
|
||||
{
|
||||
const click_path_items = click_path.split(",");
|
||||
for( let item of click_path_items )
|
||||
{
|
||||
const click_item = window.document.querySelector(item);
|
||||
if( click_item )
|
||||
{
|
||||
click_item.click();
|
||||
await sleep(1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if( ignore_path )
|
||||
window.document.querySelectorAll( ignore_path ).forEach( item => item.remove() );
|
||||
|
||||
let ret = window.document.querySelectorAll(path);
|
||||
if( !ret ) return false;
|
||||
let texts = [];
|
||||
let html = "";
|
||||
for( let item of ret )
|
||||
{
|
||||
item.querySelectorAll("[src]").forEach( item => { if( item.src.substr(0,4) != 'http' ) { item.src = window.origin +( item.src.substr(0,1) == '/' ? item.src : '/'+ item.src ) } } );
|
||||
|
||||
item.querySelectorAll("[href]").forEach( item => { if( item.href.substr(0,4) != 'http' ) { item.href = window.origin +( item.href.substr(0,1) == '/' ? item.href : '/'+ item.href ) } } );
|
||||
|
||||
if( item.innerText ) texts.push(item.innerText?.trim());
|
||||
html += item.outerHTML ? item.outerHTML + "<br/>" : "";
|
||||
}
|
||||
|
||||
let data_ret = "";
|
||||
if( data_path )
|
||||
{
|
||||
const data_path_items = data_path.split(",");
|
||||
for( let item of data_path_items )
|
||||
{
|
||||
const data_items = window.document.querySelectorAll(item);
|
||||
for( let data_item of data_items ){
|
||||
if( data_item )
|
||||
{
|
||||
data_ret += data_item.outerHTML ? data_item.outerHTML+"<br/>" : "";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return {text:path.indexOf(",") >= 0 ? texts.join("\n") :texts[0]||"",html,"data":data_ret};
|
||||
}
|
||||
|
||||
// await sleep(delay);
|
||||
await dom_ready();
|
||||
if( delay > 0 ) await sleep(delay);
|
||||
const ret = await dom_mul_select(path,ignore_path,click_path,data_path,scroll_down);
|
||||
// 直接提取
|
||||
if( ret )
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
else
|
||||
{
|
||||
// 失败的话,先延迟再尝试一次
|
||||
await sleep(3000);
|
||||
const ret2 = await dom_mul_select(path,ignore_path,click_path,data_path,scroll_down);
|
||||
if( ret2 )
|
||||
{
|
||||
return ret2;
|
||||
}
|
||||
else
|
||||
{
|
||||
await sleep(3000);
|
||||
// 再来一次
|
||||
const ret3 = await dom_mul_select(path,ignore_path,click_path,data_path,scroll_down);
|
||||
if( ret3 ) return ret;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
chrome.runtime.onMessage.addListener( (request, sender, sendResponse) => {
|
||||
|
||||
// console.log("in event listender", request);
|
||||
if (request.action === "redirect")
|
||||
{
|
||||
(async () =>{
|
||||
// 必须用update,直接给属性赋值没有用
|
||||
// 如果已经打开了窗口,重用窗口
|
||||
const [tab] = await chrome.tabs.query({ title:"Check酱" });
|
||||
// 否则创建一个新的
|
||||
const current_tab = await chrome.tabs.query({ active: true, currentWindow: true });
|
||||
const tabid = request.tabid || current_tab[0].id;
|
||||
|
||||
const tab2 = await chrome.tabs.get(tabid);
|
||||
console.log(tab2);
|
||||
|
||||
const that_tab = tab || tab2;
|
||||
// 重用模式下,刷新定位窗口
|
||||
// 不用刷新了,加了esc
|
||||
// if( tab )
|
||||
// {
|
||||
// await chrome.tabs.reload(tab2.id);
|
||||
// }
|
||||
|
||||
// await chrome.tabs.update(that_tab.id, {"url":request.url+'&icon='+encodeURIComponent(that_tab.favIconUrl),"active":true});
|
||||
// 不传递favicon了
|
||||
await chrome.tabs.update(that_tab.id, {"url":request.url,"active":true});
|
||||
// 强制刷新时hash值生效
|
||||
await chrome.tabs.reload(that_tab.id);
|
||||
sendResponse({"message":"done",request});
|
||||
})();
|
||||
return true;
|
||||
}
|
||||
if (request.action === "fetch")
|
||||
{
|
||||
(async () =>{
|
||||
const tab = await chrome.tabs.create({"url":request.url,"active":false,"pinned":true});
|
||||
|
||||
// console.log("request",request);
|
||||
if( request.ua )
|
||||
{
|
||||
await attach_debugger( tab.id );
|
||||
await send_debug_command(tab.id, 'Network.setUserAgentOverride', {
|
||||
userAgent: request.ua,
|
||||
});
|
||||
// console.log("reload");
|
||||
await chrome.tabs.reload(tab.id);
|
||||
await sleep(1000);
|
||||
|
||||
}
|
||||
// console.log( tab );
|
||||
// javascript-obfuscator:disable
|
||||
const r = await chrome.scripting.executeScript(
|
||||
{
|
||||
target: {tabId: tab.id},
|
||||
function: ck_get_content,
|
||||
args: [request.path,request.delay,request.ignore_path,request.click_path,request.data_path,request.scroll_down]
|
||||
});
|
||||
// console.log( r );
|
||||
|
||||
if( request.ua ) await detach_debugger(tab.id);
|
||||
|
||||
const result = r[0]?.result;
|
||||
console.log( "result", result );
|
||||
await chrome.tabs.remove(tab.id);
|
||||
sendResponse( result );
|
||||
})();
|
||||
|
||||
return true;
|
||||
|
||||
|
||||
}
|
||||
sendResponse({});
|
||||
return true;
|
||||
});
|
||||
|
||||
chrome.action.onClicked.addListener(function(activeTab)
|
||||
{
|
||||
tab_init();
|
||||
});
|
||||
|
||||
chrome.runtime.onInstalled.addListener(function (details)
|
||||
{
|
||||
// 在安装完成事件后
|
||||
chrome.contextMenus.create({
|
||||
// "id": `checkchanSelector-${Date.now()}`,
|
||||
"id": `checkchanSelector`,
|
||||
"title": "定位监测对象",
|
||||
"contexts": ["all"]
|
||||
});
|
||||
// 只创建一次
|
||||
chrome.alarms.create('check_change',
|
||||
{
|
||||
when: Date.now(),
|
||||
periodInMinutes: 1
|
||||
});
|
||||
|
||||
// chrome.alarms.create('auto_sync',
|
||||
// {
|
||||
// when: Date.now(),
|
||||
// periodInMinutes: 10
|
||||
// });
|
||||
|
||||
chrome.alarms.create('bg_cookie_sync',
|
||||
{
|
||||
when: Date.now(),
|
||||
periodInMinutes: 61
|
||||
});
|
||||
|
||||
console.log("create alarms");
|
||||
tab_init();
|
||||
});
|
||||
|
||||
function send_debug_command(tabid, method, params = {}) {
|
||||
return new Promise((resolve) => {
|
||||
chrome.debugger.sendCommand({ tabId:tabid }, method, params, resolve);
|
||||
});
|
||||
}
|
||||
|
||||
function attach_debugger(tabId, prevTab) {
|
||||
return new Promise((resolve) => {
|
||||
if (prevTab && tabId !== prevTab)
|
||||
chrome.debugger.detach({ tabId: prevTab });
|
||||
|
||||
chrome.debugger.attach({ tabId }, '1.3', () => {
|
||||
chrome.debugger.sendCommand({ tabId }, 'Page.enable', resolve);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function detach_debugger(tabId) {
|
||||
return new Promise((resolve) => {
|
||||
chrome.debugger.detach({ tabId },resolve);
|
||||
});
|
||||
}
|
||||
|
||||
async function tab_init()
|
||||
{
|
||||
// 首先查找名为[Check酱]的tab,没有再创建新的
|
||||
const [tab] = await chrome.tabs.query({ title:"Check酱" });
|
||||
// console.log( tab );
|
||||
if( tab )
|
||||
{
|
||||
await chrome.tabs.update(tab.id, {"active":true});
|
||||
// await chrome.tabs.update(tab.id, {"highlighted":true});
|
||||
}else
|
||||
{
|
||||
await chrome.tabs.create({"url":"index.html","pinned":true});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function selector_init( tabid )
|
||||
{
|
||||
chrome.scripting.executeScript(
|
||||
{
|
||||
target: {tabId: tabid},
|
||||
// files: ['init.js']
|
||||
function: show_inspector,
|
||||
args: [tabid,inspector]
|
||||
},
|
||||
(injectionResults)=>
|
||||
{
|
||||
console.log(injectionResults);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
chrome.contextMenus.onClicked.addListener(async(e)=>{
|
||||
console.log("menu clicked", e);
|
||||
const [tab] = await chrome.tabs.query({ active: true, currentWindow: true });
|
||||
selector_init(tab.id);
|
||||
});
|
||||
|
||||
function sleep(ms) {
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(resolve, ms);
|
||||
});
|
||||
}
|
||||
|
||||
// chrome.webRequest.onBeforeSendHeaders.addListener(
|
||||
// async details =>
|
||||
// {
|
||||
// let headers = details.requestHeaders;
|
||||
// const checks = (await load_data('checks')).filter( item => item.ua );
|
||||
// if( checks.length > 0 )
|
||||
// {
|
||||
// const domains = checks.map( item => new URL(item.url).host );
|
||||
// const uas = checks.map( item => item.ua );
|
||||
// // console.log( domains, uas );
|
||||
// for (var i = 0; i < headers.length; ++i)
|
||||
// {
|
||||
// if (headers[i].name.toLowerCase() === 'user-agent')
|
||||
// {
|
||||
// const host = new URL(details.url).host;
|
||||
// if( domains.includes(host) )
|
||||
// {
|
||||
// headers[i].value = uas[domains.indexOf(host)];
|
||||
// console.log("change headers", details.url , headers[i]);
|
||||
// }
|
||||
|
||||
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// return {requestHeaders: headers};
|
||||
// },
|
||||
// {urls: ["<all_urls>"]},
|
||||
// ["requestHeaders"]
|
||||
// );
|
||||
|
||||
chrome.alarms.onAlarm.addListener( async a =>
|
||||
{
|
||||
if( a.name == 'bg_cookie_sync' )
|
||||
{
|
||||
console.log( 'bg_cookie_sync' );
|
||||
// 读取api
|
||||
const settings = await kv_load('settings');
|
||||
if( !settings._hosted_api_base ) return false;
|
||||
// 开关
|
||||
if( parseInt( settings._hosted_auto_sync||0 ) <= 0 || parseInt( settings._hosted_sync_cookie||0 ) <= 0 ) return false;
|
||||
|
||||
console.log( 'bg_cookie_sync start', parseInt( settings._hosted_auto_sync||0 ), parseInt( settings._hosted_sync_cookie||0 ) );
|
||||
|
||||
// 读取 checks
|
||||
const checks = await load_data('checks');
|
||||
|
||||
// 获取 cookie
|
||||
const cookies = parseInt( settings._hosted_sync_cookie ) > 0 ? await get_cookie_by_checks( checks ) : [];
|
||||
|
||||
// 同步 checks 和 cookies
|
||||
const form = new FormData();
|
||||
form.append( 'key',settings._hosted_api_key||"" );
|
||||
form.append( 'checks',JSON.stringify(checks) );
|
||||
form.append( 'cookies',JSON.stringify(cookies) );
|
||||
try {
|
||||
const response = await fetch( settings._hosted_api_base+'/checks/upload', {
|
||||
method: 'POST',
|
||||
body: form
|
||||
} );
|
||||
|
||||
const ret = await response.json();
|
||||
console.log( "ret", ret );
|
||||
return ret;
|
||||
|
||||
} catch (error) {
|
||||
console.log("请求服务器失败。"+error);
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
async function kv_save( data, key = 'settings' )
|
||||
{
|
||||
let kv = [];
|
||||
for( const setting of data )
|
||||
{
|
||||
kv.push({"key":setting,"value":this[setting]});
|
||||
}
|
||||
await save_data(kv, key);
|
||||
}
|
||||
|
||||
async function kv_load( key = 'settings' )
|
||||
{
|
||||
let opt = {};
|
||||
const kv = await load_data( key );
|
||||
|
||||
if( kv && Array.isArray(kv) )
|
||||
for( const item of kv )
|
||||
{
|
||||
if( item.key )
|
||||
opt[item.key] = item.value || "";
|
||||
}
|
||||
|
||||
return opt;
|
||||
}
|
||||
|
||||
async function get_cookie_by_checks( checks )
|
||||
{
|
||||
let ret_cookies = {};
|
||||
// 获取cookie
|
||||
if( chrome.cookies )
|
||||
{
|
||||
const cookies = await chrome.cookies.getAll({});
|
||||
let domains = [];
|
||||
for( const item of checks )
|
||||
{
|
||||
// console.log( "item", item );
|
||||
const domain = new URL( item.url ).host;
|
||||
if( !domains.includes( domain ) )
|
||||
domains.push( domain );
|
||||
}
|
||||
// console.log( domains );
|
||||
for( const domain of domains )
|
||||
{
|
||||
ret_cookies[domain] = [];
|
||||
for( const cookie of cookies )
|
||||
{
|
||||
// console.log( "cookie", cookie, domain, domain.indexOf(cookie.domain) );
|
||||
if( domain.indexOf(cookie.domain) >= 0 )
|
||||
{
|
||||
ret_cookies[domain].push( cookie );
|
||||
}
|
||||
}
|
||||
}
|
||||
}else
|
||||
{
|
||||
console.log("not chrome cookie...");
|
||||
}
|
||||
return ret_cookies;
|
||||
}
|
||||
|
||||
async function storage_set( key, value )
|
||||
{
|
||||
return new Promise((resolve, reject) => {
|
||||
chrome.storage.local.set( {[key]:value}, function () {
|
||||
return resolve(true);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async function storage_get( key )
|
||||
{
|
||||
return new Promise((resolve, reject) => {
|
||||
chrome.storage.local.get([key], function (result) {
|
||||
if (result[key] === undefined) {
|
||||
resolve(null);
|
||||
} else {
|
||||
resolve(result[key]);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async function load_data( key = 'checks' )
|
||||
{
|
||||
const data = chrome?.storage ? await storage_get(key) : window.localStorage.getItem( key );
|
||||
// console.log("load",key,data);
|
||||
try {
|
||||
return JSON.parse(data);
|
||||
} catch (error) {
|
||||
return data||[];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async function save_data( data, key = 'checks')
|
||||
{
|
||||
// chrome.storage.local.set({key:JSON.stringify(data)});
|
||||
const ret = chrome?.storage ? await storage_set( key, JSON.stringify(data) ) : window.localStorage.setItem( key, JSON.stringify(data) );
|
||||
return ret;
|
||||
}
|
||||
@@ -0,0 +1,225 @@
|
||||
// console.log( "bg", window.origin );
|
||||
|
||||
const host = window.location.host;
|
||||
const url = window.location.href;
|
||||
const pathname = window.location.pathname;
|
||||
const button_base_style = "position: fixed; bottom: 20px; left: 20px; z-index: 9999; background-color: #295a8a; color:white; border-radius: 5px;";
|
||||
|
||||
async function main()
|
||||
{
|
||||
await insert_content( host, url, pathname );
|
||||
}
|
||||
|
||||
main();
|
||||
|
||||
async function insert_content( host, url, pathname )
|
||||
{
|
||||
if( host === 'item.jd.com' )
|
||||
{
|
||||
const reg = /\/(\d+).html/;
|
||||
const id = Array.isArray(pathname.match(reg)) ? pathname.match(reg)[1]:null;
|
||||
console.log( "id", id );
|
||||
if( !id ) return false;
|
||||
const path = `.price.J-p-${id}`;
|
||||
jd_insert_button(path);
|
||||
}
|
||||
|
||||
if( host === 'www.amazon.cn' )
|
||||
{
|
||||
const reg = /\/dp\/(.+?)$/;
|
||||
const id = Array.isArray(pathname.match(reg)) ? pathname.match(reg)[1]:null;
|
||||
console.log( "id", id );
|
||||
if( !id ) return false;
|
||||
const path = `#corePriceDisplay_desktop_feature_div span.a-offscreen`;
|
||||
zcn_insert_button(path);
|
||||
}
|
||||
|
||||
if( host === 'weixin.sogou.com' && pathname === '/weixin' )
|
||||
{
|
||||
const path = ".news-box ul li dl:nth-child(3) > dd > a:nth-child(1)";
|
||||
const button = document.createElement("button");
|
||||
button.innerHTML = "监测最新文章";
|
||||
button.style = button_base_style+"margin-top:10px;margin-bottom:10px;";
|
||||
button.onclick = async()=>{
|
||||
|
||||
const icon_url = "https://www.sogou.com/favicon.ico";
|
||||
|
||||
const url = 'index.html#/check/add?path='+encodeURIComponent(path)+'&title='+encodeURIComponent(window.document.title)+'&url='+encodeURIComponent(window.location.href)+'&icon='+encodeURIComponent(icon_url);
|
||||
|
||||
const ret = await chrome.runtime.sendMessage({action: "redirect","url":url,"tabid":null},);
|
||||
}
|
||||
// document.querySelector(".gzh-box2").appendChild( button );
|
||||
document.body?.appendChild( button );
|
||||
}
|
||||
|
||||
if( host === 'www.douyin.com' )
|
||||
{
|
||||
const reg = /\/user\/(.+)/;
|
||||
const id = Array.isArray(pathname.match(reg)) ? pathname.match(reg)[1]:null;
|
||||
console.log( "id", id );
|
||||
if( !id ) return false;
|
||||
const path = "div#root > div > div:nth-of-type(2) > div > div > div:nth-of-type(4) > div > div > div > span";
|
||||
const button = document.createElement("button");
|
||||
button.innerHTML = "监测作品总数";
|
||||
button.style = button_base_style+"padding:5px;padding-left:10px;padding-right:10px;";
|
||||
button.onclick = async()=>{
|
||||
|
||||
const icon_url = "https://www.douyin.com/favicon.ico";
|
||||
|
||||
const url = 'index.html#/check/add?path='+encodeURIComponent(path)+'&title='+encodeURIComponent(window.document.title)+'&url='+encodeURIComponent(window.location.href)+'&icon='+encodeURIComponent(icon_url);
|
||||
|
||||
const ret = await chrome.runtime.sendMessage({action: "redirect","url":url,"tabid":null},);
|
||||
}
|
||||
// document.querySelector("div#root > div > div:nth-of-type(2) > div > div > div:nth-of-type(4) > div > div").appendChild( button );
|
||||
document.body?.appendChild( button );
|
||||
|
||||
}
|
||||
|
||||
// https://m.weibo.cn/profile/5048301588
|
||||
if( host === 'm.weibo.cn' )
|
||||
{
|
||||
const reg = /\/profile\/(.+)/;
|
||||
const id = Array.isArray(pathname.match(reg)) ? pathname.match(reg)[1]:null;
|
||||
console.log( "id", id );
|
||||
if( !id ) return false;
|
||||
const path = ".wb-item:nth-of-type(1)";
|
||||
const ignore_path = ".wb-item .m-text-cut,.wb-item .f-footer-ctrl,.wb-item .card-video";
|
||||
const button = document.createElement("button");
|
||||
button.innerHTML = "监测更新";
|
||||
button.style = button_base_style+"margin-left:10px;";
|
||||
button.onclick = async()=>{
|
||||
|
||||
const icon_url = "https://m.weibo.cn/favicon.ico";
|
||||
|
||||
const url = 'index.html#/check/add?path='+encodeURIComponent(path)+'&title='+encodeURIComponent(window.document.title)+'&url='+encodeURIComponent(window.location.href)+'&icon='+encodeURIComponent(icon_url)+'&ignore_path='+encodeURIComponent(ignore_path);
|
||||
|
||||
const ret = await chrome.runtime.sendMessage({action: "redirect","url":url,"tabid":null},);
|
||||
}
|
||||
// await sleep(1000);
|
||||
// document.querySelector(".prf-handle.m-box").appendChild( button );
|
||||
document.body?.appendChild( button );
|
||||
|
||||
}
|
||||
|
||||
if( host === 'space.bilibili.com' )
|
||||
{
|
||||
const reg = /\/(.+)\/video/;
|
||||
const id = Array.isArray(pathname.match(reg)) ? pathname.match(reg)[1]:null;
|
||||
console.log( "id", id );
|
||||
if( !id ) return false;
|
||||
const path = "div#submit-video-list > ul:nth-of-type(2) > li:nth-of-type(1)";
|
||||
const ignore_path = "div#submit-video-list > ul:nth-of-type(2) > li:nth-of-type(1) .meta";
|
||||
const button = document.createElement("button");
|
||||
button.innerHTML = "监测更新";
|
||||
button.style = button_base_style+"padding:5px;";
|
||||
button.onclick = async()=>{
|
||||
|
||||
const icon_url = "https://space.bilibili.com/favicon.ico";
|
||||
|
||||
const url = 'index.html#/check/add?path='+encodeURIComponent(path)+'&title='+encodeURIComponent(window.document.title)+'&url='+encodeURIComponent(window.location.href)+'&icon='+encodeURIComponent(icon_url)+'&ignore_path='+encodeURIComponent(ignore_path);
|
||||
|
||||
const ret = await chrome.runtime.sendMessage({action: "redirect","url":url,"tabid":null},);
|
||||
}
|
||||
document.body?.appendChild( button );
|
||||
|
||||
}
|
||||
|
||||
// message.bilibili.com
|
||||
if( host === 'message.bilibili.com' )
|
||||
{
|
||||
const reg = /#\/(reply)/;
|
||||
const id = Array.isArray(url.match(reg)) ? url.match(reg)[1]:null;
|
||||
console.log( "id", id );
|
||||
if( !id ) return false;
|
||||
const path = "div#link-message-container > div > div:nth-of-type(2) > div:nth-of-type(2) > div > div > div > div > div > div .center-box";
|
||||
const ignore_path = "div#link-message-container > div > div:nth-of-type(2) > div:nth-of-type(2) > div > div > div > div > div > div .action-field, div#link-message-container > div > div:nth-of-type(2) > div:nth-of-type(2) > div > div > div > div > div > div textarea";
|
||||
const button = document.createElement("button");
|
||||
button.innerHTML = "监测最新回复";
|
||||
button.style = button_base_style+"padding:5px;";
|
||||
button.onclick = async()=>{
|
||||
|
||||
const icon_url = "https://www.bilibili.com/favicon.ico";
|
||||
|
||||
const url = 'index.html#/check/add?path='+encodeURIComponent(path)+'&title='+encodeURIComponent(window.document.title)+'&url='+encodeURIComponent(window.location.href)+'&icon='+encodeURIComponent(icon_url)+'&ignore_path='+encodeURIComponent(ignore_path);
|
||||
|
||||
const ret = await chrome.runtime.sendMessage({action: "redirect","url":url,"tabid":null},);
|
||||
}
|
||||
document.body?.appendChild( button );
|
||||
|
||||
}
|
||||
|
||||
// .ep-list-wrapper .ep-item:last-child
|
||||
if( host === 'www.bilibili.com' )
|
||||
{
|
||||
const reg = /bangumi\/play\/(.+)/;
|
||||
const id = Array.isArray(pathname.match(reg)) ? pathname.match(reg)[1]:null;
|
||||
console.log( "id", id );
|
||||
if( !id ) return false;
|
||||
const path = ".ep-list-wrapper .ep-item:last-child";
|
||||
const ignore_path = ".ep-list-wrapper .ep-item:last-child .badge";
|
||||
const button = document.createElement("button");
|
||||
button.innerHTML = "监测更新";
|
||||
button.style = button_base_style+"padding:5px;";
|
||||
button.onclick = async()=>{
|
||||
|
||||
const icon_url = "https://space.bilibili.com/favicon.ico";
|
||||
|
||||
const url = 'index.html#/check/add?path='+encodeURIComponent(path)+'&title='+encodeURIComponent(window.document.title)+'&url='+encodeURIComponent(window.location.href)+'&icon='+encodeURIComponent(icon_url)+'&ignore_path='+encodeURIComponent(ignore_path);
|
||||
|
||||
const ret = await chrome.runtime.sendMessage({action: "redirect","url":url,"tabid":null},);
|
||||
}
|
||||
document.body?.appendChild( button );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function zcn_insert_button(path)
|
||||
{
|
||||
const button = document.createElement("button");
|
||||
button.innerHTML = "监测价格";
|
||||
button.style = button_base_style+"margin-left:10px;margin-right:10px;";
|
||||
|
||||
button.onclick = async()=>{
|
||||
|
||||
const icon_url = "https://www.amazon.cn/favicon.ico";
|
||||
|
||||
const url = 'index.html#/check/add?path='+encodeURIComponent(path)+'&title='+encodeURIComponent(window.document.title)+'&url='+encodeURIComponent(window.location.href)+'&icon='+encodeURIComponent(icon_url);
|
||||
|
||||
const ret = await chrome.runtime.sendMessage({action: "redirect","url":url,"tabid":null},);
|
||||
}
|
||||
// document.querySelector("#corePriceDisplay_desktop_feature_div .a-price").appendChild( button );
|
||||
document.body?.appendChild( button );
|
||||
}
|
||||
|
||||
|
||||
function jd_insert_button(path)
|
||||
{
|
||||
const button = document.createElement("button");
|
||||
button.style = button_base_style;
|
||||
button.innerHTML = "监测价格";
|
||||
button.onclick = async()=>{
|
||||
|
||||
const icon_url = "https://www.jd.com/favicon.ico";
|
||||
|
||||
const url = 'index.html#/check/add?path='+encodeURIComponent(path)+'&title='+encodeURIComponent(window.document.title)+'&url='+encodeURIComponent(window.location.href)+'&icon='+encodeURIComponent(icon_url);
|
||||
|
||||
const ret = await chrome.runtime.sendMessage({action: "redirect","url":url,"tabid":null},);
|
||||
}
|
||||
// document.querySelector(".p-price").appendChild( button );
|
||||
document.body?.appendChild( button );
|
||||
}
|
||||
|
||||
function sleep(ms) {
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(resolve, ms);
|
||||
});
|
||||
}
|
||||
|
After Width: | Height: | Size: 22 KiB |
@@ -0,0 +1 @@
|
||||
<!doctype html><html lang="zh-cn"><head><meta charset="utf-8"/><link rel="icon" href="/logo.color.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="web content monitor"/><link rel="apple-touch-icon" href="logo.color.png"/><link rel="manifest" href="/manifest.json"/><title>...</title><link rel="stylesheet" href="/tailwind.min.css"><link href="/static/css/2.65280f5c.chunk.css" rel="stylesheet"><link href="/static/css/main.0e42becb.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script src="/static/js/runtime-main.17191aad.js"></script><script src="/static/js/2.465e7d2f.chunk.js"></script><script src="/static/js/main.b985a5e4.chunk.js"></script></body></html>
|
||||
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"manifest_version": 3,
|
||||
"name": "__MSG_appTitle__",
|
||||
"description": "__MSG_appDesc__",
|
||||
"default_locale": "zh_CN",
|
||||
"version": "0.9.6",
|
||||
"icons": {
|
||||
"512": "logo.color.png"
|
||||
},
|
||||
"action": {
|
||||
"default_title": "Check酱"
|
||||
},
|
||||
"permissions": [
|
||||
"cookies","scripting","tabs","notifications","storage", "alarms","contextMenus","debugger","unlimitedStorage"
|
||||
],
|
||||
"host_permissions": [
|
||||
"http://*/*","https://*/*"
|
||||
],
|
||||
"content_security_policy": {
|
||||
"extension_pages": "script-src 'self'; object-src 'self'; script-src-elem 'self' 'unsafe-inline';"
|
||||
},
|
||||
"background": {
|
||||
"service_worker": "start.js",
|
||||
"type": "module"
|
||||
}
|
||||
,
|
||||
"content_scripts": [{
|
||||
"js": ["dom-inspector.min.js","content.js"],
|
||||
"matches": ["http://*/*","https://*/*"]
|
||||
}]
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
# 教程
|
||||
|
||||
| 📼 新版使用 | 📼 完全教程 |
|
||||
| --- | --- |
|
||||
| [① 新版使用·B站·20分钟](https://www.bilibili.com/video/BV1vT411E7JV) | [② 完全教程·B站·近2小时](https://www.bilibili.com/video/BV1K94y1m7tt) |
|
||||
|
||||
# RSS
|
||||
|
||||
> Check酱支持订阅RSS内容。配合[RSS Hub](https://github.com/DIYgod/RSSHub)可以监测上千内容源。
|
||||
|
||||
| 推荐RSS源 | 浏览器自动发现插件 | 视频教程 |
|
||||
| --- | --- | --- |
|
||||
| [RssHub官网🪜](https://docs.rsshub.app/) | RSSHub浏览器插件Check酱整合版[ GitHub下载🪜](https://github.com/easychen/RSSHub-Radar-with-checkchan/releases/tag/main) | [B站·Check酱+RSSHub使用教程](https://www.bilibili.com/video/BV1JY4y1P71b) |
|
||||
|
||||
# 电商
|
||||
|
||||
##  京东·监测价格
|
||||
|
||||
| 📱 手机 | 💻 电脑 | 📺 平板电视 | 📖 图书 | 其他商品 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| [小米12S Ultra](https://u.jd.com/HwsX0Ef) | [MacMini M1版](https://u.jd.com/HLshflX) | [红米86寸超大屏](https://u.jd.com/HLbIZom)| [《三体》全集](https://u.jd.com/HwbsWql) | 🔍 [搜索](https://search.jd.com/Search?keyword=%E6%95%B0%E5%AD%97%E9%94%AE%E7%9B%98%E6%97%A0%E7%BA%BF) |
|
||||
|
||||
> ⚠️ 支持电脑版商品页面( 网址如 item.jd.com/***.html ),通过左下角「监测价格」按钮添加任务
|
||||
|
||||
---
|
||||
|
||||
##  亚马逊·海外购
|
||||
|
||||
| 💾 硬盘 | 🧸 玩具 | 💿 数码 | 其他商品 |
|
||||
| --- | --- | --- | --- |
|
||||
| [WD18T硬盘](https://www.amazon.cn/dp/B08KY32HFR) | [柯南拼图](https://www.amazon.cn/dp/B076KJGKDW) | [Chromecast3播放器](https://www.amazon.cn/dp/B07KC5GS5J) | 🔍 [搜索](https://www.amazon.cn/s?k=%E7%BE%8E%E6%B5%93%E7%83%A7) |
|
||||
|
||||
> ⚠️ 支持电脑版商品页面( 网址如 www.amazon.cn/dp/*** ),通过左下角「监测价格」按钮添加任务
|
||||
|
||||
# 社交媒体
|
||||
|
||||
##  微博
|
||||
|
||||
| 🎈 作者 | 👨🏻🏫 教育 | ⚒️ 创造 | 🍛 美食 | 🎹 音乐 | 其他账号 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| [Easy](https://m.weibo.cn/profile/1088413295) | [李永乐老师](https://m.weibo.cn/profile/3325704142) | [手工耿](https://m.weibo.cn/profile/3108949955) | [美食作家王刚](https://m.weibo.cn/profile/6288254740) | [刘若英](https://m.weibo.cn/profile/1681213010) | 🔍 [搜索](https://m.weibo.cn/search?containerid=100103type%3D1%26q%3D%E6%96%B0%E7%9F%A5%E5%8D%9A%E4%B8%BB) ·「用户」标签页 |
|
||||
|
||||
> ⚠️ 支持H5版微博用户页面( 网址如 m.weibo.cn/profile/$UID ),通过左下角「监测更新」按钮添加任务
|
||||
|
||||
---
|
||||
|
||||
##  微信·订阅号
|
||||
|
||||
| 💾 软件 | 🚀 效率 | 🥘 美食 | 其他账号 |
|
||||
| --- | --- | --- | --- |
|
||||
| [小众软件](https://weixin.sogou.com/weixin?type=1&s_from=input&query=appinncom&ie=utf8&_sug_=n&_sug_type_=)| [少数派](https://weixin.sogou.com/weixin?type=1&s_from=input&query=sspaime&ie=utf8&_sug_=n&_sug_type_=&w=01019900&sut=1319&sst0=1658764155615&lkt=0%2C0%2C0) | [美食台](https://weixin.sogou.com/weixin?type=1&s_from=input&query=foodvideo&ie=utf8&_sug_=n&_sug_type_=&w=01019900&sut=1664&sst0=1658764610151&lkt=0%2C0%2C0) | 🔍 [搜索](https://weixin.sogou.com/weixin?type=1&s_from=input&query=fangtangtongxue&ie=utf8&_sug_=y&_sug_type_=&w=01019900&sut=2508&sst0=1658730700552&lkt=0%2C0%2C0) |
|
||||
|
||||
> ⚠️ 搜狗搜索结果页面,通过左下角「监测最新文章」按钮添加任务
|
||||
|
||||
|
||||
# 视频
|
||||
|
||||
##  B站·UP主最新视频
|
||||
|
||||
| 🎈 作者 | 其他账号 |
|
||||
| --- | --- |
|
||||
| [方糖气球](https://space.bilibili.com/10185878/video) | 🔍 [搜索](https://search.bilibili.com/upuser?keyword=%E6%96%B9%E7%B3%96%E6%B0%94%E7%90%83) ·「TA的视频」标签页 |
|
||||
|
||||
> 搜索结果点账号进主页 →「TA的视频」( space.bilibili.com/***/video ),点左下角「监测更新」按钮添加任务
|
||||
|
||||
---
|
||||
|
||||
##  B站·番剧更新
|
||||
|
||||
| 👻 悬疑 | ✨ 特效 | 更多番剧 |
|
||||
| --- | --- | --- |
|
||||
| [夏日重现](https://www.bilibili.com/bangumi/play/ss41417) | [凡人修仙传](https://www.bilibili.com/bangumi/play/ss28747) | 🔍 [搜索](https://search.bilibili.com/bangumi?keyword=%E8%BE%89%E5%A4%9C%E5%A4%A7%E5%B0%8F%E5%A7%90) |
|
||||
|
||||
> 搜索结果点账号进主页 →「TA的视频」( www.bilibili.com/bangumi/play/*** ),点左下角「监测更新」按钮添加任务
|
||||
|
||||
---
|
||||
|
||||
##  抖音·作品总数
|
||||
|
||||
| 🥘 美食 | 其他账号 |
|
||||
| --- | --- |
|
||||
| [【寻真味】佬美](https://www.douyin.com/user/MS4wLjABAAAAHwf1DAfgUg4cxizx9nLC1JozAR1P-jGOhagrX9pgLz8) | 🔍 [搜索](https://www.douyin.com/search/%E5%AF%BB%E7%9C%9F%E5%91%B3?source=switch_tab&type=user) |
|
||||
|
||||
> 搜索结果点账号进主页( www.douyin.com/user/*** ),点左下角「监测作品总数」按钮添加任务
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
self.__precacheManifest = (self.__precacheManifest || []).concat([
|
||||
{
|
||||
"revision": "5d3f01c97c0ab12bae7a5f7e1674e402",
|
||||
"url": "/index.html"
|
||||
},
|
||||
{
|
||||
"revision": "5c12cce1404dabf49f3a",
|
||||
"url": "/static/css/2.65280f5c.chunk.css"
|
||||
},
|
||||
{
|
||||
"revision": "f861aed79b16d1b199fd",
|
||||
"url": "/static/css/main.0e42becb.chunk.css"
|
||||
},
|
||||
{
|
||||
"revision": "5c12cce1404dabf49f3a",
|
||||
"url": "/static/js/2.465e7d2f.chunk.js"
|
||||
},
|
||||
{
|
||||
"revision": "f861aed79b16d1b199fd",
|
||||
"url": "/static/js/main.b985a5e4.chunk.js"
|
||||
},
|
||||
{
|
||||
"revision": "4d30565b04f5f2725c56",
|
||||
"url": "/static/js/runtime-main.17191aad.js"
|
||||
},
|
||||
{
|
||||
"revision": "05f1cdadfe476395f60e233b15c22155",
|
||||
"url": "/static/media/icons-16.05f1cdad.eot"
|
||||
},
|
||||
{
|
||||
"revision": "3c1c220e7a18286503fb431c7a7fe183",
|
||||
"url": "/static/media/icons-16.3c1c220e.woff"
|
||||
},
|
||||
{
|
||||
"revision": "3cde8748332d1de6b1ae1c2dc5850754",
|
||||
"url": "/static/media/icons-16.3cde8748.ttf"
|
||||
},
|
||||
{
|
||||
"revision": "0a5c76518a68c185baa2c6744456918c",
|
||||
"url": "/static/media/icons-20.0a5c7651.eot"
|
||||
},
|
||||
{
|
||||
"revision": "51ec31f302d0072808e1f83f85fea4cd",
|
||||
"url": "/static/media/icons-20.51ec31f3.ttf"
|
||||
},
|
||||
{
|
||||
"revision": "cef8cdbb9d0ba82e6e19fb0eeba2ac3d",
|
||||
"url": "/static/media/icons-20.cef8cdbb.woff"
|
||||
}
|
||||
]);
|
||||
@@ -0,0 +1,2 @@
|
||||
# https://www.robotstxt.org/robotstxt.html
|
||||
User-agent: *
|
||||
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* Welcome to your Workbox-powered service worker!
|
||||
*
|
||||
* You'll need to register this file in your web app and you should
|
||||
* disable HTTP caching for this file too.
|
||||
* See https://goo.gl/nhQhGp
|
||||
*
|
||||
* The rest of the code is auto-generated. Please don't update this file
|
||||
* directly; instead, make changes to your Workbox build configuration
|
||||
* and re-run your build process.
|
||||
* See https://goo.gl/2aRDsh
|
||||
*/
|
||||
|
||||
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");
|
||||
|
||||
importScripts(
|
||||
"/precache-manifest.0fd7de5395cfc4062a9344bfcc8632d5.js"
|
||||
);
|
||||
|
||||
self.addEventListener('message', (event) => {
|
||||
if (event.data && event.data.type === 'SKIP_WAITING') {
|
||||
self.skipWaiting();
|
||||
}
|
||||
});
|
||||
|
||||
workbox.core.clientsClaim();
|
||||
|
||||
/**
|
||||
* The workboxSW.precacheAndRoute() method efficiently caches and responds to
|
||||
* requests for URLs in the manifest.
|
||||
* See https://goo.gl/S9QRab
|
||||
*/
|
||||
self.__precacheManifest = [].concat(self.__precacheManifest || []);
|
||||
workbox.precaching.precacheAndRoute(self.__precacheManifest, {});
|
||||
|
||||
workbox.routing.registerNavigationRoute(workbox.precaching.getCacheKeyForURL("/index.html"), {
|
||||
|
||||
blacklist: [/^\/_/,/\/[^/?]+\.[^/]+$/],
|
||||
});
|
||||
@@ -0,0 +1,4 @@
|
||||
import './background.js';
|
||||
// importScripts('background.js');
|
||||
// importScripts('background.js','check.js');
|
||||
//code
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){function t(t){for(var n,p,f=t[0],l=t[1],a=t[2],c=0,s=[];c<f.length;c++)p=f[c],Object.prototype.hasOwnProperty.call(o,p)&&o[p]&&s.push(o[p][0]),o[p]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n]);for(i&&i(t);s.length;)s.shift()();return u.push.apply(u,a||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,f=1;f<r.length;f++){var l=r[f];0!==o[l]&&(n=!1)}n&&(u.splice(t--,1),e=p(p.s=r[0]))}return e}var n={},o={1:0},u=[];function p(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,p),r.l=!0,r.exports}p.m=e,p.c=n,p.d=function(e,t,r){p.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},p.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},p.t=function(e,t){if(1&t&&(e=p(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(p.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)p.d(r,n,function(t){return e[t]}.bind(null,n));return r},p.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(t,"a",t),t},p.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p.p="/";var f=this["webpackJsonpft-app"]=this["webpackJsonpft-app"]||[],l=f.push.bind(f);f.push=t,f=f.slice();for(var a=0;a<f.length;a++)t(f[a]);var i=l;r()}([]);
|
||||
@@ -1 +1 @@
|
||||
"2022.08.10.00.19"
|
||||
"2022.08.11.00.16"
|
||||
@@ -66,7 +66,7 @@ for( const item of to_checks )
|
||||
check_content = ret.value;
|
||||
|
||||
// 添加正则替换
|
||||
if( item.replace_from_regex && item.replace_to_regex ) check_content = check_content.replace( new RegExp(item.replace_from_regex), item.replace_to_regex );
|
||||
if( item.replace_from_regex && item.replace_to_regex ) check_content = check_content.replace( new RegExp(item.replace_from_regex,'img'), item.replace_to_regex );
|
||||
|
||||
|
||||
if( ret.html ) check_html = ret.html;
|
||||
@@ -123,7 +123,7 @@ for( const item of to_checks )
|
||||
if( item.compare_type == 'regex' )
|
||||
{
|
||||
logit("正则匹配模式");
|
||||
if( item.regex && !check_content.match( new RegExp(item.regex, 'i') ) )
|
||||
if( item.regex && !check_content.match( new RegExp(item.regex, 'img') ) )
|
||||
{
|
||||
can_send_notice = false;
|
||||
logit( '通知正则不匹配,不发送通知' );
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"message": "Check酱"
|
||||
},
|
||||
"appDesc": {
|
||||
"message": "监控页面变动,并发送异动到微信。 Build.2022.08.10.01.22",
|
||||
"message": "监控页面变动,并发送异动到微信。 Build.2022.08.11.00.33",
|
||||
"description":"亦支持http status、json和rss监测。配合自架云端,关电脑后也能运行。"
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"files": {
|
||||
"main.css": "/static/css/main.0e42becb.chunk.css",
|
||||
"main.js": "/static/js/main.b985a5e4.chunk.js",
|
||||
"main.js": "/static/js/main.68bf6237.chunk.js",
|
||||
"runtime-main.js": "/static/js/runtime-main.17191aad.js",
|
||||
"static/css/2.65280f5c.chunk.css": "/static/css/2.65280f5c.chunk.css",
|
||||
"static/js/2.465e7d2f.chunk.js": "/static/js/2.465e7d2f.chunk.js",
|
||||
"index.html": "/index.html",
|
||||
"precache-manifest.0fd7de5395cfc4062a9344bfcc8632d5.js": "/precache-manifest.0fd7de5395cfc4062a9344bfcc8632d5.js",
|
||||
"precache-manifest.1e7d90fbe055e64af8228be64c56f360.js": "/precache-manifest.1e7d90fbe055e64af8228be64c56f360.js",
|
||||
"service-worker.js": "/service-worker.js",
|
||||
"static/media/index.scss": "/static/media/icons-20.cef8cdbb.woff"
|
||||
},
|
||||
@@ -15,6 +15,6 @@
|
||||
"static/css/2.65280f5c.chunk.css",
|
||||
"static/js/2.465e7d2f.chunk.js",
|
||||
"static/css/main.0e42becb.chunk.css",
|
||||
"static/js/main.b985a5e4.chunk.js"
|
||||
"static/js/main.68bf6237.chunk.js"
|
||||
]
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
<!doctype html><html lang="zh-cn"><head><meta charset="utf-8"/><link rel="icon" href="/logo.color.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="web content monitor"/><link rel="apple-touch-icon" href="logo.color.png"/><link rel="manifest" href="/manifest.json"/><title>...</title><link rel="stylesheet" href="/tailwind.min.css"><link href="/static/css/2.65280f5c.chunk.css" rel="stylesheet"><link href="/static/css/main.0e42becb.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script src="/static/js/runtime-main.17191aad.js"></script><script src="/static/js/2.465e7d2f.chunk.js"></script><script src="/static/js/main.b985a5e4.chunk.js"></script></body></html>
|
||||
<!doctype html><html lang="zh-cn"><head><meta charset="utf-8"/><link rel="icon" href="/logo.color.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="web content monitor"/><link rel="apple-touch-icon" href="logo.color.png"/><link rel="manifest" href="/manifest.json"/><title>...</title><link rel="stylesheet" href="/tailwind.min.css"><link href="/static/css/2.65280f5c.chunk.css" rel="stylesheet"><link href="/static/css/main.0e42becb.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script src="/static/js/runtime-main.17191aad.js"></script><script src="/static/js/2.465e7d2f.chunk.js"></script><script src="/static/js/main.68bf6237.chunk.js"></script></body></html>
|
||||
@@ -0,0 +1,50 @@
|
||||
self.__precacheManifest = (self.__precacheManifest || []).concat([
|
||||
{
|
||||
"revision": "030eaaae594a05adec58dcdd9c7d752d",
|
||||
"url": "/index.html"
|
||||
},
|
||||
{
|
||||
"revision": "5c12cce1404dabf49f3a",
|
||||
"url": "/static/css/2.65280f5c.chunk.css"
|
||||
},
|
||||
{
|
||||
"revision": "8c5085615145c1bcf03b",
|
||||
"url": "/static/css/main.0e42becb.chunk.css"
|
||||
},
|
||||
{
|
||||
"revision": "5c12cce1404dabf49f3a",
|
||||
"url": "/static/js/2.465e7d2f.chunk.js"
|
||||
},
|
||||
{
|
||||
"revision": "8c5085615145c1bcf03b",
|
||||
"url": "/static/js/main.68bf6237.chunk.js"
|
||||
},
|
||||
{
|
||||
"revision": "4d30565b04f5f2725c56",
|
||||
"url": "/static/js/runtime-main.17191aad.js"
|
||||
},
|
||||
{
|
||||
"revision": "05f1cdadfe476395f60e233b15c22155",
|
||||
"url": "/static/media/icons-16.05f1cdad.eot"
|
||||
},
|
||||
{
|
||||
"revision": "3c1c220e7a18286503fb431c7a7fe183",
|
||||
"url": "/static/media/icons-16.3c1c220e.woff"
|
||||
},
|
||||
{
|
||||
"revision": "3cde8748332d1de6b1ae1c2dc5850754",
|
||||
"url": "/static/media/icons-16.3cde8748.ttf"
|
||||
},
|
||||
{
|
||||
"revision": "0a5c76518a68c185baa2c6744456918c",
|
||||
"url": "/static/media/icons-20.0a5c7651.eot"
|
||||
},
|
||||
{
|
||||
"revision": "51ec31f302d0072808e1f83f85fea4cd",
|
||||
"url": "/static/media/icons-20.51ec31f3.ttf"
|
||||
},
|
||||
{
|
||||
"revision": "cef8cdbb9d0ba82e6e19fb0eeba2ac3d",
|
||||
"url": "/static/media/icons-20.cef8cdbb.woff"
|
||||
}
|
||||
]);
|
||||
@@ -14,7 +14,7 @@
|
||||
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");
|
||||
|
||||
importScripts(
|
||||
"/precache-manifest.0fd7de5395cfc4062a9344bfcc8632d5.js"
|
||||
"/precache-manifest.1e7d90fbe055e64af8228be64c56f360.js"
|
||||
);
|
||||
|
||||
self.addEventListener('message', (event) => {
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
</ol>
|
||||
<h2>最新版本</h2>
|
||||
<ul>
|
||||
<li>插件·Chrome/Edge:2022.08.10.01.22 <a href="ckc.zip">下载</a> (<a href="https://github.com/easychen/checkchan-dist/raw/master/ckc.zip">Github下载地址,无需注册</a>)</li>
|
||||
<li>Docker镜像(云端+远程桌面二合一):2022.08.10.00.19 <a href="https://hub.docker.com/repository/docker/easychen/checkchan" rel="nofollow">Docker Hub</a></li>
|
||||
<li>文档:2022.08.10.01.22</li>
|
||||
<li>插件·Chrome/Edge:2022.08.11.00.33 <a href="ckc.zip">下载</a> (<a href="https://github.com/easychen/checkchan-dist/raw/master/ckc.zip">Github下载地址,无需注册</a>)</li>
|
||||
<li>Docker镜像(云端+远程桌面二合一):2022.08.11.00.16 <a href="https://hub.docker.com/repository/docker/easychen/checkchan" rel="nofollow">Docker Hub</a></li>
|
||||
<li>文档:2022.08.11.00.33</li>
|
||||
<li>更新日志:<a href="https://github.com/easychen/checkchan-dist/commits/main">GitHub</a></li>
|
||||
<li>生态:RSSHub浏览器插件整合版(<a href="https://github.com/easychen/RSSHub-Radar-with-checkchan">源码</a> | <a href="https://github.com/easychen/RSSHub-Radar-with-checkchan/releases/download/main/1.7.0.with-checkchan.zip">下载</a>)</li>
|
||||
</ul>
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
</ol>
|
||||
<h2>最新版本</h2>
|
||||
<ul>
|
||||
<li>插件·Chrome/Edge:2022.08.10.01.22 <a href="ckc.zip">下载</a> (<a href="https://github.com/easychen/checkchan-dist/raw/master/ckc.zip">Github下载地址,无需注册</a>)</li>
|
||||
<li>Docker镜像(云端+远程桌面二合一):2022.08.10.00.19 <a href="https://hub.docker.com/repository/docker/easychen/checkchan" rel="nofollow">Docker Hub</a></li>
|
||||
<li>文档:2022.08.10.01.22</li>
|
||||
<li>插件·Chrome/Edge:2022.08.11.00.33 <a href="ckc.zip">下载</a> (<a href="https://github.com/easychen/checkchan-dist/raw/master/ckc.zip">Github下载地址,无需注册</a>)</li>
|
||||
<li>Docker镜像(云端+远程桌面二合一):2022.08.11.00.16 <a href="https://hub.docker.com/repository/docker/easychen/checkchan" rel="nofollow">Docker Hub</a></li>
|
||||
<li>文档:2022.08.11.00.33</li>
|
||||
<li>更新日志:<a href="https://github.com/easychen/checkchan-dist/commits/main">GitHub</a></li>
|
||||
<li>生态:RSSHub浏览器插件整合版(<a href="https://github.com/easychen/RSSHub-Radar-with-checkchan">源码</a> | <a href="https://github.com/easychen/RSSHub-Radar-with-checkchan/releases/download/main/1.7.0.with-checkchan.zip">下载</a>)</li>
|
||||
</ul>
|
||||
|
||||