Replaced deprecated API

This commit is contained in:
Kevin R
2021-12-28 18:02:48 +01:00
parent 958f1e3515
commit a677797b1c
6 changed files with 27 additions and 8 deletions

View File

@@ -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};