diff --git a/CHANGELOG.md b/CHANGELOG.md index 5cd75c6..5174131 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Updated Turkish translation by Ümit - Updated Chinese (traditional) translation by 1304274443 - Updated Chinese (simplified) translation by Eric +- Replaced deprecated `extension.getURL` by `runtime.getURL` ## [1.21.0] - 2021-03-24 diff --git a/_locales/pt_BR/messages.json b/_locales/pt_BR/messages.json index 574b0f2..ee011fe 100644 --- a/_locales/pt_BR/messages.json +++ b/_locales/pt_BR/messages.json @@ -262,7 +262,13 @@ "message": "Importa tudo" }, "setting_log_limit_label": { - "message": "Limitar o registro (log) a $LIMIT$ itens." + "message": "Limitar o registro (log) a $LIMIT$ itens.", + "placeholders": { + "limit": { + "content": "$1", + "example": "100" + } + } }, "blocked_html_title": { "message": "Este site foi bloqueado por ClearURLs" @@ -280,7 +286,13 @@ "message": "Permite marketing de referência (\"referral\")" }, "watchdog": { - "message": "[ClearURLs]: O watchdog detectou um problema e já falhou $TIMES$ vezes." + "message": "[ClearURLs]: O watchdog detectou um problema e já falhou $TIMES$ vezes.", + "placeholders": { + "times": { + "content": "$1", + "example": "3" + } + } }, "domain_blocking_enabled": { "message": "Permitir bloqueio de domínio (pode causar problemas em páginas que não permitem AdBlockers)" diff --git a/_locales/pt_PT/messages.json b/_locales/pt_PT/messages.json index aa47478..0508fbb 100644 --- a/_locales/pt_PT/messages.json +++ b/_locales/pt_PT/messages.json @@ -238,7 +238,13 @@ "message": "Permite marketing com referências" }, "watchdog": { - "message": "[ClearURLs]: o \"cão de vigia\" detetou um problema e já falhou $TIMES$ vezes.\n" + "message": "[ClearURLs]: o \"cão de vigia\" detetou um problema e já falhou $TIMES$ vezes.", + "placeholders": { + "times": { + "content": "$1", + "example": "3" + } + } }, "domain_blocking_enabled": { "message": "Permitir o bloqueio de domínios (pode causar problemas em páginas que não permitem bloqueadores de anúncios)" diff --git a/clearurls.js b/clearurls.js index ef3437a..cd34fba 100644 --- a/clearurls.js +++ b/clearurls.js @@ -654,7 +654,7 @@ function start() { */ if (result.cancel) { if (request.type === 'main_frame') { - const blockingPage = browser.extension.getURL("html/siteBlockedAlert.html?source=" + encodeURIComponent(request.url)); + const blockingPage = browser.runtime.getURL("html/siteBlockedAlert.html?source=" + encodeURIComponent(request.url)); browser.tabs.update(request.tabId, {url: blockingPage}).catch(handleError); return {cancel: true}; diff --git a/core_js/log.js b/core_js/log.js index 429ec92..f9bb244 100644 --- a/core_js/log.js +++ b/core_js/log.js @@ -93,7 +93,7 @@ function getDataTableTranslation() { let lang = browser.i18n.getUILanguage(); lang = lang.substring(0,2); - return browser.extension.getURL('./external_js/dataTables/i18n/' + lang + '.lang'); + return browser.runtime.getURL('./external_js/dataTables/i18n/' + lang + '.lang'); } /** diff --git a/core_js/popup.js b/core_js/popup.js index 8818632..867820f 100644 --- a/core_js/popup.js +++ b/core_js/popup.js @@ -196,9 +196,9 @@ function resetGlobalCounter(){ changeSwitchButton("tabcounter", "badgedStatus"); changeSwitchButton("logging", "loggingStatus"); changeSwitchButton("statistics", "statisticsStatus"); - document.getElementById('loggingPage').href = browser.extension.getURL('./html/log.html'); - document.getElementById('settings').href = browser.extension.getURL('./html/settings.html'); - document.getElementById('cleaning_tools').href = browser.extension.getURL('./html/cleaningTool.html'); + document.getElementById('loggingPage').href = browser.runtime.getURL('./html/log.html'); + document.getElementById('settings').href = browser.runtime.getURL('./html/settings.html'); + document.getElementById('cleaning_tools').href = browser.runtime.getURL('./html/cleaningTool.html'); setText(); }); })();