From c79e1c02a703f37894c3883c086d93fda029967c Mon Sep 17 00:00:00 2001 From: nobody Date: Sun, 11 Apr 2021 08:03:42 +0200 Subject: [PATCH] Deprecated function removed --- core/constants.js | 14 +++++++------- core/interceptor.js | 2 +- core/main.js | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/core/constants.js b/core/constants.js index 913031e4..c250d421 100644 --- a/core/constants.js +++ b/core/constants.js @@ -213,16 +213,16 @@ const Regex = { const Links = { 'CODEBERG_HTML_FILTER': 'https://codeberg.org/nobody/LocalCDN/wiki/Home#user-content-7-a-website-looks-weird-or-cannot-be-used-if-i-deactivate-localcdn-everything-works-what-is-the-problem', 'CODEBERG_RULESET': 'https://codeberg.org/nobody/LocalCDN/wiki/Home#user-content-6-why-do-i-need-this-rule-generator-i-use-an-adblocker-and-want-to-import-these-rules-how-does-it-work', - 'WELCOME': chrome.extension.getURL('pages/welcome/welcome.html'), - 'DONATE': chrome.extension.getURL('pages/donate/donate.html'), - 'CHANGELOG': chrome.extension.getURL('pages/updates/updates.html'), - 'FAQ': chrome.extension.getURL('pages/help/help.html'), - 'FAQ_HTML_FILTER': chrome.extension.getURL('pages/help/help.html#html-filter'), - 'STATISTICS': chrome.extension.getURL('pages/statistics/statistics.html'), + 'WELCOME': chrome.runtime.getURL('pages/welcome/welcome.html'), + 'DONATE': chrome.runtime.getURL('pages/donate/donate.html'), + 'CHANGELOG': chrome.runtime.getURL('pages/updates/updates.html'), + 'FAQ': chrome.runtime.getURL('pages/help/help.html'), + 'FAQ_HTML_FILTER': chrome.runtime.getURL('pages/help/help.html#html-filter'), + 'STATISTICS': chrome.runtime.getURL('pages/statistics/statistics.html'), 'LOCALCDN_TEST': 'https://www.localcdn.org/test', 'LOCALCDN_TEST_WEBSITE': 'https://www.localcdn.org/test/check', 'WEBLATE': 'https://hosted.weblate.org/projects/localcdn/localcdn/', - 'LOGGING': chrome.extension.getURL('pages/logging/logging.html'), + 'LOGGING': chrome.runtime.getURL('pages/logging/logging.html'), }; const CDNs = { diff --git a/core/interceptor.js b/core/interceptor.js index 9be89979..4501bb6e 100644 --- a/core/interceptor.js +++ b/core/interceptor.js @@ -74,7 +74,7 @@ interceptor.handleRequest = function (requestDetails, tabIdentifier, tab) { }; return { - 'redirectUrl': chrome.extension.getURL(targetPath + fileGuard.secret) + 'redirectUrl': chrome.runtime.getURL(targetPath + fileGuard.secret) }; }; diff --git a/core/main.js b/core/main.js index 5bc0b5db..5e9e522a 100644 --- a/core/main.js +++ b/core/main.js @@ -85,7 +85,7 @@ main._showReleaseNotes = function (details) { }, function () { if (details.temporary !== true) { chrome.tabs.create({ - 'url': chrome.extension.getURL('pages/welcome/welcome.html'), + 'url': chrome.runtime.getURL('pages/welcome/welcome.html'), 'active': true }); } @@ -111,7 +111,7 @@ main._showReleaseNotes = function (details) { if ((mappingUpdate && items.updateNotification === 1) || items.updateNotification === 2) { chrome.tabs.create({ - 'url': chrome.extension.getURL(`pages/updates/updates.html?mappingupdate=${mappingUpdate}`), + 'url': chrome.runtime.getURL(`pages/updates/updates.html?mappingupdate=${mappingUpdate}`), 'active': false }); } else {