diff --git a/packages/copy-currency/meta.json b/packages/copy-currency/meta.json index f57378a..a19ca7a 100644 --- a/packages/copy-currency/meta.json +++ b/packages/copy-currency/meta.json @@ -1,28 +1,21 @@ { - "name": { - "default": "🔥🔥🔥文本选中复制(通用)🔥🔥🔥", - "en": "Text Copy Universal", - "zh-CN": "🔥🔥🔥文本选中复制(通用)🔥🔥🔥" - }, - "namespace": "https://github.com/WindrunnerMax/TKScript", - "version": "1.1.2", - "description": { - "default": "文本选中复制通用版本,适用于大多数网站", - "en": "Text copy general version, suitable for most websites.", - "zh-CN": "文本选中复制通用版本,适用于大多数网站" - }, - "author": "Czy", - "match": [ - "http://*/*", - "https://*/*" - ], - "supportURL": "https://github.com/WindrunnerMax/TKScript/issues", - "license": "GPL License", - "installURL": "https://github.com/WindrunnerMax/TKScript", - "run-at": "document-end", - "grant": [ - "GM_registerMenuCommand", - "GM_unregisterMenuCommand", - "GM_notification" - ] -} \ No newline at end of file + "name": { + "default": "🔥🔥🔥文本选中复制(通用)🔥🔥🔥", + "en": "Text Copy Universal", + "zh-CN": "🔥🔥🔥文本选中复制(通用)🔥🔥🔥" + }, + "namespace": "https://github.com/WindrunnerMax/TKScript", + "version": "1.1.2", + "description": { + "default": "文本选中复制通用版本,适用于大多数网站", + "en": "Text copy general version, suitable for most websites.", + "zh-CN": "文本选中复制通用版本,适用于大多数网站" + }, + "author": "Czy", + "match": ["http://*/*", "https://*/*"], + "supportURL": "https://github.com/WindrunnerMax/TKScript/issues", + "license": "GPL License", + "installURL": "https://github.com/WindrunnerMax/TKScript", + "run-at": "document-end", + "grant": ["GM_registerMenuCommand", "GM_unregisterMenuCommand", "GM_notification"] +} diff --git a/packages/copy/meta.json b/packages/copy/meta.json index cd5af57..ac5065c 100644 --- a/packages/copy/meta.json +++ b/packages/copy/meta.json @@ -1,112 +1,109 @@ { - "name": "🔥🔥🔥文本选中复制🔥🔥🔥", - "namespace": "https://github.com/WindrunnerMax/TKScript", - "version": "6.2.8", - "description": "解除网站不允许复制的限制,文本选中后点击复制按钮即可复制,主要用于 百度文库 道客巴巴 腾讯文档 豆丁网 无忧考网 学习啦 蓬勃范文 思否社区 力扣 知乎 语雀 等", - "author": "Czy", - "match": [ - "*://wenku.baidu.com/view/*", - "*://wenku.baidu.com/share/*", - "*://wenku.baidu.com/link*", - "*://wenku.baidu.com/aggs/*", - "*://wenku.baidu.com/ndPureView/*", - "*://www.51test.net/show/*", - "*://www.xuexi.la/*", - "*://www.xuexila.com/*", - "*://www.cspengbo.com/*", - "*://*.doc88.com/*", - "*://segmentfault.com/*", - "*://wk.baidu.com/view/*", - "*://leetcode-cn.com/problems/*", - "*://leetcode.cn/problems/*", - "*://*.zhihu.com/*", - "*://z.30edu.com.cn/*", - "*://docs.qq.com/doc/*", - "*://docs.qq.com/sheet/*", - "*://docs.qq.com/slide/*", - "*://boke112.com/post/*", - "*://*.yuque.com/*", - "*://www.commandlinux.com/*", - "*://*.diyifanwen.com/*", - "*://*.mbalib.com/*", - "*://*.cnitpm.com/*", - "*://bbs.mihoyo.com/ys/*", - "*://*.ruiwen.com/*", - "*://www.uemeds.cn/*", - "*://www.oh100.com/*", - "*://www.aiyuke.com/news/*", - "*://www.fwsir.com/*", - "*://www.wenxm.cn/*", - "*://www.unjs.com/*", - "*://www.ahsrst.cn/*", - "*://*.yjbys.com/*", - "*://*.qidian.com/*", - "*://*.zongheng.com/*", - "*://*.17k.com/*", - "*://*.ciweimao.com/*", - "*://book.qq.com/*", - "*://*.360doc.com/content/*", - "*://*.850500.com/news/*", - "*://utaten.com/lyric/*", - "*://*.jianbiaoku.com/*", - "*://*.kt250.com/*", - "*://www.kejudati.com/*", - "*://*.xiaohongshu.com/discovery/*", - "*://*.baibeike.com/*", - "*://*.blog.csdn.net/*", - "*://*.bilibili.com/read/*", - "*://*.cnki.net/KXReader/*", - "*://*.cnrencai.com/*", - "*://*.kodiplayer.cn/*", - "*://tongxiehui.net/*", - "*://*.jianshu.com/p/*", - "*://*.linovelib.com/novel/*", - "*://*.wjx.cn/*", - "*://*.wjx.top/*", - "*://*.chazidian.com/*", - "*://*.juejin.cn/post/*", - "*://*.zgbk.com/ecph/*", - "*://*.wenmi.com/article/*", - "*://yuedu.baidu.com/*", - "*://www.inrrp.com.cn/*", - "*://fanyi.baidu.com/mtpe/*", - "*://www.shubaoc.com/*", - "*://blog.51cto.com/*", - "*://www.ximalaya.com/*", - "*://*.tianqi.com/*", - "*://*.xiexiebang.com/*", - "*://*.docin.com/*", - "*://*.ddwk8.cn/*", - "*://*.php.cn/*", - "*://cooco.net.cn/*", - "*://fanqienovel.com/*", - "*://*.mobiletrain.org/*", - "*://*.examcoo.com/*", - "*://*.rrdynb.com/*", - "*://*.fuwu7.com/*", - "*://*.xiangqiqipu.com/*", - "*://note.youdao.com/*", - "*://*.163.com/*", - "*://*.aipiaxi.com/*", - "*://wenku.csdn.net/*", - "*://www.kdocs.cn/*", - "*://www.xiaoyuzhoufm.com/*", - "*://*.mcmod.cn/*", - "*://*.zsxq.com/", - "*://*.volcengine.com/*", - "*://*.lyrical-nonsense.com/*", - "*://*.xueqiu.com/*", - "*://*.php.cn/*", - "*://*.51cto.com/*", - "*://*.educoder.net/*" - ], - "supportURL": "https://github.com/WindrunnerMax/TKScript/issues", - "license": "GPL License", - "installURL": "https://github.com/WindrunnerMax/TKScript", - "run-at": "document-start", - "grant": [ - "unsafeWindow", - "GM_xmlhttpRequest" - ], - "connect": "res3.doc88.com" + "name": "🔥🔥🔥文本选中复制🔥🔥🔥", + "namespace": "https://github.com/WindrunnerMax/TKScript", + "version": "6.2.8", + "description": "解除网站不允许复制的限制,文本选中后点击复制按钮即可复制,主要用于 百度文库 道客巴巴 腾讯文档 豆丁网 无忧考网 学习啦 蓬勃范文 思否社区 力扣 知乎 语雀 等", + "author": "Czy", + "match": [ + "*://wenku.baidu.com/view/*", + "*://wenku.baidu.com/share/*", + "*://wenku.baidu.com/link*", + "*://wenku.baidu.com/aggs/*", + "*://wenku.baidu.com/ndPureView/*", + "*://www.51test.net/show/*", + "*://www.xuexi.la/*", + "*://www.xuexila.com/*", + "*://www.cspengbo.com/*", + "*://*.doc88.com/*", + "*://segmentfault.com/*", + "*://wk.baidu.com/view/*", + "*://leetcode-cn.com/problems/*", + "*://leetcode.cn/problems/*", + "*://*.zhihu.com/*", + "*://z.30edu.com.cn/*", + "*://docs.qq.com/doc/*", + "*://docs.qq.com/sheet/*", + "*://docs.qq.com/slide/*", + "*://boke112.com/post/*", + "*://*.yuque.com/*", + "*://www.commandlinux.com/*", + "*://*.diyifanwen.com/*", + "*://*.mbalib.com/*", + "*://*.cnitpm.com/*", + "*://bbs.mihoyo.com/ys/*", + "*://*.ruiwen.com/*", + "*://www.uemeds.cn/*", + "*://www.oh100.com/*", + "*://www.aiyuke.com/news/*", + "*://www.fwsir.com/*", + "*://www.wenxm.cn/*", + "*://www.unjs.com/*", + "*://www.ahsrst.cn/*", + "*://*.yjbys.com/*", + "*://*.qidian.com/*", + "*://*.zongheng.com/*", + "*://*.17k.com/*", + "*://*.ciweimao.com/*", + "*://book.qq.com/*", + "*://*.360doc.com/content/*", + "*://*.850500.com/news/*", + "*://utaten.com/lyric/*", + "*://*.jianbiaoku.com/*", + "*://*.kt250.com/*", + "*://www.kejudati.com/*", + "*://*.xiaohongshu.com/discovery/*", + "*://*.baibeike.com/*", + "*://*.blog.csdn.net/*", + "*://*.bilibili.com/read/*", + "*://*.cnki.net/KXReader/*", + "*://*.cnrencai.com/*", + "*://*.kodiplayer.cn/*", + "*://tongxiehui.net/*", + "*://*.jianshu.com/p/*", + "*://*.linovelib.com/novel/*", + "*://*.wjx.cn/*", + "*://*.wjx.top/*", + "*://*.chazidian.com/*", + "*://*.juejin.cn/post/*", + "*://*.zgbk.com/ecph/*", + "*://*.wenmi.com/article/*", + "*://yuedu.baidu.com/*", + "*://www.inrrp.com.cn/*", + "*://fanyi.baidu.com/mtpe/*", + "*://www.shubaoc.com/*", + "*://blog.51cto.com/*", + "*://www.ximalaya.com/*", + "*://*.tianqi.com/*", + "*://*.xiexiebang.com/*", + "*://*.docin.com/*", + "*://*.ddwk8.cn/*", + "*://*.php.cn/*", + "*://cooco.net.cn/*", + "*://fanqienovel.com/*", + "*://*.mobiletrain.org/*", + "*://*.examcoo.com/*", + "*://*.rrdynb.com/*", + "*://*.fuwu7.com/*", + "*://*.xiangqiqipu.com/*", + "*://note.youdao.com/*", + "*://*.163.com/*", + "*://*.aipiaxi.com/*", + "*://wenku.csdn.net/*", + "*://www.kdocs.cn/*", + "*://www.xiaoyuzhoufm.com/*", + "*://*.mcmod.cn/*", + "*://*.zsxq.com/", + "*://*.volcengine.com/*", + "*://*.lyrical-nonsense.com/*", + "*://*.xueqiu.com/*", + "*://*.php.cn/*", + "*://*.51cto.com/*", + "*://*.educoder.net/*" + ], + "supportURL": "https://github.com/WindrunnerMax/TKScript/issues", + "license": "GPL License", + "installURL": "https://github.com/WindrunnerMax/TKScript", + "run-at": "document-start", + "grant": ["unsafeWindow", "GM_xmlhttpRequest"], + "connect": "res3.doc88.com" } diff --git a/packages/site-director/meta.json b/packages/site-director/meta.json index 5db8fa8..7519517 100644 --- a/packages/site-director/meta.json +++ b/packages/site-director/meta.json @@ -1,25 +1,22 @@ { - "name": "🔥🔥🔥跳转链接直达🔥🔥🔥", - "namespace": "https://github.com/WindrunnerMax/TKScript", - "version": "1.3.3", - "description": "跳转链接直达,去掉确定跳转链接页面,用于谷歌、知乎、CSDN、简书", - "author": "Czy", - "match": [ - "*://*.google.com/*", - "*://*.google.com.cn/*", - "*://*.google.com.hk/*", - "*://link.zhihu.com/*", - "*://link.csdn.net/*", - "*://link.juejin.cn/*", - "*://www.jianshu.com/go-wild/*", - "*://mail.qq.com/cgi-bin/readtemplate/*" - ], - "license": "MIT License", - "supportURL": "https://github.com/WindrunnerMax/TKScript/issues", - "installURL": "https://github.com/WindrunnerMax/TKScript", - "grant": [ - "unsafeWindow", - "GM_xmlhttpRequest" - ], - "run-at": "document-start" -} \ No newline at end of file + "name": "🔥🔥🔥跳转链接直达🔥🔥🔥", + "namespace": "https://github.com/WindrunnerMax/TKScript", + "version": "1.3.3", + "description": "跳转链接直达,去掉确定跳转链接页面,用于谷歌、知乎、CSDN、简书", + "author": "Czy", + "match": [ + "*://*.google.com/*", + "*://*.google.com.cn/*", + "*://*.google.com.hk/*", + "*://link.zhihu.com/*", + "*://link.csdn.net/*", + "*://link.juejin.cn/*", + "*://www.jianshu.com/go-wild/*", + "*://mail.qq.com/cgi-bin/readtemplate/*" + ], + "license": "MIT License", + "supportURL": "https://github.com/WindrunnerMax/TKScript/issues", + "installURL": "https://github.com/WindrunnerMax/TKScript", + "grant": ["unsafeWindow", "GM_xmlhttpRequest"], + "run-at": "document-start" +} diff --git a/packages/water-mark/meta.json b/packages/water-mark/meta.json index 1243ef7..4d95cde 100644 --- a/packages/water-mark/meta.json +++ b/packages/water-mark/meta.json @@ -1,17 +1,13 @@ { - "name": "移除页面水印", - "namespace": "https://github.com/WindrunnerMax/TKScript", - "version": "1.0.1", - "description": "移除常见网页的水印", - "author": "Czy", - "match": [ - "*://so.csdn.net/*" - ], - "supportURL": "https://github.com/WindrunnerMax/TKScript/issues", - "license": "GPL License", - "installURL": "https://github.com/WindrunnerMax/TKScript", - "run-at": "document-start", - "grant": [ - "unsafeWindow" - ] + "name": "移除页面水印", + "namespace": "https://github.com/WindrunnerMax/TKScript", + "version": "1.0.2", + "description": "移除常见网页的水印", + "author": "Czy", + "match": ["http://*/*", "https://*/*"], + "supportURL": "https://github.com/WindrunnerMax/TKScript/issues", + "license": "GPL License", + "installURL": "https://github.com/WindrunnerMax/TKScript", + "run-at": "document-start", + "grant": ["unsafeWindow"] } diff --git a/packages/water-mark/src/index.ts b/packages/water-mark/src/index.ts index 37bd686..b3167f7 100644 --- a/packages/water-mark/src/index.ts +++ b/packages/water-mark/src/index.ts @@ -1,7 +1,6 @@ import { common } from "./modules/common"; -import { csdn } from "./modules/csdn"; import type { Website } from "./types/website"; -const websites: Website[] = [csdn, common]; +const websites: Website[] = [common]; const web = websites.find(item => item.regexp.test(location.href)); web && web.init(); diff --git a/packages/water-mark/src/modules/common.ts b/packages/water-mark/src/modules/common.ts index 53eae60..fede348 100644 --- a/packages/water-mark/src/modules/common.ts +++ b/packages/water-mark/src/modules/common.ts @@ -31,13 +31,19 @@ export const common: Website = { }; const PRESET_CLASSES = [ "." + FALLBACK_CLASS, + `[id*="watermark"]`, + `[id*="WaterMark"]`, + `[id*="Watermark"]`, `[class*="watermark"]`, `[class*="WaterMark"]`, + `[class*="Watermark"]`, ].join(","); injectCSSEarly(`${PRESET_CLASSES}{${OPACITY_PROPERTY}}`); const PRESET_BACKGROUND = [ `[style*="pointer-events: none;"][style*="background: url"]`, `[style*="pointer-events: none;"][style*="background-image: url"]`, + `[style*="pointer-events:none;"][style*="background:url"]`, + `[style*="pointer-events:none;"][style*="background-image:url"]`, ].join(","); injectCSSEarly(`${PRESET_BACKGROUND}{${OPACITY_BACKGROUND_PROPERTY}}`); }, diff --git a/packages/water-mark/src/modules/csdn.ts b/packages/water-mark/src/modules/csdn.ts deleted file mode 100644 index ffa1859..0000000 --- a/packages/water-mark/src/modules/csdn.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { Website } from "../types/website"; -import { FALLBACK_CLASS, OPACITY_PROPERTY } from "../utils/constant"; -import { lintWaterMarkDOM } from "../utils/dom"; -import { injectCSSEarly } from "../utils/styles"; - -export const csdn: Website = { - regexp: /so\.csdn\.net/, - init: () => { - const observer = MutationObserver.prototype.observe; - MutationObserver.prototype.observe = function (target, options) { - if (target instanceof Element && target.classList.contains("chat-mask")) { - const nodes = Array.from(target.children); - nodes.forEach(node => lintWaterMarkDOM(node)); - return; - } - observer.call(this, target, options); - }; - const classes = ["." + FALLBACK_CLASS].join(","); - injectCSSEarly(`${classes}{${OPACITY_PROPERTY}}`); - }, -}; diff --git a/packages/water-mark/src/utils/dom.ts b/packages/water-mark/src/utils/dom.ts index 5ba6292..d0a5885 100644 --- a/packages/water-mark/src/utils/dom.ts +++ b/packages/water-mark/src/utils/dom.ts @@ -1,12 +1,11 @@ import { FALLBACK_CLASS } from "./constant"; export const lintWaterMarkDOM = (node: Node) => { - if (node instanceof Element && node.hasAttribute("style")) { - const styles = node.getAttribute("style") || ""; - if (styles.indexOf("pointer-events: none;") === -1) { + if (node instanceof HTMLElement && node.hasAttribute("style")) { + if (node.style.pointerEvents !== "none") { return false; } - if (styles.indexOf("background: url") > -1 || styles.indexOf("background-image: url") > -1) { + if (node.style.background.startsWith("url") || node.style.backgroundImage.startsWith("url")) { !node.classList.contains(FALLBACK_CLASS) && node.classList.add(FALLBACK_CLASS); return true; }