mirror of
https://gitlab.com/KevinRoebert/ClearUrls
synced 2025-12-15 21:55:36 +07:00
Replaced deprecated API
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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 <b>ClearURLs</b>"
|
||||
@@ -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)"
|
||||
|
||||
@@ -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)"
|
||||
|
||||
@@ -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};
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user