Skip to content

Commit

Permalink
clean up misc deprecated function calls
Browse files Browse the repository at this point in the history
  • Loading branch information
marcustyphoon committed Jan 7, 2025
1 parent f616edf commit a81a9b1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Extensions/xkit_patches.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,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
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"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": "115.0",
Expand Down

0 comments on commit a81a9b1

Please sign in to comment.