browser-extension-utils 0.3.2 → 0.3.3

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/lib/userscript.ts CHANGED
@@ -40,7 +40,8 @@ export const addElement =
40
40
  for (const entry of Object.entries(attributes)) {
41
41
  // Some userscript managers do not support innerHTML
42
42
  // Stay do not support multiple classes: GM_addElement('div', {"class": "a b"}). Remove `|class` when it is supported
43
- if (/^(on\w+|innerHTML|class)$/.test(entry[0])) {
43
+ // Stay do not support data-* attributes
44
+ if (/^(on\w+|innerHTML|class|data-.+)$/.test(entry[0])) {
44
45
  entries2.push(entry)
45
46
  } else {
46
47
  entries1.push(entry)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browser-extension-utils",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Utilities for developing browser extensions and userscripts",
5
5
  "type": "module",
6
6
  "main": "./lib/index.ts",