add API polyfill to kiss-firefox

This commit is contained in:
2023-04-19 20:56:15 -06:00
parent 54fd3368fa
commit bfb601cc2d
7 changed files with 31 additions and 3 deletions

2
template/.gitignore vendored
View File

@@ -1,2 +1,4 @@
bin/
libs/
node_modules/
*.zip

View File

@@ -1,7 +1,8 @@
-lib kiss
-lib kiss-firefox
-lib webextension-polyfill
-cp src
-dce full
--main template.Main
--js bin/main.js
-cmd zip -r template.zip . -x *.git* -x *.hxml -x *.zip -x src/\* -x node_modules/\*
-cmd cp node_modules/webextension-polyfill/dist/browser-polyfill.js* bin/ && zip -r template.zip . -x *.git* -x *.hxml -x *.zip -x src/\* -x node_modules/\* -x libs/\* -x test.sh

View File

@@ -13,7 +13,7 @@
"content_scripts": [
{
"matches": [],
"js": ["bin/main.js"]
"js": ["bin/browser-polyfill.js", "bin/main.js"]
}
]
}

View File

@@ -7,7 +7,8 @@
"postinstall": "dts2hx --all"
},
"dependencies": {
"@types/webextension-polyfill": "^0.10.0"
"@types/webextension-polyfill": "^0.10.0",
"webextension-polyfill": "^0.10.0"
},
"devDependencies": {
"dts2hx": "^0.19.0"

View File

@@ -1 +1,2 @@
(import kiss_firefox.API)
(set js.Lib.global.document.body.style.border "5px solid red")