mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 20:46:39 +02:00
Run setting migration only in background script
This commit is contained in:
parent
b7a8a51a56
commit
505fb6409e
2 changed files with 9 additions and 1 deletions
|
@ -12,6 +12,14 @@
|
|||
scope = require.register("./extension", {});
|
||||
}
|
||||
|
||||
const browserAvailable = typeof browser !== "undefined";
|
||||
|
||||
scope.inBackgroundScript = !!(
|
||||
browserAvailable &&
|
||||
browser.extension.getBackgroundPage &&
|
||||
browser.extension.getBackgroundPage() === window
|
||||
);
|
||||
|
||||
scope.getTranslation = function getTranslation(id){
|
||||
return browser.i18n.getMessage(id);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue