Bug 239240: Choosing Unblock Images from this Server in context menu whitelists site instead of removing permission, r=dwitte, sr=darin, a1.7=asa

This commit is contained in:
mconnor%myrealbox.com 2004-04-07 23:23:50 +00:00
Родитель 159b75ff24
Коммит e1d055c0f2
2 изменённых файлов: 6 добавлений и 8 удалений

Просмотреть файл

@ -39,7 +39,7 @@
var cookieContextMenu = {
// Determine if "Block Image" is to appear in the menu.
// Return true if "imageBlocker.enabled" pref is set and image is not already blocked.
// Return true if image is not already blocked.
isBlockingImages : function () {
/* determine if image is already being blocked */
const nsIPermissionManager = Components.interfaces.nsIPermissionManager;
@ -82,13 +82,12 @@
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
uri = ioService.newURI(gContextMenu.imageURL, null, null);
permissionmanager.add(uri, "image", nsIPermissionManager.ALLOW_ACTION);
permissionmanager.remove(uri.host, "image");
},
initImageBlocking : function () {
try {
// Block image depends on whether an image was clicked on, and,
// whether the user pref is enabled.
// Block image depends on whether an image was clicked on
gContextMenu.showItem
("context-blockimage",

Просмотреть файл

@ -39,7 +39,7 @@
var cookieContextMenu = {
// Determine if "Block Image" is to appear in the menu.
// Return true if "imageBlocker.enabled" pref is set and image is not already blocked.
// Return true if image is not already blocked.
isBlockingImages : function () {
/* determine if image is already being blocked */
const nsIPermissionManager = Components.interfaces.nsIPermissionManager;
@ -82,13 +82,12 @@
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
uri = ioService.newURI(gContextMenu.imageURL, null, null);
permissionmanager.add(uri, "image", nsIPermissionManager.ALLOW_ACTION);
permissionmanager.remove(uri.host, "image");
},
initImageBlocking : function () {
try {
// Block image depends on whether an image was clicked on, and,
// whether the user pref is enabled.
// Block image depends on whether an image was clicked on
gContextMenu.showItem
("context-blockimage",