|
6 | 6 | // @description:en Remove watermarks from common web pages |
7 | 7 | // @description:zh 移除常见网页的水印 |
8 | 8 | // @namespace https://github.com/WindrunnerMax/TKScript |
9 | | -// @version 1.0.4 |
| 9 | +// @version 1.0.5 |
10 | 10 | // @author Czy |
11 | 11 | // @match http://*/* |
12 | 12 | // @match https://*/* |
|
28 | 28 | const OPACITY_BACKGROUND_PROPERTY = [ |
29 | 29 | "background: transparent !important;", |
30 | 30 | "background-color: transparent !important;", |
31 | | - "background-image: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0)) !important;" |
| 31 | + "background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0)) !important;" |
32 | 32 | ].join(""); |
33 | 33 |
|
34 | 34 | const inspectWaterMarkDOM = (node) => { |
|
108 | 108 | super(getMutationCallback(callback)); |
109 | 109 | } |
110 | 110 | }; |
111 | | - const PRESET_CLASSES = [ |
112 | | - "." + FALLBACK_CLASS, |
| 111 | + const PRESET_CLASSES = [`.${FALLBACK_CLASS}`].join(","); |
| 112 | + injectCSSEarly(`${PRESET_CLASSES}{${OPACITY_PROPERTY}}`); |
| 113 | + const PRESET_BACKGROUND = [ |
113 | 114 | `div[id*="watermark"]`, |
114 | 115 | `div[id*="WaterMark"]`, |
115 | 116 | `div[id*="Watermark"]`, |
116 | 117 | `div[class*="watermark"]`, |
117 | 118 | `div[class*="WaterMark"]`, |
118 | | - `div[class*="Watermark"]` |
119 | | - ].join(","); |
120 | | - injectCSSEarly(`${PRESET_CLASSES}{${OPACITY_PROPERTY}}`); |
121 | | - const PRESET_BACKGROUND = [ |
| 119 | + `div[class*="Watermark"]`, |
122 | 120 | `div[style*="pointer-events"][style*="background: url"]`, |
123 | 121 | `div[style*="pointer-events"][style*="background-image: url"]`, |
124 | 122 | `div[style*="pointer-events"][style*="background:url"]`, |
|
0 commit comments