1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-12-22 21:00:23 +01:00

Changed notification not to show full URL but only domain. Added button to show full URL.

Fixes #33
This commit is contained in:
kkapsner 2015-09-01 21:40:30 +02:00
parent 637f2dd465
commit 4ed4bb759b
4 changed files with 12 additions and 1 deletions

Binary file not shown.

View File

@ -149,7 +149,7 @@
if (prefs.showNotifications && !ignoreList.match(contentURL)){
var url = contentURL.href;
var domain = contentURL.hostname;
var message = _("fakedReadout").replace(/\{url\}/g, url);
var message = _("fakedReadout").replace(/\{url\}/g, domain);
var tab = tabUtils.getTabForId(worker.tab.id);
var tabBrowser = tabUtils.getTabBrowserForTab(tab);
@ -162,6 +162,15 @@
}
else {
var buttons = [
{
label: _("displayFullURL"),
accessKey: "",
callback: function(){
browser.contentWindow.alert(url);
// only way to prevent closing... see https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Method/appendNotification#Notification_box_events
throw new Error("Do not close notification.");
}
},
{
label: _("displayCallingStack"),
accessKey: "",

View File

@ -47,6 +47,7 @@ stackEntryOutput= {url} Zeile {line} Spalte {column}
fakedReadout = Auslese vorgetäuscht auf {url}
settings = Einstellungen
displayCallingStack = Aufrufestack anzeigen
displayFullURL = URL anzeigen
whitelistURL = erlaube URL
whitelistDomain = erlaube Domain
disableNotifications = Benachrichtigungen deaktivieren

View File

@ -47,6 +47,7 @@ stackEntryOutput= {url} line {line} column {column}
fakedReadout = Faked readout on {url}
settings = settings
displayCallingStack = display calling stack
displayFullURL = display full URL
whitelist = whitelist
whitelistURL = whitelist URL
whitelistDomain = whitelist domain