mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-12 00:50:40 +00:00
parent
3a149a2869
commit
4849fe50e5
@ -24,9 +24,10 @@ var gUnblockButton;
|
|||||||
var gPageReport;
|
var gPageReport;
|
||||||
var gUPMsg;
|
var gUPMsg;
|
||||||
|
|
||||||
var popupmanager =
|
var permissionmanager =
|
||||||
Components.classes["@mozilla.org/PopupWindowManager;1"]
|
Components.classes["@mozilla.org/permissionmanager;1"]
|
||||||
.getService(Components.interfaces.nsIPopupWindowManager);
|
.getService(Components.interfaces.nsIPermissionManager);
|
||||||
|
var nsIPermissionManager = Components.interfaces.nsIPermissionManager;
|
||||||
|
|
||||||
function onLoad()
|
function onLoad()
|
||||||
{
|
{
|
||||||
@ -70,11 +71,9 @@ function whitelistSite()
|
|||||||
if (!selectedItem)
|
if (!selectedItem)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// This is perverse and backwards. We have subverted Mozilla's blacklist implementation
|
|
||||||
// and made it into a whitelist. So we want to add this to the list of "blocked' popups.
|
|
||||||
var uri = Components.classes['@mozilla.org/network/standard-url;1'].createInstance(Components.interfaces.nsIURI);
|
var uri = Components.classes['@mozilla.org/network/standard-url;1'].createInstance(Components.interfaces.nsIURI);
|
||||||
uri.spec = selectedItem.label;
|
uri.spec = selectedItem.label;
|
||||||
popupmanager.add(uri, true);
|
permissionmanager.add(uri, nsIPermissionManager.POPUP_TYPE, nsIPermissionManager.ALLOW_ACTION);
|
||||||
gSiteBox.removeChild(selectedItem);
|
gSiteBox.removeChild(selectedItem);
|
||||||
|
|
||||||
// XXXlocalize
|
// XXXlocalize
|
||||||
|
Loading…
Reference in New Issue
Block a user