From 6f41609425a9fd24d36d3e245858c999a91595e6 Mon Sep 17 00:00:00 2001 From: yujinpan <1192878390@qq.com> Date: Thu, 28 Sep 2023 14:08:09 +0800 Subject: [PATCH] feat: add hide-img script --- README.md | 6 +++++- scripts/hide-img.js | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 scripts/hide-img.js diff --git a/README.md b/README.md index 340615d..c986a3e 100644 --- a/README.md +++ b/README.md @@ -137,4 +137,8 @@ ## 黑白 -黑白化网站。 \ No newline at end of file +黑白化网站。 + +## 隐藏图片 + +隐藏所有的图片。 \ No newline at end of file diff --git a/scripts/hide-img.js b/scripts/hide-img.js new file mode 100644 index 0000000..336c4de --- /dev/null +++ b/scripts/hide-img.js @@ -0,0 +1,16 @@ +// ==UserScript== +// @name Hide Image 隐藏图片 +// @namespace https://github.com/yujinpan/tampermonkey-extension +// @version 1.0 +// @license MIT +// @description Hide all image in website。 +// @author yujinpan +// @include http*://** +// @run-at document-start +// ==/UserScript== + +(function () { + const style = document.createElement('style'); + style.innerHTML = 'img{display:none!important;}*{background-image:none!important;}'; + document.head.append(style); +})(); \ No newline at end of file