vault backup: 2026-11-06 20:21:12
This commit is contained in:
1 parent
2c6569dbdf
commit
c2f97640b7
5 files changed
+107
-6
No files matched your search
@@ -0,0 +1,19 @@
|
||||
(async () => {
|
||||
const sleep = ms => new Promise(r => setTimeout(r, ms));
|
||||
const out = { href: '', title: '', found: [], body: '' };
|
||||
out.href = location.href;
|
||||
out.title = document.title;
|
||||
const txt = (document.body ? document.body.innerText : '') || '';
|
||||
out.body = txt.replace(/\s+/g, ' ').slice(0, 20000);
|
||||
// 找含关键词的段落
|
||||
const kw = ['重复铺货', '重复发布', '重复商品', '同款', '相同商品', '铺货'];
|
||||
const lines = txt.split('\n').map(s => s.trim()).filter(Boolean);
|
||||
for (const kwd of kw) {
|
||||
for (const l of lines) {
|
||||
if (l.includes(kwd)) out.found.push({ kw: kwd, line: l.slice(0, 500) });
|
||||
}
|
||||
}
|
||||
out.linkCount = document.querySelectorAll('a[href]').length;
|
||||
out.links = Array.from(document.querySelectorAll('a[href]')).map(a => ({ t: (a.innerText||'').trim(), h: a.getAttribute('href') })).filter(x => x.t).slice(0, 60);
|
||||
return out;
|
||||
})()
|
||||
Reference in new issue
Block a user