mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 11:26:09 +00:00
bug 154485, p3p icon only takes effect on new windows, r=sgehani, sr=jag
This commit is contained in:
parent
22e3e14e14
commit
4ea048345b
@ -91,17 +91,20 @@
|
||||
// make sure p3p dll exists, else we can't keep pref set
|
||||
if (!("@mozilla.org/cookie-consent;1" in Components.classes)) {
|
||||
gPref.setIntPref("network.cookie.cookieBehavior", 0);
|
||||
} else {
|
||||
|
||||
// p3p pref is set so create an observer for changes in visibility of cookie icon
|
||||
var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
|
||||
observerService.addObserver(cookieIconObserver, "cookieIcon", false);
|
||||
|
||||
// determine whether or not cookie icon in this new window should be displayed
|
||||
// we need to wait until window is created before displaying icon
|
||||
addEventListener("load", listener, false);
|
||||
}
|
||||
}
|
||||
|
||||
if ("@mozilla.org/cookie-consent;1" in Components.classes) {
|
||||
|
||||
// p3p dll exists so create an observer for changes in visibility of cookie icon
|
||||
var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
|
||||
observerService.addObserver(cookieIconObserver, "cookieIcon", false);
|
||||
|
||||
// determine whether or not cookie icon in this new window should be displayed
|
||||
// we need to wait until window is created before displaying icon
|
||||
addEventListener("load", listener, false);
|
||||
}
|
||||
|
||||
]]>
|
||||
</script>
|
||||
|
||||
|
@ -91,17 +91,20 @@
|
||||
// make sure p3p dll exists, else we can't keep pref set
|
||||
if (!("@mozilla.org/cookie-consent;1" in Components.classes)) {
|
||||
gPref.setIntPref("network.cookie.cookieBehavior", 0);
|
||||
} else {
|
||||
|
||||
// p3p pref is set so create an observer for changes in visibility of cookie icon
|
||||
var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
|
||||
observerService.addObserver(cookieIconObserver, "cookieIcon", false);
|
||||
|
||||
// determine whether or not cookie icon in this new window should be displayed
|
||||
// we need to wait until window is created before displaying icon
|
||||
addEventListener("load", listener, false);
|
||||
}
|
||||
}
|
||||
|
||||
if ("@mozilla.org/cookie-consent;1" in Components.classes) {
|
||||
|
||||
// p3p dll exists so create an observer for changes in visibility of cookie icon
|
||||
var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
|
||||
observerService.addObserver(cookieIconObserver, "cookieIcon", false);
|
||||
|
||||
// determine whether or not cookie icon in this new window should be displayed
|
||||
// we need to wait until window is created before displaying icon
|
||||
addEventListener("load", listener, false);
|
||||
}
|
||||
|
||||
]]>
|
||||
</script>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user