browser-extension-utils 0.0.10 → 0.0.11

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.
Files changed (2) hide show
  1. package/lib/userscript.js +16 -2
  2. package/package.json +1 -1
package/lib/userscript.js CHANGED
@@ -1,6 +1,20 @@
1
1
  export * from "./index.js"
2
+ /* eslint-disable camelcase */
3
+ // eslint-disable-next-line no-unused-expressions, n/prefer-global/process
4
+ process.env.PLASMO_TAG === "dev" &&
5
+ (() => {
6
+ if (
7
+ typeof GM_addElement !== "function" &&
8
+ typeof document.GM_addElement === "function"
9
+ ) {
10
+ // eslint-disable-next-line no-global-assign
11
+ GM_addElement = document.GM_addElement
12
+ // eslint-disable-next-line no-global-assign
13
+ GM_addStyle = document.GM_addStyle
14
+ }
15
+ })()
2
16
 
3
- // eslint-disable-next-line camelcase
4
17
  export const addElement = GM_addElement
5
- // eslint-disable-next-line camelcase
18
+
6
19
  export const addStyle = GM_addStyle
20
+ /* eslint-enable camelcase */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browser-extension-utils",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "Utilities for developing browser extensions and userscripts",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",