Skip to content

Commit 9ab59bf

Browse files
committed
fix: watermark class
1 parent 241bab4 commit 9ab59bf

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

packages/water-mark/meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"zh": "🔥🔥🔥移除页面水印🔥🔥🔥"
66
},
77
"namespace": "https://github.com/WindrunnerMax/TKScript",
8-
"version": "1.0.4",
8+
"version": "1.0.5",
99
"description": {
1010
"default": "移除常见网页的水印",
1111
"en": "Remove watermarks from common web pages",

packages/water-mark/src/modules/basic.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,15 @@ export const basic: Website = {
2929
super(getMutationCallback(callback));
3030
}
3131
};
32-
const PRESET_CLASSES = [
33-
"." + FALLBACK_CLASS,
32+
const PRESET_CLASSES = [`.${FALLBACK_CLASS}`].join(",");
33+
injectCSSEarly(`${PRESET_CLASSES}{${OPACITY_PROPERTY}}`);
34+
const PRESET_BACKGROUND = [
3435
`div[id*="watermark"]`,
3536
`div[id*="WaterMark"]`,
3637
`div[id*="Watermark"]`,
3738
`div[class*="watermark"]`,
3839
`div[class*="WaterMark"]`,
3940
`div[class*="Watermark"]`,
40-
].join(",");
41-
injectCSSEarly(`${PRESET_CLASSES}{${OPACITY_PROPERTY}}`);
42-
const PRESET_BACKGROUND = [
4341
`div[style*="pointer-events"][style*="background: url"]`,
4442
`div[style*="pointer-events"][style*="background-image: url"]`,
4543
`div[style*="pointer-events"][style*="background:url"]`,

packages/water-mark/src/utils/constant.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const OPACITY_PROPERTY = [
99
export const OPACITY_BACKGROUND_PROPERTY = [
1010
"background: transparent !important;",
1111
"background-color: transparent !important;",
12-
"background-image: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0)) !important;",
12+
"background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0)) !important;",
1313
].join("");
1414

1515
export const NOOP = () => null;

0 commit comments

Comments
 (0)