mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2024-12-22 12:50:36 +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:
parent
637f2dd465
commit
4ed4bb759b
Binary file not shown.
11
lib/main.js
11
lib/main.js
@ -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: "",
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user