Make extension work on Chrome. Make extension NOT work on firefox.

This commit is contained in:
Tamius Han 2024-06-03 00:15:23 +02:00
parent 79ecc87db4
commit 9cef850d06
15 changed files with 195 additions and 224 deletions

330
package-lock.json generated
View File

@ -1569,18 +1569,18 @@
} }
}, },
"@types/filesystem": { "@types/filesystem": {
"version": "0.0.32", "version": "0.0.36",
"resolved": "https://registry.npmjs.org/@types/filesystem/-/filesystem-0.0.32.tgz", "resolved": "https://registry.npmjs.org/@types/filesystem/-/filesystem-0.0.36.tgz",
"integrity": "sha512-Yuf4jR5YYMR2DVgwuCiP11s0xuVRyPKmz8vo6HBY3CGdeMj8af93CFZX+T82+VD1+UqHOxTq31lO7MI7lepBtQ==", "integrity": "sha512-vPDXOZuannb9FZdxgHnqSwAG/jvdGM8Wq+6N4D/d80z+D4HWH+bItqsZaVRQykAn6WEVeEkLm2oQigyHtgb0RA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@types/filewriter": "*" "@types/filewriter": "*"
} }
}, },
"@types/filewriter": { "@types/filewriter": {
"version": "0.0.29", "version": "0.0.33",
"resolved": "https://registry.npmjs.org/@types/filewriter/-/filewriter-0.0.29.tgz", "resolved": "https://registry.npmjs.org/@types/filewriter/-/filewriter-0.0.33.tgz",
"integrity": "sha512-BsPXH/irW0ht0Ji6iw/jJaK8Lj3FJemon2gvEqHKpCdDCeemHa+rI3WBGq5z7cDMZgoLjY40oninGxqk+8NzNQ==", "integrity": "sha512-xFU8ZXTw4gd358lb2jw25nxY9QAgqn2+bKKjKOYfNCzN4DKCFetK7sPtrlpg66Ywe3vWY9FNxprZawAh9wfJ3g==",
"dev": true "dev": true
}, },
"@types/firefox": { "@types/firefox": {
@ -1609,9 +1609,9 @@
} }
}, },
"@types/har-format": { "@types/har-format": {
"version": "1.2.11", "version": "1.2.15",
"resolved": "https://registry.npmjs.org/@types/har-format/-/har-format-1.2.11.tgz", "resolved": "https://registry.npmjs.org/@types/har-format/-/har-format-1.2.15.tgz",
"integrity": "sha512-T232/TneofqK30AD1LRrrf8KnjLvzrjWDp7eWST5KoiSzrBfRsLrWDPk4STQPW4NZG6v2MltnduBVmakbZOBIQ==", "integrity": "sha512-RpQH4rXLuvTXKR0zqHq3go0RVXYv/YVqv4TnPH95VbwUxZdQlK1EtcMvQvMpDngHbt13Csh9Z4qT9AbkiQH5BA==",
"dev": true "dev": true
}, },
"@types/http-assert": { "@types/http-assert": {
@ -1794,6 +1794,12 @@
"@types/node": "*" "@types/node": "*"
} }
}, },
"web-ext-types": {
"version": "0.10.7",
"resolved": "https://registry.npmjs.org/web-ext-types/-/webextension-polyfill-0.10.7.tgz",
"integrity": "sha512-10ql7A0qzBmFB+F+qAke/nP1PIonS0TXZAOMVOxEUsm+lGSW6uwVcISFNa0I4Oyj0884TZVWGGMIWeXOVSNFHw==",
"dev": true
},
"@types/webpack-env": { "@types/webpack-env": {
"version": "1.16.3", "version": "1.16.3",
"resolved": "https://registry.npmjs.org/@types/webpack-env/-/webpack-env-1.16.3.tgz", "resolved": "https://registry.npmjs.org/@types/webpack-env/-/webpack-env-1.16.3.tgz",
@ -1945,16 +1951,6 @@
"yorkie": "^2.0.0" "yorkie": "^2.0.0"
}, },
"dependencies": { "dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"braces": { "braces": {
"version": "3.0.2", "version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
@ -1964,23 +1960,6 @@
"fill-range": "^7.0.1" "fill-range": "^7.0.1"
} }
}, },
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"fill-range": { "fill-range": {
"version": "7.0.1", "version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
@ -1990,62 +1969,6 @@
"to-regex-range": "^5.0.1" "to-regex-range": "^5.0.1"
} }
}, },
"fork-ts-checker-webpack-plugin-v5": {
"version": "npm:fork-ts-checker-webpack-plugin@5.2.1",
"resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-5.2.1.tgz",
"integrity": "sha512-SVi+ZAQOGbtAsUWrZvGzz38ga2YqjWvca1pXQFUArIVXqli0lLoDQ8uS0wg0kSpcwpZmaW5jVCZXQebkyUQSsw==",
"dev": true,
"optional": true,
"requires": {
"@babel/code-frame": "^7.8.3",
"@types/json-schema": "^7.0.5",
"chalk": "^4.1.0",
"cosmiconfig": "^6.0.0",
"deepmerge": "^4.2.2",
"fs-extra": "^9.0.0",
"memfs": "^3.1.2",
"minimatch": "^3.0.4",
"schema-utils": "2.7.0",
"semver": "^7.3.2",
"tapable": "^1.0.0"
},
"dependencies": {
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"semver": {
"version": "7.6.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz",
"integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==",
"dev": true,
"optional": true,
"requires": {
"lru-cache": "^6.0.0"
}
}
}
},
"fs-extra": {
"version": "9.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
"integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",
"dev": true,
"optional": true,
"requires": {
"at-least-node": "^1.0.0",
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
}
},
"globby": { "globby": {
"version": "9.2.0", "version": "9.2.0",
"resolved": "https://registry.npmjs.org/globby/-/globby-9.2.0.tgz", "resolved": "https://registry.npmjs.org/globby/-/globby-9.2.0.tgz",
@ -2062,13 +1985,6 @@
"slash": "^2.0.0" "slash": "^2.0.0"
} }
}, },
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"ignore": { "ignore": {
"version": "4.0.6", "version": "4.0.6",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
@ -2081,27 +1997,6 @@
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"dev": true "dev": true
}, },
"jsonfile": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
"integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
"dev": true,
"optional": true,
"requires": {
"graceful-fs": "^4.1.6",
"universalify": "^2.0.0"
}
},
"lru-cache": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
"dev": true,
"optional": true,
"requires": {
"yallist": "^4.0.0"
}
},
"micromatch": { "micromatch": {
"version": "4.0.4", "version": "4.0.4",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz",
@ -2112,18 +2007,6 @@
"picomatch": "^2.2.3" "picomatch": "^2.2.3"
} }
}, },
"schema-utils": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz",
"integrity": "sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A==",
"dev": true,
"optional": true,
"requires": {
"@types/json-schema": "^7.0.4",
"ajv": "^6.12.2",
"ajv-keywords": "^3.4.1"
}
},
"semver": { "semver": {
"version": "6.3.0", "version": "6.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
@ -2136,16 +2019,6 @@
"integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==",
"dev": true "dev": true
}, },
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"to-regex-range": { "to-regex-range": {
"version": "5.0.1", "version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
@ -2167,20 +2040,6 @@
"micromatch": "^4.0.0", "micromatch": "^4.0.0",
"semver": "^6.0.0" "semver": "^6.0.0"
} }
},
"universalify": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
"integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",
"dev": true,
"optional": true
},
"yallist": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
"dev": true,
"optional": true
} }
} }
}, },
@ -6719,7 +6578,7 @@
"extsprintf": { "extsprintf": {
"version": "1.3.0", "version": "1.3.0",
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
"integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
"dev": true "dev": true
}, },
"fast-deep-equal": { "fast-deep-equal": {
@ -7015,6 +6874,133 @@
"worker-rpc": "^0.1.0" "worker-rpc": "^0.1.0"
} }
}, },
"fork-ts-checker-webpack-plugin-v5": {
"version": "npm:fork-ts-checker-webpack-plugin@5.2.1",
"resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-5.2.1.tgz",
"integrity": "sha512-SVi+ZAQOGbtAsUWrZvGzz38ga2YqjWvca1pXQFUArIVXqli0lLoDQ8uS0wg0kSpcwpZmaW5jVCZXQebkyUQSsw==",
"dev": true,
"optional": true,
"requires": {
"@babel/code-frame": "^7.8.3",
"@types/json-schema": "^7.0.5",
"chalk": "^4.1.0",
"cosmiconfig": "^6.0.0",
"deepmerge": "^4.2.2",
"fs-extra": "^9.0.0",
"memfs": "^3.1.2",
"minimatch": "^3.0.4",
"schema-utils": "2.7.0",
"semver": "^7.3.2",
"tapable": "^1.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"fs-extra": {
"version": "9.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
"integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",
"dev": true,
"optional": true,
"requires": {
"at-least-node": "^1.0.0",
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
}
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"jsonfile": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
"integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
"dev": true,
"optional": true,
"requires": {
"graceful-fs": "^4.1.6",
"universalify": "^2.0.0"
}
},
"schema-utils": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz",
"integrity": "sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A==",
"dev": true,
"optional": true,
"requires": {
"@types/json-schema": "^7.0.4",
"ajv": "^6.12.2",
"ajv-keywords": "^3.4.1"
}
},
"semver": {
"version": "7.6.2",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
"integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==",
"dev": true,
"optional": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"universalify": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
"integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",
"dev": true,
"optional": true
}
}
},
"form-data": { "form-data": {
"version": "2.3.3", "version": "2.3.3",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
@ -13040,7 +13026,7 @@
"tr46": { "tr46": {
"version": "0.0.3", "version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
}, },
"tree-kill": { "tree-kill": {
"version": "1.2.2", "version": "1.2.2",
@ -13616,7 +13602,7 @@
"verror": { "verror": {
"version": "1.10.0", "version": "1.10.0",
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
"integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
"dev": true, "dev": true,
"requires": { "requires": {
"assert-plus": "^1.0.0", "assert-plus": "^1.0.0",
@ -14239,30 +14225,14 @@
"dev": true "dev": true
}, },
"webextension-polyfill": { "webextension-polyfill": {
"version": "0.6.0", "version": "0.12.0",
"resolved": "https://registry.npmjs.org/webextension-polyfill/-/webextension-polyfill-0.6.0.tgz", "resolved": "https://registry.npmjs.org/webextension-polyfill/-/webextension-polyfill-0.12.0.tgz",
"integrity": "sha512-PlYwiX8e4bNZrEeBFxbFFsLtm0SMPxJliLTGdNCA0Bq2XkWrAn2ejUd+89vZm+8BnfFB1BclJyCz3iKsm2atNg==", "integrity": "sha512-97TBmpoWJEE+3nFBQ4VocyCdLKfw54rFaJ6EVQYLBCXqCIpLSZkwGgASpv4oPt9gdKCJ80RJlcmNzNn008Ag6Q=="
"dev": true
},
"webextension-polyfill-ts": {
"version": "0.26.0",
"resolved": "https://registry.npmjs.org/webextension-polyfill-ts/-/webextension-polyfill-ts-0.26.0.tgz",
"integrity": "sha512-XEFL+aYVEsm/d4RajVwP75g56c/w2aSHnPwgtUv8/nCzbLNSzRQIix6aj1xqFkA5yr7OIDkk3OD/QTnPp8ThYA==",
"requires": {
"webextension-polyfill": "^0.8.0"
},
"dependencies": {
"webextension-polyfill": {
"version": "0.8.0",
"resolved": "https://registry.npmjs.org/webextension-polyfill/-/webextension-polyfill-0.8.0.tgz",
"integrity": "sha512-a19+DzlT6Kp9/UI+mF9XQopeZ+n2ussjhxHJ4/pmIGge9ijCDz7Gn93mNnjpZAk95T4Tae8iHZ6sSf869txqiQ=="
}
}
}, },
"webidl-conversions": { "webidl-conversions": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE="
}, },
"webpack": { "webpack": {
"version": "4.46.0", "version": "4.46.0",
@ -14442,7 +14412,7 @@
"whatwg-url": { "whatwg-url": {
"version": "5.0.0", "version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
"requires": { "requires": {
"tr46": "~0.0.3", "tr46": "~0.0.3",
"webidl-conversions": "^3.0.0" "webidl-conversions": "^3.0.0"

View File

@ -41,7 +41,7 @@
"vue-style-loader": "^4.1.3", "vue-style-loader": "^4.1.3",
"vuex": "^4.0.2", "vuex": "^4.0.2",
"vuex-webextensions": "^1.3.3", "vuex-webextensions": "^1.3.3",
"webextension-polyfill-ts": "^0.26.0" "webextension-polyfill": "^0.12.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.16.0", "@babel/core": "^7.16.0",
@ -53,6 +53,9 @@
"@types/firefox": "0.0.31", "@types/firefox": "0.0.31",
"@types/lodash": "^4.14.176", "@types/lodash": "^4.14.176",
"@types/node": "^14.17.32", "@types/node": "^14.17.32",
"web-ext-types": "^0.10.7",
"@vue/cli": "^4.5.15",
"@vue/cli-plugin-typescript": "^4.5.15",
"@vue/compiler-sfc": "^3.2.21", "@vue/compiler-sfc": "^3.2.21",
"archiver": "^3.0.0", "archiver": "^3.0.0",
"babel-loader": "^8.2.3", "babel-loader": "^8.2.3",
@ -70,12 +73,9 @@
"vue-cli-plugin-vue-next": "~0.1.4", "vue-cli-plugin-vue-next": "~0.1.4",
"vue-loader": "^16.8.2", "vue-loader": "^16.8.2",
"web-ext-types": "^2.3.0", "web-ext-types": "^2.3.0",
"webextension-polyfill": "^0.6.0",
"webpack": "^4.46.0", "webpack": "^4.46.0",
"webpack-chrome-extension-reloader": "^0.8.3", "webpack-chrome-extension-reloader": "^0.8.3",
"webpack-cli": "^3.3.12", "webpack-cli": "^3.3.12",
"webpack-shell-plugin": "^0.5.0", "webpack-shell-plugin": "^0.5.0"
"@vue/cli": "^4.5.15",
"@vue/cli-plugin-typescript": "^4.5.15"
} }
} }

View File

@ -86,6 +86,7 @@
> >
</BaseExtensionSettings> </BaseExtensionSettings>
</template> </template>
<template v-else>No settings or site settings found.</template>
</div> </div>
</div> </div>
@ -139,7 +140,7 @@ export default {
await this.settings.init(); await this.settings.init();
this.settingsInitialized = true; this.settingsInitialized = true;
// const port = browser.runtime.connect({name: 'popup-port'}); // const port = chrome.runtime.connect({name: 'popup-port'});
// port.onMessage.addListener( (m,p) => this.processReceivedMessage(m,p)); // port.onMessage.addListener( (m,p) => this.processReceivedMessage(m,p));
// CSM.setProperty('port', port); // CSM.setProperty('port', port);
@ -148,6 +149,7 @@ export default {
'set-current-site', 'set-current-site',
{ {
function: (config, context) => { function: (config, context) => {
console.log('Received set-current-site', config);
if (this.site) { if (this.site) {
if (!this.site.host) { if (!this.site.host) {
// dunno why this fix is needed, but sometimes it is // dunno why this fix is needed, but sometimes it is

View File

@ -9,7 +9,8 @@
<!-- Load some resources only in development environment --> <!-- Load some resources only in development environment -->
<% } %> <% } %>
</head> </head>
<body style="width: 100%; height: 100%; overflow-x: hidden;" class="uw-ultrawidify-container-root"> <body
style="width: 100%; height: 100%; overflow-x: hidden; min-width: 750px">
<div id="app"> <div id="app">
</div> </div>

View File

@ -48,7 +48,7 @@ export default {
data() { data() {
return { return {
// reminder webextension-polyfill doesn't seem to work in vue! // reminder webextension-polyfill doesn't seem to work in vue!
addonVersion: BrowserDetect.firefox ? browser.runtime.getManifest().version : chrome.runtime.getManifest().version, addonVersion: BrowserDetect.firefox ? chrome.runtime.getManifest().version : chrome.runtime.getManifest().version,
loggingEnabled: false, loggingEnabled: false,
loggerSettings: '', loggerSettings: '',
loggerSettingsError: false, loggerSettingsError: false,

View File

@ -3,10 +3,7 @@ import BrowserDetect from './conf/BrowserDetect';
import CommsServer from './lib/comms/CommsServer'; import CommsServer from './lib/comms/CommsServer';
import Settings from './lib/Settings'; import Settings from './lib/Settings';
import Logger, { baseLoggingOptions } from './lib/Logger'; import Logger, { baseLoggingOptions } from './lib/Logger';
import { sleep } from '../common/js/utils'; import { sleep } from '../common/js/utils';
import { browser } from 'webextension-polyfill-ts';
import EventBus, { EventBusCommand } from './lib/EventBus'; import EventBus, { EventBusCommand } from './lib/EventBus';
export default class UWServer { export default class UWServer {
@ -56,7 +53,7 @@ export default class UWServer {
//#region getters //#region getters
get activeTab() { get activeTab() {
return browser.tabs.query({currentWindow: true, active: true}); return chrome.tabs.query({currentWindow: true, active: true});
} }
//#endregion //#endregion
@ -95,7 +92,7 @@ export default class UWServer {
this.comms = new CommsServer(this); this.comms = new CommsServer(this);
this.eventBus.setComms(this.comms); this.eventBus.setComms(this.comms);
browser.tabs.onActivated.addListener((m) => {this.onTabSwitched(m)}); chrome.tabs.onActivated.addListener((m) => {this.onTabSwitched(m)});
} catch (e) { } catch (e) {
console.error(`Ultrawidify [server]: failed to start. Reason:`, e); console.error(`Ultrawidify [server]: failed to start. Reason:`, e);
} }
@ -113,7 +110,7 @@ export default class UWServer {
} }
try { try {
if (BrowserDetect.firefox) { if (BrowserDetect.firefox) {
browser.scripting.insertCSS({ chrome.scripting.insertCSS({
target: { target: {
tabId: sender.tab.id, tabId: sender.tab.id,
frameIds: [ frameIds: [
@ -142,7 +139,7 @@ export default class UWServer {
async removeCss(css, sender) { async removeCss(css, sender) {
try { try {
if (BrowserDetect.firefox) { if (BrowserDetect.firefox) {
browser.scripting.removeCSS({ chrome.scripting.removeCSS({
target: { target: {
tabId: sender.tab.id, tabId: sender.tab.id,
frameIds: [ frameIds: [
@ -206,7 +203,7 @@ export default class UWServer {
let tab; let tab;
if (BrowserDetect.firefox) { if (BrowserDetect.firefox) {
tab = await browser.tabs.get(this.currentTabId); tab = await chrome.tabs.get(this.currentTabId);
} else if (BrowserDetect.anyChromium) { } else if (BrowserDetect.anyChromium) {
tab = await this._promisifyTabsGet(chrome, this.currentTabId); tab = await this._promisifyTabsGet(chrome, this.currentTabId);
} }
@ -297,7 +294,7 @@ export default class UWServer {
} }
async getCurrentTab() { async getCurrentTab() {
return (await browser.tabs.query({active: true, currentWindow: true}))[0]; return (await chrome.tabs.query({active: true, currentWindow: true}))[0];
} }

View File

@ -1,7 +1,6 @@
import { decycle } from 'json-cyclic'; import { decycle } from 'json-cyclic';
import Comms from './comms/Comms'; import Comms from './comms/Comms';
import BrowserDetect from '../conf/BrowserDetect'; import BrowserDetect from '../conf/BrowserDetect';
import { browser } from 'webextension-polyfill-ts';
if (process.env.CHANNEL !== 'stable'){ if (process.env.CHANNEL !== 'stable'){
console.info('Loading Logger'); console.info('Loading Logger');
@ -92,7 +91,7 @@ class Logger {
this.vuexStore = options?.vuexStore; this.vuexStore = options?.vuexStore;
this.uwInstance = options?.uwInstance; this.uwInstance = options?.uwInstance;
browser.storage.onChanged.addListener((changes, area) => { chrome.storage.onChanged.addListener((changes, area) => {
this.storageChangeListener(changes, area) this.storageChangeListener(changes, area)
}); });
} }
@ -102,11 +101,11 @@ class Logger {
console.info('Saving logger conf:', conf) console.info('Saving logger conf:', conf)
} }
browser.storage.local.set( {'uwLogger': JSON.stringify(conf)}); chrome.storage.local.set( {'uwLogger': JSON.stringify(conf)});
} }
static syncConfig(callback: (x) => void) { static syncConfig(callback: (x) => void) {
browser.storage.onChanged.addListener( (changes, area) => { chrome.storage.onChanged.addListener( (changes, area) => {
if (changes.uwLogger) { if (changes.uwLogger) {
const newLoggerConf = JSON.parse(changes.uwLogger.newValue) const newLoggerConf = JSON.parse(changes.uwLogger.newValue)
if (process.env.CHANNEL === 'dev') { if (process.env.CHANNEL === 'dev') {
@ -121,10 +120,10 @@ class Logger {
let ret; let ret;
// if (BrowserDetect.firefox) { // if (BrowserDetect.firefox) {
ret = await browser.storage.local.get('uwLogger'); ret = await chrome.storage.local.get('uwLogger');
// } else if (BrowserDetect.anyChromium) { // } else if (BrowserDetect.anyChromium) {
// ret = await new Promise( (resolve, reject) => { // ret = await new Promise( (resolve, reject) => {
// browser.storage.local.get('uwLogger', (res) => resolve(res)); // chrome.storage.local.get('uwLogger', (res) => resolve(res));
// }); // });
// } // }
@ -171,7 +170,7 @@ class Logger {
this.temp_disable = false; this.temp_disable = false;
this.stopTime = this.conf.timeout ? performance.now() + (this.conf.timeout * 1000) : undefined; this.stopTime = this.conf.timeout ? performance.now() + (this.conf.timeout * 1000) : undefined;
browser.storage.onChanged.addListener( (changes, area) => { chrome.storage.onChanged.addListener( (changes, area) => {
if (process.env.CHANNEL === 'dev') { if (process.env.CHANNEL === 'dev') {
if (!changes.uwLogger) { if (!changes.uwLogger) {
// console.info('[Logger::<storage/on change> No new logger settings!'); // console.info('[Logger::<storage/on change> No new logger settings!');

View File

@ -10,7 +10,6 @@ import CropModePersistence from '../../common/enums/CropModePersistence.enum';
import BrowserDetect from '../conf/BrowserDetect'; import BrowserDetect from '../conf/BrowserDetect';
import Logger from './Logger'; import Logger from './Logger';
import SettingsInterface from '../../common/interfaces/SettingsInterface'; import SettingsInterface from '../../common/interfaces/SettingsInterface';
import { browser } from 'webextension-polyfill-ts';
import AspectRatioType from '../../common/enums/AspectRatioType.enum'; import AspectRatioType from '../../common/enums/AspectRatioType.enum';
import { SiteSettings } from './settings/SiteSettings'; import { SiteSettings } from './settings/SiteSettings';
@ -48,7 +47,7 @@ class Settings {
this.default = ExtensionConf; this.default = ExtensionConf;
this.default['version'] = this.getExtensionVersion(); this.default['version'] = this.getExtensionVersion();
browser.storage.onChanged.addListener((changes, area) => {this.storageChangeListener(changes, area)}); chrome.storage.onChanged.addListener((changes, area) => {this.storageChangeListener(changes, area)});
} }
private storageChangeListener(changes, area) { private storageChangeListener(changes, area) {
@ -79,7 +78,7 @@ class Settings {
} }
static getExtensionVersion(): string { static getExtensionVersion(): string {
return browser.runtime.getManifest().version; return chrome.runtime.getManifest().version;
} }
getExtensionVersion(): string { getExtensionVersion(): string {
return Settings.getExtensionVersion(); return Settings.getExtensionVersion();
@ -273,7 +272,7 @@ class Settings {
async get() { async get() {
let ret; let ret;
ret = await browser.storage.local.get('uwSettings'); ret = await chrome.storage.local.get('uwSettings');
this.logger?.log('info', 'settings', 'Got settings:', ret && ret.uwSettings && JSON.parse(ret.uwSettings)); this.logger?.log('info', 'settings', 'Got settings:', ret && ret.uwSettings && JSON.parse(ret.uwSettings));
@ -291,7 +290,7 @@ class Settings {
this.logger?.log('info', 'settings', "[Settings::set] setting new settings:", extensionConf) this.logger?.log('info', 'settings', "[Settings::set] setting new settings:", extensionConf)
return browser.storage.local.set( {'uwSettings': JSON.stringify(extensionConf)}); return chrome.storage.local.set( {'uwSettings': JSON.stringify(extensionConf)});
} }
async setActive(activeSettings) { async setActive(activeSettings) {

View File

@ -1,6 +1,5 @@
import Debug from '../../conf/Debug'; import Debug from '../../conf/Debug';
import BrowserDetect from '../../conf/BrowserDetect'; import BrowserDetect from '../../conf/BrowserDetect';
import { browser } from 'webextension-polyfill-ts';
if (process.env.CHANNEL !== 'stable'){ if (process.env.CHANNEL !== 'stable'){
console.info("Loading Comms"); console.info("Loading Comms");
@ -8,7 +7,7 @@ if (process.env.CHANNEL !== 'stable'){
class Comms { class Comms {
static async sendMessage(message){ static async sendMessage(message){
browser.runtime.sendMessage(message); chrome.runtime.sendMessage(message);
} }
} }

View File

@ -1,7 +1,6 @@
import Debug from '../../conf/Debug'; import Debug from '../../conf/Debug';
import BrowserDetect from '../../conf/BrowserDetect'; import BrowserDetect from '../../conf/BrowserDetect';
import Logger from '../Logger'; import Logger from '../Logger';
import { browser } from 'webextension-polyfill-ts';
import Settings from '../Settings'; import Settings from '../Settings';
import EventBus, { EventBusContext } from '../EventBus'; import EventBus, { EventBusContext } from '../EventBus';
@ -71,6 +70,7 @@ export enum CommsOrigin {
class CommsClient { class CommsClient {
commsId: string; commsId: string;
name: string;
origin: CommsOrigin; origin: CommsOrigin;
logger: Logger; logger: Logger;
@ -79,10 +79,11 @@ class CommsClient {
eventBus: EventBus; eventBus: EventBus;
_listener: (m: any) => void; _listener: (m: any) => void;
port: any; port: chrome.runtime.Port;
//#region lifecycle //#region lifecycle
constructor(name: string, logger: Logger, eventBus: EventBus) { constructor(name: string, logger: Logger, eventBus: EventBus) {
this.name = name;
try { try {
this.logger = logger; this.logger = logger;
this.eventBus = eventBus; this.eventBus = eventBus;
@ -93,7 +94,12 @@ class CommsClient {
this.origin = CommsOrigin.ContentScript; this.origin = CommsOrigin.ContentScript;
} }
this.port = browser.runtime.connect(null, {name: name}); // if (BrowserDetect.firefox) {
// this.port = chrome.runtime.connect(null, {name: name});
// } else {
// this connects to the background page
this.port = chrome.runtime.connect(null, {name: name});
// }
this.logger.onLogEnd( this.logger.onLogEnd(
(history) => { (history) => {

View File

@ -3,7 +3,6 @@ import Debug from '../../conf/Debug';
import BrowserDetect from '../../conf/BrowserDetect'; import BrowserDetect from '../../conf/BrowserDetect';
import Logger from '../Logger'; import Logger from '../Logger';
import Settings from '../Settings'; import Settings from '../Settings';
import { browser } from 'webextension-polyfill-ts';
import ExtensionMode from '../../../common/enums/ExtensionMode.enum'; import ExtensionMode from '../../../common/enums/ExtensionMode.enum';
import EventBus from '../EventBus'; import EventBus from '../EventBus';
import { CommsOrigin } from './CommsClient'; import { CommsOrigin } from './CommsClient';
@ -55,7 +54,7 @@ class CommsServer {
//#region getters //#region getters
get activeTab() { get activeTab() {
return browser.tabs.query({currentWindow: true, active: true}); return chrome.tabs.query({currentWindow: true, active: true});
} }
//#endregion //#endregion
@ -66,8 +65,8 @@ class CommsServer {
this.settings = server.settings; this.settings = server.settings;
this.eventBus = server.eventBus; this.eventBus = server.eventBus;
browser.runtime.onConnect.addListener(p => this.onConnect(p)); chrome.runtime.onConnect.addListener(p => this.onConnect(p));
browser.runtime.onMessage.addListener((m, sender) => this.processReceivedMessage_nonpersistent(m, sender)); chrome.runtime.onMessage.addListener((m, sender) => this.processReceivedMessage_nonpersistent(m, sender));
} }
private onConnect(port){ private onConnect(port){

View File

@ -3,7 +3,6 @@ import ExtensionMode from '../../../common/enums/ExtensionMode.enum';
import { SettingsReloadComponent, SettingsReloadFlags, SiteSettingsInterface } from '../../../common/interfaces/SettingsInterface'; import { SettingsReloadComponent, SettingsReloadFlags, SiteSettingsInterface } from '../../../common/interfaces/SettingsInterface';
import { _cp } from '../../../common/js/utils'; import { _cp } from '../../../common/js/utils';
import Settings from '../Settings'; import Settings from '../Settings';
import { browser } from 'webextension-polyfill-ts';
import StretchType from '../../../common/enums/StretchType.enum'; import StretchType from '../../../common/enums/StretchType.enum';
import VideoAlignmentType from '../../../common/enums/VideoAlignmentType.enum'; import VideoAlignmentType from '../../../common/enums/VideoAlignmentType.enum';
@ -45,7 +44,7 @@ export class SiteSettings {
sessionStorage.setItem('uw-session-defaults', JSON.stringify(this.sessionData)); sessionStorage.setItem('uw-session-defaults', JSON.stringify(this.sessionData));
} }
browser.storage.onChanged.addListener((changes, area) => {this.storageChangeListener(changes, area)}) chrome.storage.onChanged.addListener((changes, area) => {this.storageChangeListener(changes, area)})
} }
/** /**

View File

@ -13,8 +13,8 @@ class UI {
this.isGlobal = uiConfig.isGlobal ?? false; this.isGlobal = uiConfig.isGlobal ?? false;
// TODO: at some point, UI should be different for global popup and in-player UI // TODO: at some point, UI should be different for global popup and in-player UI
this.uiURI = browser.runtime.getURL('/csui/csui.html'); this.uiURI = chrome.runtime.getURL('/csui/csui.html');
this.extensionBase = browser.runtime.getURL('').replace(/\/$/, ""); this.extensionBase = chrome.runtime.getURL('').replace(/\/$/, "");
this.eventBus = uiConfig.eventBus; this.eventBus = uiConfig.eventBus;
} }

View File

@ -65,7 +65,7 @@ export default {
selectedSite: '', selectedSite: '',
activeFrames: [], activeFrames: [],
activeSites: [], activeSites: [],
port: BrowserDetect.firefox ? browser.runtime.connect({name: 'popup-port'}) : chrome.runtime.connect({name: 'popup-port'}), port: BrowserDetect.firefox ? chrome.runtime.connect({name: 'popup-port'}) : chrome.runtime.connect({name: 'popup-port'}),
comms: new Comms(), comms: new Comms(),
frameStore: {}, frameStore: {},
frameStoreCount: 0, frameStoreCount: 0,

View File

@ -66,7 +66,7 @@ export default {
selectedSite: '', selectedSite: '',
activeFrames: [], activeFrames: [],
activeSites: [], activeSites: [],
port: BrowserDetect.firefox ? browser.runtime.connect({name: 'popup-port'}) : chrome.runtime.connect({name: 'popup-port'}), port: BrowserDetect.firefox ? chrome.runtime.connect({name: 'popup-port'}) : chrome.runtime.connect({name: 'popup-port'}),
comms: new Comms(), comms: new Comms(),
frameStore: {}, frameStore: {},
frameStoreCount: 0, frameStoreCount: 0,