Skip to content

Commit

Permalink
update manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
marcustyphoon committed Nov 16, 2024
1 parent db29778 commit 7ade974
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions Extensions/xkit_patches.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ XKit.extensions.xkit_patches = new Object({
if (XKit.browser().firefox === true && XKit.storage.get("xkit_patches", "w_edition_warned") !== "true") {
let version = XKit.tools.parse_version(XKit.version);
if (version.major === 7 && version.minor >= 8) {
fetch(browser.extension.getURL("manifest.json")) // eslint-disable-line no-undef
fetch(browser.runtime.getURL("manifest.json")) // eslint-disable-line no-undef
.then(response => response.json())
.then(responseData => {
if (responseData.applications.gecko.id === "@new-xkit-w") {
if (responseData.applications && responseData.applications.gecko.id === "@new-xkit-w" ||
responseData.browser_specific_settings && responseData.browser_specific_settings.gecko.id === "@new-xkit-w") {
XKit.window.show(
"W Edition warning",
"XKit Patches has determined that you are using <br><b>New XKit (W Edition)</b>, an unofficial upload of New XKit.<br><br>" +
Expand Down
2 changes: 1 addition & 1 deletion bridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function getBridgeError() { // eslint-disable-line no-redeclare

function getVersion() {
var xhr = new XMLHttpRequest();
xhr.open('GET', browser.extension.getURL('manifest.json'), false);
xhr.open('GET', browser.runtime.getURL('manifest.json'), false);
xhr.send(null);
var manifest = JSON.parse(xhr.responseText);
return manifest.version;
Expand Down
5 changes: 3 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,16 @@
"128": "icon.png"
},
"manifest_version": 2,
"minimum_chrome_version": "44.0",
"minimum_chrome_version": "88.0",
"name": "New XKit",
"author": "New XKit Team",
"permissions": ["storage", "unlimitedStorage", "*://*.tumblr.com/*", "https://new-xkit.github.io/XKit/*", "https://cloud.new-xkit.com/*" ],
"version": "7.10.0",
"web_accessible_resources": [ "*.js", "*.json", "*.css" ],
"applications": {
"browser_specific_settings": {
"gecko": {
"id": "@new-xkit",
"strict_min_version": "89.0",
"update_url": "https://new-xkit.github.io/XKit/Extensions/dist/page/FirefoxUpdate.json"
}
}
Expand Down

0 comments on commit 7ade974

Please sign in to comment.