1
0
Fork 0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2025-07-03 12:06:31 +02:00

Moved i18n to extension module

This commit is contained in:
kkapsner 2019-04-09 08:29:52 +02:00
parent d89bfe4cb0
commit bab7d1496f
17 changed files with 101 additions and 85 deletions

View file

@ -12,6 +12,7 @@
scope = require.register("./search", {});
}
const extension = require("./extension");
const texts = [];
scope.register = function(text, content){
@ -52,7 +53,7 @@
scope.init = function(){
const node = document.createElement("input");
node.id = "search";
node.placeholder = browser.i18n.getMessage("search");
node.placeholder = extension.getTranslation("search");
window.setTimeout(() => node.focus(), 1);
let lastResults = [];
node.addEventListener("input", function(){