Skip to content

Commit da01a9a

Browse files
Update browser requirements to es2022 (#2176)
1 parent 2a79c6a commit da01a9a

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

.eslintrc.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
root: true
33
parserOptions:
4-
ecmaVersion: 2018
4+
ecmaVersion: 2022
55
env:
6-
es6: true
6+
es2022: true
77
browser: true
88
jquery: true
99
webextensions: true
@@ -50,7 +50,6 @@
5050
parserOptions:
5151
sourceType: module
5252
globals:
53-
BigInt: readonly
5453
_: readonly
5554
moment: readonly
5655
XKit: writable

manifest.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"128": "icon.png"
2828
},
2929
"manifest_version": 2,
30-
"minimum_chrome_version": "44.0",
30+
"minimum_chrome_version": "103.0",
3131
"name": "New XKit",
3232
"author": "New XKit Team",
3333
"permissions": ["storage", "unlimitedStorage", "*://*.tumblr.com/*", "https://new-xkit.github.io/XKit/*", "https://cloud.new-xkit.com/*" ],
@@ -36,6 +36,7 @@
3636
"applications": {
3737
"gecko": {
3838
"id": "@new-xkit",
39+
"strict_min_version": "115.0",
3940
"update_url": "https://new-xkit.github.io/XKit/Extensions/dist/page/FirefoxUpdate.json"
4041
}
4142
}

xkit.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4391,7 +4391,7 @@ function show_message(title, msg, icon, buttons) {
43914391
});
43924392
}
43934393

4394-
function xkit_init_special() {
4394+
async function xkit_init_special() {
43954395

43964396
$("body").html("");
43974397
document.title = "XKit";
@@ -4417,11 +4417,8 @@ function xkit_init_special() {
44174417

44184418
if (document.location.href.indexOf("/xkit_editor") !== -1) {
44194419
if (typeof(browser) !== 'undefined') {
4420-
var xhr = new XMLHttpRequest();
4421-
xhr.open('GET', browser.extension.getURL('editor.js'), false);
4422-
xhr.send(null);
44234420
try {
4424-
new Function(xhr.responseText + "\n//# sourceURL=xkit/editor.js")();
4421+
await import(browser.runtime.getURL("/editor.js"));
44254422
XKit.extensions.xkit_editor.run();
44264423
} catch (e) {
44274424
XKit.window.show("Can't launch XKit Editor", "<p>" + e.message + "</p>", "error", "<div id=\"xkit-close-message\" class=\"xkit-button default\">OK</div>");

0 commit comments

Comments
 (0)