darkreader 4.9.112 → 4.9.113

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/darkreader.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Dark Reader v4.9.112
2
+ * Dark Reader v4.9.113
3
3
  * https://darkreader.org/
4
4
  */
5
5
 
@@ -124,7 +124,7 @@
124
124
  const isMacOS = platform.startsWith("mac");
125
125
  isNavigatorDefined && navigator.userAgentData
126
126
  ? navigator.userAgentData.mobile
127
- : userAgent.includes("mobile");
127
+ : userAgent.includes("mobile") || false;
128
128
  const isShadowDomSupported = typeof ShadowRoot === "function";
129
129
  const isMatchMediaChangeEventListenerSupported =
130
130
  typeof MediaQueryList === "function" &&
@@ -4453,9 +4453,9 @@
4453
4453
  fallback.startsWith("hsl(") ||
4454
4454
  fallback.startsWith("hsla(") ||
4455
4455
  fallback.startsWith("var(--darkreader-bg--") ||
4456
- fallback.match(
4457
- /^var\(--darkreader-background-[0-9a-z]+, #[0-9a-z]+\)$/
4458
- )
4456
+ fallback.startsWith("var(--darkreader-background-") ||
4457
+ (hasDoubleNestedBrackets &&
4458
+ fallback.includes("var(--darkreader-background-"))
4459
4459
  );
4460
4460
  }
4461
4461
  return fallback.match(/^(#[0-9a-f]+)|([a-z]+)$/i);
@@ -4554,6 +4554,9 @@
4554
4554
  if (isMediaRule(rule.parentRule)) {
4555
4555
  cssText = `${rule.parentRule.media.mediaText} { ${cssText} }`;
4556
4556
  }
4557
+ if (isLayerRule(rule.parentRule)) {
4558
+ cssText = `${rule.parentRule.name} { ${cssText} }`;
4559
+ }
4557
4560
  return getHashCode(cssText);
4558
4561
  }
4559
4562
  const rulesTextCache = new Set();
package/darkreader.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Dark Reader v4.9.112
2
+ * Dark Reader v4.9.113
3
3
  * https://darkreader.org/
4
4
  */
5
5
 
@@ -107,7 +107,7 @@ const isWindows = platform.startsWith("win");
107
107
  const isMacOS = platform.startsWith("mac");
108
108
  isNavigatorDefined && navigator.userAgentData
109
109
  ? navigator.userAgentData.mobile
110
- : userAgent.includes("mobile");
110
+ : userAgent.includes("mobile") || false;
111
111
  const isShadowDomSupported = typeof ShadowRoot === "function";
112
112
  const isMatchMediaChangeEventListenerSupported =
113
113
  typeof MediaQueryList === "function" &&
@@ -4312,9 +4312,9 @@ function isFallbackResolved(modified) {
4312
4312
  fallback.startsWith("hsl(") ||
4313
4313
  fallback.startsWith("hsla(") ||
4314
4314
  fallback.startsWith("var(--darkreader-bg--") ||
4315
- fallback.match(
4316
- /^var\(--darkreader-background-[0-9a-z]+, #[0-9a-z]+\)$/
4317
- )
4315
+ fallback.startsWith("var(--darkreader-background-") ||
4316
+ (hasDoubleNestedBrackets &&
4317
+ fallback.includes("var(--darkreader-background-"))
4318
4318
  );
4319
4319
  }
4320
4320
  return fallback.match(/^(#[0-9a-f]+)|([a-z]+)$/i);
@@ -4413,6 +4413,9 @@ function createStyleSheetModifier() {
4413
4413
  if (isMediaRule(rule.parentRule)) {
4414
4414
  cssText = `${rule.parentRule.media.mediaText} { ${cssText} }`;
4415
4415
  }
4416
+ if (isLayerRule(rule.parentRule)) {
4417
+ cssText = `${rule.parentRule.name} { ${cssText} }`;
4418
+ }
4416
4419
  return getHashCode(cssText);
4417
4420
  }
4418
4421
  const rulesTextCache = new Set();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "darkreader",
3
- "version": "4.9.112",
3
+ "version": "4.9.113",
4
4
  "description": "Dark mode for every website",
5
5
  "scripts": {
6
6
  "api": "node --max-old-space-size=3072 tasks/cli.js build --api",
@@ -68,18 +68,18 @@
68
68
  "devDependencies": {
69
69
  "@eslint/compat": "1.4.0",
70
70
  "@eslint/eslintrc": "3.3.1",
71
- "@eslint/js": "9.37.0",
71
+ "@eslint/js": "9.38.0",
72
72
  "@rollup/plugin-node-resolve": "16.0.3",
73
73
  "@rollup/plugin-replace": "6.0.2",
74
- "@rollup/plugin-typescript": "12.1.4",
75
- "@stylistic/eslint-plugin": "5.4.0",
76
- "@types/chrome": "0.1.24",
74
+ "@rollup/plugin-typescript": "12.3.0",
75
+ "@stylistic/eslint-plugin": "5.5.0",
76
+ "@types/chrome": "0.1.26",
77
77
  "@types/eslint": "9.6.1",
78
- "@types/jasmine": "5.1.10",
78
+ "@types/jasmine": "5.1.12",
79
79
  "@types/jest": "30.0.0",
80
80
  "@types/karma": "6.3.9",
81
81
  "@types/karma-coverage": "2.0.3",
82
- "@types/node": "24.7.2",
82
+ "@types/node": "24.9.1",
83
83
  "@types/ws": "8.18.1",
84
84
  "chokidar": "4.0.3",
85
85
  "eslint-plugin-compat": "6.0.2",
@@ -99,18 +99,18 @@
99
99
  "karma-spec-reporter": "0.0.36",
100
100
  "less": "4.4.2",
101
101
  "prettier": "3.6.2",
102
- "puppeteer-core": "24.24.1",
103
- "rollup": "4.52.4",
102
+ "puppeteer-core": "24.26.1",
103
+ "rollup": "4.52.5",
104
104
  "rollup-plugin-istanbul": "5.0.0",
105
105
  "ts-jest": "29.4.5",
106
106
  "tslib": "2.8.1",
107
107
  "typescript": "5.9.3",
108
- "typescript-eslint": "8.46.1",
108
+ "typescript-eslint": "8.46.2",
109
109
  "ws": "8.18.3",
110
110
  "yazl": "3.3.1"
111
111
  },
112
112
  "optionalDependencies": {
113
- "@rollup/rollup-linux-x64-gnu": "4.52.4",
114
- "@rollup/rollup-win32-x64-msvc": "4.52.4"
113
+ "@rollup/rollup-linux-x64-gnu": "4.52.5",
114
+ "@rollup/rollup-win32-x64-msvc": "4.52.5"
115
115
  }
116
116
  }