mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
parent
3a149a2869
commit
4849fe50e5
@ -24,9 +24,10 @@ var gUnblockButton;
|
||||
var gPageReport;
|
||||
var gUPMsg;
|
||||
|
||||
var popupmanager =
|
||||
Components.classes["@mozilla.org/PopupWindowManager;1"]
|
||||
.getService(Components.interfaces.nsIPopupWindowManager);
|
||||
var permissionmanager =
|
||||
Components.classes["@mozilla.org/permissionmanager;1"]
|
||||
.getService(Components.interfaces.nsIPermissionManager);
|
||||
var nsIPermissionManager = Components.interfaces.nsIPermissionManager;
|
||||
|
||||
function onLoad()
|
||||
{
|
||||
@ -70,11 +71,9 @@ function whitelistSite()
|
||||
if (!selectedItem)
|
||||
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);
|
||||
uri.spec = selectedItem.label;
|
||||
popupmanager.add(uri, true);
|
||||
permissionmanager.add(uri, nsIPermissionManager.POPUP_TYPE, nsIPermissionManager.ALLOW_ACTION);
|
||||
gSiteBox.removeChild(selectedItem);
|
||||
|
||||
// XXXlocalize
|
||||
|
Loading…
Reference in New Issue
Block a user