mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-01-08 20:54:49 +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)){
|
if (prefs.showNotifications && !ignoreList.match(contentURL)){
|
||||||
var url = contentURL.href;
|
var url = contentURL.href;
|
||||||
var domain = contentURL.hostname;
|
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 tab = tabUtils.getTabForId(worker.tab.id);
|
||||||
var tabBrowser = tabUtils.getTabBrowserForTab(tab);
|
var tabBrowser = tabUtils.getTabBrowserForTab(tab);
|
||||||
@ -162,6 +162,15 @@
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var buttons = [
|
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"),
|
label: _("displayCallingStack"),
|
||||||
accessKey: "",
|
accessKey: "",
|
||||||
|
@ -47,6 +47,7 @@ stackEntryOutput= {url} Zeile {line} Spalte {column}
|
|||||||
fakedReadout = Auslese vorgetäuscht auf {url}
|
fakedReadout = Auslese vorgetäuscht auf {url}
|
||||||
settings = Einstellungen
|
settings = Einstellungen
|
||||||
displayCallingStack = Aufrufestack anzeigen
|
displayCallingStack = Aufrufestack anzeigen
|
||||||
|
displayFullURL = URL anzeigen
|
||||||
whitelistURL = erlaube URL
|
whitelistURL = erlaube URL
|
||||||
whitelistDomain = erlaube Domain
|
whitelistDomain = erlaube Domain
|
||||||
disableNotifications = Benachrichtigungen deaktivieren
|
disableNotifications = Benachrichtigungen deaktivieren
|
||||||
|
@ -47,6 +47,7 @@ stackEntryOutput= {url} line {line} column {column}
|
|||||||
fakedReadout = Faked readout on {url}
|
fakedReadout = Faked readout on {url}
|
||||||
settings = settings
|
settings = settings
|
||||||
displayCallingStack = display calling stack
|
displayCallingStack = display calling stack
|
||||||
|
displayFullURL = display full URL
|
||||||
whitelist = whitelist
|
whitelist = whitelist
|
||||||
whitelistURL = whitelist URL
|
whitelistURL = whitelist URL
|
||||||
whitelistDomain = whitelist domain
|
whitelistDomain = whitelist domain
|
||||||
|
Loading…
x
Reference in New Issue
Block a user