diff --git a/lib/main.js b/lib/main.js index 5c12f0e..b1e90a3 100644 --- a/lib/main.js +++ b/lib/main.js @@ -198,18 +198,7 @@ var contentURL = new URL(worker.contentURL); var url = contentURL.href; var domain = contentURL.hostname; - var message = "Faked readout on " + url; - - // log(" worker.tab", worker.tab); - // log(" windowUtils", windowUtils); - // log(" ", windowUtils.windows("navigator:browser", {includePrivate: true})[0][0]); - // log(" ", windowUtils.windows("navigator:browser", {includePrivate: true})[0][1]); - // log(" ", windowUtils.windows("navigator:browser", {includePrivate: true})[0][2]); - // log(" tabs", tabUtils.getTabs()); - // console.log(worker.tab.id); - // for each (let tab in tabUtils.getTabs()){ - // console.log(tabUtils.getTabId(tab)); - // } + var message = _("fakedReadout").replace(/\{url\}/g, url); var tab = tabUtils.getTabForId(worker.tab.id); var tabBrowser = tabUtils.getTabBrowserForTab(tab); @@ -219,7 +208,7 @@ // var notifyBox = ownerBrowser.gBrowser.getNotificationBox(); var notifyBox = tabBrowser.getNotificationBox(); // log(" chrome window", require("sdk/windows").browserWindows); - // var notifyBox = windowUtils.getXULWindow(browser.contentWindow).XULBrowserWindow.getNotificationBox(windowUtils.getDOMWindow(browser.contentWindow)); + // var notifyBox = windowUtils.getXULWindow(browser.contentWindow).XULBrowserWindow.getNotificationBox(browser.contentWindow); var notification = notifyBox.getNotificationWithValue("fake-readout"); if (notification){ notification.label = message; @@ -227,7 +216,7 @@ else { var buttons = [ { - label: "whitelist URL", + label: _("whitelistURL"), accessKey: "", callback: function(){ prefs.whiteList += "," + url; @@ -237,7 +226,7 @@ } }, { - label: "whitelist domain", + label: _("whitelistDomain"), accessKey: "", callback: function(){ prefs.whiteList += "," + domain; diff --git a/locale/de-DE.properties b/locale/de-DE.properties index 85b2e31..ca6766a 100644 --- a/locale/de-DE.properties +++ b/locale/de-DE.properties @@ -36,4 +36,10 @@ askForVisibleReadoutPermission= Wollen Sie das Auslesen des rot umrandeten erlauben? sourceOutput= Aufrufende Datei -stackEntryOutput= {url} Zeile {line} Spalte {column} \ No newline at end of file +stackEntryOutput= {url} Zeile {line} Spalte {column} + +fakedReadout = Auslese vorgetäuscht auf {url} +settings = Einstellungen +displayCallingStack = Aufrufestack anzeigen +whitelistURL = erlaube URL +whitelistDomain = erlaube Domain \ No newline at end of file diff --git a/locale/en-US.properties b/locale/en-US.properties index 2d1bdb9..692fc69 100644 --- a/locale/en-US.properties +++ b/locale/en-US.properties @@ -36,4 +36,11 @@ askForVisibleReadoutPermission= Do you want to allow the readout of the red bord askForInvisibleReadoutPermission= Do you want to allow invisible readout? sourceOutput= Calling file -stackEntryOutput= {url} line {line} column {column} \ No newline at end of file +stackEntryOutput= {url} line {line} column {column} + +fakedReadout = Faked readout on {url} +settings = settings +displayCallingStack = display calling stack +whitelist = whitelist +whitelistURL = whitelist URL +whitelistDomain = whitelist domain \ No newline at end of file