[Pkg-mozext-commits] [SCM] Cookie Monster extension for Iceweasel/Firefox branch, master, updated. upstream/1.0.5-15-g6955f85
Fabrizio Regalli
fabreg at fabreg.it
Fri Sep 9 14:04:30 UTC 2011
The following commit has been merged in the master branch:
commit 6955f85c9a0af4795553bb151c79e36aab4150a6
Author: Fabrizio Regalli <fabreg at fabreg.it>
Date: Fri Sep 9 16:04:21 2011 +0200
Repack .orig.tar.gz
diff --git a/chrome/cookiemonster.jar!/content/cookieInfo.js b/chrome/cookiemonster.jar!/content/cookieInfo.js
deleted file mode 100644
index c7b76fc..0000000
--- a/chrome/cookiemonster.jar!/content/cookieInfo.js
+++ /dev/null
@@ -1,585 +0,0 @@
-/**
- * Retrieve cookie information for the current URL
- * @type cookieMonster_CookieInfo
- */
-var cookieMonster_CookieInfo =
-{
- choice: null,
- _bundle: null,
- _isExactPerm: false,
- _isEffectiveTLDService: false,
- _tempAllowList: null,
- _globalOverrideList: null,
-
- init: function()
- {
- // Declare instance of cookie permission and
- // query an nsICookiePermission interface
- this.choice = Components.classes["@mozilla.org/cookie/permission;1"].createInstance();
- this.choice.QueryInterface(Components.interfaces.nsICookiePermission);
-
- this._bundle = document.getElementById("cookie-preferences");
-
- // Check if the method testExactPermission is available
- // in the version of the Moz engine being used
- // Note: Currently, testExactPermission is not available
- // in Moz 1.8 (FF2), but is available in Moz 1.9 (FF3)
- var accessString = CM_COOKIE_ACCESS_DEFAULT;
- var permissionManager = Components.classes["@mozilla.org/permissionmanager;1"]
- .getService(Components.interfaces.nsIPermissionManager);
- if (permissionManager.testExactPermission)
- {
- this._isExactPerm = true;
- }
-
- // Check if the service nsIEffectiveTLDService is available
- // in the version of the Moz engine being used
- // Note: Currently, testExactPermission is not available
- // in Moz 1.8 (FF2), but is available in Moz 1.9 (FF3)
- if (Components.classes["@mozilla.org/network/effective-tld-service;1"])
- {
- this._isEffectiveTLDService = true;
- }
-
- // Initialize TempAllow
- cookieMonster_TempAllow.init();
-
- // Check if CM_PREFERENCE_TYPE_GLOBAL_OVERRIDE contains
- // any URLs and if so, add to _globalOverrideList
- this._globalOverrideList = cookieMonster_nsPreferences.getStringPrefArray(CM_PREFERENCE_TYPE_GLOBAL_OVERRIDE);
- },
-
- isExactPermissions: function()
- {
- return this._isExactPerm;
- },
-
- getGlobalOverrideList: function()
- {
- return this._globalOverrideList;
- },
-
- setGlobalOverrideList: function()
- {
- this._globalOverrideList = cookieMonster_nsPreferences.getStringPrefArray(CM_PREFERENCE_TYPE_GLOBAL_OVERRIDE);
- },
-
- // Check the cookie access level for the URI and
- // return this value
- checkCookieAccess: function(aRequest, aURI)
- {
- aRequest.QueryInterface(Components.interfaces.nsIChannel);
-
- return this.choice.canAccess(aURI , aRequest.originalURI , aRequest);
- },
-
- // Check the cookie access level for the URI and
- // return a string representation of this value
- checkCookieAccessString: function(aRequest, aURI)
- {
- var accessString = CM_COOKIE_ACCESS_DEFAULT;
-
- aRequest.QueryInterface(Components.interfaces.nsIChannel);
-
- switch (this.choice.canAccess(aURI , aRequest.originalURI , aRequest))
- {
- case CM_CA_LEVEL_DEFAULT:
- accessString = CM_COOKIE_ACCESS_DEFAULT;
- break;
- case nsIPermissionManager.ALLOW_ACTION:
- accessString = CM_COOKIE_ACCESS_ALLOW;
- break;
- case nsIPermissionManager.DENY_ACTION:
- accessString = CM_COOKIE_ACCESS_DENY;
- break;
- case nsICookiePermission.ACCESS_SESSION:
- accessString = CM_COOKIE_ACCESS_SESSION;
- break;
- default:
- accessString = CM_COOKIE_ACCESS_DEFAULT;
- break;
- }
-
- return accessString;
- },
-
- // Check the permission access level for the URI and
- // return a string representation of this value
- checkPermissionString: function(aURI, aType)
- {
- var accessString = CM_COOKIE_ACCESS_DEFAULT;
- var permissionManager = Components.classes["@mozilla.org/permissionmanager;1"]
- .getService(Components.interfaces.nsIPermissionManager);
-
- switch (permissionManager.testPermission(aURI ,aType))
- {
- case 0:
- accessString = CM_COOKIE_ACCESS_DEFAULT;
- break;
- case nsIPermissionManager.ALLOW_ACTION:
- accessString = CM_COOKIE_ACCESS_ALLOW;
- break;
- case nsIPermissionManager.DENY_ACTION:
- accessString = CM_COOKIE_ACCESS_DENY;
- break;
- case nsICookiePermission.ACCESS_SESSION:
- accessString = CM_COOKIE_ACCESS_SESSION;
- break;
- default:
- accessString = CM_COOKIE_ACCESS_DEFAULT;
- break;
- }
-
- return accessString;
- },
-
- // Check the exact permission access level for the URI and
- // return an array of string representation of the values
- // for both the top level and 2nd level domain,
- // plus a standard testPermission on the URI
- // testExactPermission requires an exact hostname match - subdomains are not a match
- checkPermissionArray: function(aURI, aType)
- {
- var accessStringTop = CM_COOKIE_ACCESS_DEFAULT;
- var accessStringSecond = CM_COOKIE_ACCESS_DEFAULT;
- var accessString = CM_COOKIE_ACCESS_DEFAULT;
- var accessArray = new Array(accessStringTop, accessStringSecond, accessString);
- var secondURI = this.getSecondLevelURI(aURI);
- var tempURIIndex = -1;
-
- var permissionManager = Components.classes["@mozilla.org/permissionmanager;1"]
- .getService(Components.interfaces.nsIPermissionManager);
-
- // Determine what test permission method to use based
- // on the value of _isExactPermission
- if (this._isExactPerm)
- {
- // Top level domain
- switch (permissionManager.testExactPermission(aURI ,aType))
- {
- case CM_CA_LEVEL_DEFAULT:
- accessStringTop = CM_COOKIE_ACCESS_DEFAULT;
- break;
- case nsIPermissionManager.ALLOW_ACTION:
- accessStringTop = CM_COOKIE_ACCESS_ALLOW;
- break;
- case nsIPermissionManager.DENY_ACTION:
- accessStringTop = CM_COOKIE_ACCESS_DENY;
- break;
- case nsICookiePermission.ACCESS_SESSION:
- accessStringTop = CM_COOKIE_ACCESS_SESSION;
- break;
- default:
- accessStringTop = CM_COOKIE_ACCESS_DEFAULT;
- break;
- }
-
- // Second level domain
- switch (permissionManager.testExactPermission(secondURI ,aType))
- {
- case CM_CA_LEVEL_DEFAULT:
- accessStringSecond = CM_COOKIE_ACCESS_DEFAULT;
- break;
- case nsIPermissionManager.ALLOW_ACTION:
- accessStringSecond = CM_COOKIE_ACCESS_ALLOW;
- break;
- case nsIPermissionManager.DENY_ACTION:
- accessStringSecond = CM_COOKIE_ACCESS_DENY;
- break;
- case nsICookiePermission.ACCESS_SESSION:
- accessStringSecond = CM_COOKIE_ACCESS_SESSION;
- break;
- default:
- accessStringSecond = CM_COOKIE_ACCESS_DEFAULT;
- break;
- }
- }
- else
- {
- // Second level domain
- switch (permissionManager.testPermission(secondURI ,aType))
- {
- case CM_CA_LEVEL_DEFAULT:
- accessStringSecond = CM_COOKIE_ACCESS_DEFAULT;
- break;
- case nsIPermissionManager.ALLOW_ACTION:
- accessStringSecond = CM_COOKIE_ACCESS_ALLOW;
- break;
- case nsIPermissionManager.DENY_ACTION:
- accessStringSecond = CM_COOKIE_ACCESS_DENY;
- break;
- case nsICookiePermission.ACCESS_SESSION:
- accessStringSecond = CM_COOKIE_ACCESS_SESSION;
- break;
- default:
- accessStringSecond = CM_COOKIE_ACCESS_DEFAULT;
- break;
- }
-
- // Top level domain
- switch (permissionManager.testPermission(aURI ,aType))
- {
- case CM_CA_LEVEL_DEFAULT:
- accessStringTop = CM_COOKIE_ACCESS_DEFAULT;
- break;
- case nsIPermissionManager.ALLOW_ACTION:
- accessStringTop = CM_COOKIE_ACCESS_ALLOW;
- break;
- case nsIPermissionManager.DENY_ACTION:
- accessStringTop = CM_COOKIE_ACCESS_DENY;
- break;
- case nsICookiePermission.ACCESS_SESSION:
- accessStringTop = CM_COOKIE_ACCESS_SESSION;
- break;
- default:
- accessStringTop = CM_COOKIE_ACCESS_DEFAULT;
- break;
- }
- }
-
- // Standard testPermission for URI (End Result)
- switch (permissionManager.testPermission(aURI ,aType))
- {
- case CM_CA_LEVEL_DEFAULT:
- accessString = CM_COOKIE_ACCESS_DEFAULT;
- break;
- case nsIPermissionManager.ALLOW_ACTION:
- accessString = CM_COOKIE_ACCESS_ALLOW;
- break;
- case nsIPermissionManager.DENY_ACTION:
- accessString = CM_COOKIE_ACCESS_DENY;
- break;
- case nsICookiePermission.ACCESS_SESSION:
- accessString = CM_COOKIE_ACCESS_SESSION;
- break;
- default:
- accessString = CM_COOKIE_ACCESS_DEFAULT;
- break;
- }
-
- // Lastly check to see if this is a temporary permission
- //tempURIIndex = this._tempAllowList.indexOf(aURI.asciiHost);
- //if (tempURIIndex > -1)
- if (cookieMonster_TempAllow.isTempPermission(aURI))
- {
- accessStringTop = CM_COOKIE_ACCESS_TEMP_ALLOW;
- accessString = CM_COOKIE_ACCESS_TEMP_ALLOW;
- }
-
- //tempURIIndex = this._tempAllowList.indexOf(secondURI.asciiHost);
- //if (tempURIIndex > -1)
- if (cookieMonster_TempAllow.isTempPermission(secondURI))
- {
- accessStringSecond = CM_COOKIE_ACCESS_TEMP_ALLOW;
- accessString = CM_COOKIE_ACCESS_TEMP_ALLOW;
-
- // If not ExactPerm and second level is temporary,
- // then if top level is allow, change to temporary
- // because any cookies will be deleted upon exit
- if (!this._isExactPerm && (accessStringTop == CM_COOKIE_ACCESS_ALLOW))
- {
- accessStringTop = CM_COOKIE_ACCESS_TEMP_ALLOW;
- }
- }
-
- accessArray[CM_TOP_LEVEL] = accessStringTop;
- accessArray[CM_SECOND_LEVEL] = accessStringSecond;
- accessArray[CM_URL_STANDARD_LEVEL] = accessString;
-
- return accessArray;
- },
-
- // Input the numeric permission level and
- // return a string representation of this value
- getPermissionString: function(aValue)
- {
- var accessString = CM_COOKIE_ACCESS_DEFAULT;
-
- switch (aValue*1)
- {
- case CM_CA_LEVEL_DEFAULT:
- accessString = CM_COOKIE_ACCESS_DEFAULT;
- break;
- case nsIPermissionManager.ALLOW_ACTION:
- accessString = CM_COOKIE_ACCESS_ALLOW;
- break;
- case nsIPermissionManager.DENY_ACTION:
- accessString = CM_COOKIE_ACCESS_DENY;
- break;
- case nsICookiePermission.ACCESS_SESSION:
- accessString = CM_COOKIE_ACCESS_SESSION;
- break;
- case CM_CA_LEVEL_TEMP_ALLOW:
- accessString = CM_COOKIE_ACCESS_TEMP_ALLOW;
- break;
- default:
- accessString = CM_COOKIE_ACCESS_DEFAULT;
- break;
- }
-
- return accessString;
- },
-
- // Input the string representation
- // of the permission level and
- // return the numeric representation of this value
- getPermissionValue: function(aValue)
- {
- var accessValue = CM_CA_LEVEL_DEFAULT;
-
- switch (aValue)
- {
- case CM_COOKIE_ACCESS_DEFAULT:
- accessValue = CM_CA_LEVEL_DEFAULT;
- break;
- case CM_COOKIE_ACCESS_ALLOW:
- accessValue = nsIPermissionManager.ALLOW_ACTION;
- break;
- case CM_COOKIE_ACCESS_DENY:
- accessValue = nsIPermissionManager.DENY_ACTION;
- break;
- case CM_COOKIE_ACCESS_SESSION:
- accessValue = nsICookiePermission.ACCESS_SESSION;
- break;
- case CM_COOKIE_ACCESS_TEMP_ALLOW:
- accessValue = CM_CA_LEVEL_TEMP_ALLOW;
- break;
- default:
- accessValue = CM_CA_LEVEL_DEFAULT;
- break;
- }
-
- return accessValue;
- },
-
- // Set override for hosts cookie access
- setCookieAccess: function(aURI, aAccess, aDomainType)
- {
- var hostURI = null;
- var accessLevel = null;
- var tempHostIndex = -1;
-
- if (aDomainType == CM_SECOND_LEVEL)
- {
- hostURI = this.getSecondLevelURI(aURI);
- }
- else
- {
- hostURI = aURI;
- }
-
- // Check if temporary access
- if (aAccess == CM_CA_LEVEL_TEMP_ALLOW)
- {
- // Check if URI already has a non-default cookie access
- cookieMonster_TempAllow.add(hostURI);
- aAccess = nsIPermissionManager.ALLOW_ACTION;
- }
- else if (cookieMonster_TempAllow.isTempPermission(hostURI))
- {
- cookieMonster_TempAllow.remove(hostURI);
-
- // If the updated permission is Deny or Default, where Default
- // is Deny, then delete any cookies set for this host
- if ((aAccess == nsIPermissionManager.DENY_ACTION) ||
- ((aAccess == 0) && (cookieMonster_PrefObserver.getCookiePrefString() == "Rejected")))
- {
- //alert("aAccess = " + aAccess);
- // Set aUseBaseDomain to true
- this.deleteHostCookies(aURI.asciiHost, true);
- }
- }
-
- this.choice.setAccess(hostURI, aAccess);
-
- // If new access is deny and the preference
- // deletecookiesondeny is true
- // then delete existing cookies for this host
- if ((aAccess == nsIPermissionManager.DENY_ACTION) &&
- cookieMonster_nsPreferences.getBoolPref("deletecookiesondeny", false))
- {
- this.deleteHostCookies(hostURI.host, false);
- }
- },
-
- // Convert URI to Second Level Domain
- // (i.e. groups.yahoo.com to yahoo.com)
- getSecondLevelURI: function(aURI)
- {
- // Parse the host string
- var hostString = aURI.asciiHost;
- var newHostString = null;
- var newHost = aURI;
-
- newHostString = cookieMonster_CookieInfo.getSecondLevelHost(hostString);
- newHost = cookieMonster_Utils.createURIFromHostName(newHostString);
-
- return newHost;
- },
-
- // Convert Host String to Second Level Domain
- // (i.e. groups.yahoo.com to yahoo.com)
- getSecondLevelHost: function(aHost)
- {
- // Parse the host string
- var checkExp = /^com|^net|^org|^edu/i;
- var checkSpecialTwo = /^au|^uk|^tw|^br/i;
- var newHostString = null;
-
- // Is the effective-tld-service available
- if (this._isEffectiveTLDService)
- {
- try
- {
- var eTLDService = Components.classes["@mozilla.org/network/effective-tld-service;1"]
- .getService(Components.interfaces.nsIEffectiveTLDService);
-
- //alert("Test TLDService: " + eTLDService.getBaseDomain(cookieMonster._oldURL));
- newHostString = eTLDService.getBaseDomainFromHost(aHost);
- }
- catch(e)
- {
- newHostString = aHost;
- }
- }
- else
- {
- // Is this the special case where
- // the URI ends in two characters
- var hostParts = aHost.split(".");
-
- // Do not parse if hostParts.length < 3
- if (hostParts.length >= 3)
- {
- // Normal URI
- if (hostParts[hostParts.length - 1].length > 2)
- {
- newHostString = hostParts[hostParts.length - 2] + "." +
- hostParts[hostParts.length - 1];
- }
- // Check to see if special
- // (e.g. www.domain.com.au)/com|net|org|edu/
- else if((checkExp.test(hostParts[hostParts.length - 2]) &&
- hostParts[hostParts.length - 1].length <= 2) ||
- checkSpecialTwo.test(hostParts[hostParts.length - 1]))
- {
-
- newHostString = hostParts[hostParts.length - 3] + "." +
- hostParts[hostParts.length - 2] + "." +
- hostParts[hostParts.length - 1];
- }
- else
- {
- newHostString = hostParts[hostParts.length - 2] + "." +
- hostParts[hostParts.length - 1];
- }
- }
- else
- {
- newHostString = aHost;
- }
- }
-
- //alert("Old Host: " + aHost + " New Host: " + newHostString);
- return newHostString;
- },
-
- // Get Override Global cookie permissions for URI
- checkOverrideGlobal: function(aURI)
- {
- var overrideArray = new Array(false, false);
- var secondURI = this.getSecondLevelURI(aURI);
- var tempURIIndex = -1;
-
- // Check both top level and second level URI's
- tempURIIndex = this._globalOverrideList.indexOf(aURI.asciiHost);
- overrideArray[CM_TOP_LEVEL] = (tempURIIndex > -1);
-
- tempURIIndex = this._globalOverrideList.indexOf(secondURI.asciiHost);
- overrideArray[CM_SECOND_LEVEL] = (tempURIIndex > -1);
-
- return overrideArray;
- },
-
- // Add URI asciihost to Override Global cookie permissions list
- addOverrideGlobal: function(aHost, aDomainType)
- {
- var hostDomain = aHost;
- if (aDomainType == CM_SECOND_LEVEL)
- {
- hostDomain = this.getSecondLevelHost(aHost);
- }
-
- this._globalOverrideList.push(hostDomain);
- cookieMonster_nsPreferences.setAppendToStringPref(CM_PREFERENCE_TYPE_GLOBAL_OVERRIDE, hostDomain);
- },
-
- // Remove URI asciihost from Override Global cookie permissions list
- removeOverrideGlobal: function(aHost, aDomainType)
- {
- var hostDomain = aHost;
- var overrideHostIndex = -1;
-
- if (aDomainType == CM_SECOND_LEVEL)
- {
- hostDomain = this.getSecondLevelHost(aHost);
- }
-
- overrideHostIndex = this._globalOverrideList.indexOf(hostDomain);
- if (overrideHostIndex > -1)
- {
- this._globalOverrideList.splice(overrideHostIndex, 1);
- cookieMonster_nsPreferences.setStringPrefArray(CM_PREFERENCE_TYPE_GLOBAL_OVERRIDE, this._globalOverrideList);
- }
- },
-
- // Remove all URI asciihosts from Override Global cookie permissions list
- removeAllOverrideGlobal: function()
- {
- this._globalOverrideList = new Array();
- cookieMonster_nsPreferences.clearUserPref(CM_PREFERENCE_TYPE_GLOBAL_OVERRIDE);
-
- // Reset any global override permissions in place
- cookieMonster.extResetGlobalCookiePref();
- },
-
- // Delete cookies from host
- deleteHostCookies: function(aHost, aUseBaseDomain)
- {
- var deleteHost = aHost;
- var cookieManager = Components.classes["@mozilla.org/cookiemanager;1"]
- .getService(Components.interfaces.nsICookieManager);
-
- // If checking 2nd level domain names, make sure
- // deleteHost is a 2nd level domain of aHost
- if (aUseBaseDomain)
- {
- deleteHost = this.getSecondLevelHost(aHost);
- }
-
- var iter = cookieManager.enumerator;
- while (iter.hasMoreElements())
- {
- var cookie = iter.getNext();
-
- if (cookie instanceof Components.interfaces.nsICookie)
- {
- // Delete cookies matching aHost
- var cookieHost = (cookie.host.charAt(0) == ".") ? cookie.host.substring(1,cookie.host.length) : cookie.host;
-
- // If checking 2nd level domain names, make sure
- // cookieHost is a 2nd level domain of the cookie
- if (aUseBaseDomain)
- {
- cookieHost = this.getSecondLevelHost(cookieHost);
- }
-
- if (cookieHost == deleteHost)
- {
- //alert("Delete: " + cookie.host);
- cookieManager.remove(cookie.host , cookie.name , cookie.path , 0);
- }
- }
- }
- }
-}
diff --git a/chrome/cookiemonster.jar!/content/cookieMonster.js b/chrome/cookiemonster.jar!/content/cookieMonster.js
deleted file mode 100644
index 44a1b68..0000000
--- a/chrome/cookiemonster.jar!/content/cookieMonster.js
+++ /dev/null
@@ -1,1249 +0,0 @@
-// cookieMonster.js
-// Tony Schilling
-// Created: 01/20/2007
-// Last Updated: 04/08/2010
-
-// Use XPCOM to detect browser tab changes and
-// interface to the cookie manager and the
-// permission manager,
-// in order to read and possibly update
-// the cookie status for the current URI
-
-// Constants
-const nsIPermissionManager = Components.interfaces.nsIPermissionManager;
-const nsICookiePermission = Components.interfaces.nsICookiePermission;
-const CM_ICON_DEFAULT_ORIGINAL = "chrome://cookiemonster/skin/face-monkey-small.png";
-const CM_ICON_DEFAULT = "chrome://cookiemonster/skin/cookie-monster-logo.png";
-const CM_ICON_TEMP_ALLOW = "chrome://cookiemonster/skin/face-angel-temp.png";
-const CM_ICON_ALLOW = "chrome://cookiemonster/skin/face-angel.png";
-const CM_ICON_DENY = "chrome://cookiemonster/skin/face-devil-grin.png";
-const CM_ICON_SESSION = "chrome://cookiemonster/skin/face-glasses.png";
-const CM_ICON_ALLOW_OG = "chrome://cookiemonster/skin/face-angel-og.png";
-const CM_ICON_SESSION_OG = "chrome://cookiemonster/skin/face-glasses-og.png";
-const CM_TOP_LEVEL = 0;
-const CM_SECOND_LEVEL = 1;
-const CM_URL_STANDARD_LEVEL = 2;
-const CM_CA_LEVEL_TEMP_ALLOW = -1;
-const CM_CA_LEVEL_DEFAULT = 0;
-const CM_COOKIE_ACCESS_DEFAULT = "Default";
-const CM_COOKIE_ACCESS_DEFAULT_ORIGINAL = "DefaultOriginal";
-const CM_COOKIE_ACCESS_DENY = "Deny";
-const CM_COOKIE_ACCESS_ALLOW = "Allow";
-const CM_COOKIE_ACCESS_SESSION = "Session";
-const CM_COOKIE_ACCESS_TEMP_ALLOW = "Temp";
-const CM_COOKIE_ACCESS_ALLOW_OG = "AllowOG";
-const CM_COOKIE_ACCESS_SESSION_OG = "SessionOG";
-const CM_PERMISSION_TYPE_COOKIE = "cookie";
-const CM_PREFERENCE_TYPE_COOKIE_TEMP = "tempcookie";
-const CM_PREFERENCE_TYPE_GLOBAL_OVERRIDE = "overrideglobal";
-const CM_PREF_COOKIE_BEHAVIOR = 0;
-const CM_PREF_LIFETIME_POLICY = 1;
-const CM_PREF_BLOCK_THIRD_PARTY = 1;
-const CM_GLOBAL_COOKIE_PERM_REJECTED = "Rejected";
-
-// Retrieve the URL for the current (active) browser
-function getURL()
-{
- var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].
- getService(Components.interfaces.nsIWindowMediator);
- var recentWindow = wm.getMostRecentWindow("navigator:browser");
- return recentWindow ? recentWindow.content.document.location : null;
-}
-
-// Based upon code sample from MozillaZine
-// http://kb.mozillazine.org/Progress_listeners
-// Progress listeners allow extensions to be notified of events associated
-// with documents loading in the browser and with tab switching events.
-// Progress listeners implement the nsIWebProgressListener interface.
-// Create an object which implements nsIWebProgressListener
-var cookieMonster_urlBarListener =
-{
- QueryInterface: function(aIID)
- {
- if (aIID.equals(Components.interfaces.nsIWebProgressListener) ||
- aIID.equals(Components.interfaces.nsISupportsWeakReference) ||
- aIID.equals(Components.interfaces.nsISupports))
- return this;
- throw Components.results.NS_NOINTERFACE;
- },
-
- onLocationChange: function(aProgress, aRequest, aURI)
- {
- if ((aURI != null) && cookieMonster.extGetIsAllowGlobalOverride())
- {
- cookieMonster.extCheckGlobalCookiePref(aURI);
- }
- if (!aProgress.DOMWindow.frameElement)
- {
- cookieMonster.processNewURL(aProgress, aRequest, aURI);
- }
- return 0;
- },
-
- onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus)
- {
- // If you use myListener for more than one tab/window, use
- // aWebProgress.DOMWindow to obtain the tab/window which triggers the state change
-// if (aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_START)
-// {
-// // This fires when the load event is initiated
-// //alert("Start State Flags: " + aStateFlags + " Request Name: " + aRequest.name);
-// }
-//
-// if (aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_STOP)
-// {
-// // This fires when the load finishes
-// //alert("Stop State Flags: " + aStateFlags + " Host: " + aWebProgress.DOMWindow.document.baseURIObject.host + " Request Name: " + aRequest.name);
-//
-// // Filter out the REQUEST only stops, as they do not indicate
-// // the completion of the page load
-// if (aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_IS_NETWORK)
-// //if(aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_IS_WINDOW &
-// // aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_IS_NETWORK)
-// {
-// var currentBrowser = aWebProgress.DOMWindow.document;
-// var location = aRequest.QueryInterface(Components.interfaces.nsIChannel).URI;
-//// alert("Load Event Finished for gBrowser : " + gBrowser.currentURI.host +
-//// " and aWebProgress.DOMWindow: " + currentBrowser.baseURIObject.host +
-//// " and aRequest URI: " + location);
-//
-// // Process any cookies not assigned to a host
-// //cookieMonster_ThirdParty.processUnassigned(this._currentLoadHost);
-// //cookieMonster.setThirdPartyCookieSubMenu(cookieMonster_ThirdParty.retrieveData(this._currentLoadHost));
-// }
-// }
-
- return 0;
- },
- onProgressChange: function() {return 0;},
- onStatusChange: function() {return 0;},
- onSecurityChange: function() {return 0;},
- onLinkIconAvailable: function() {return 0;}
-};
-
-// Based upon code sample from MozillaZine
-// http://kb.mozillazine.org/Progress_listeners
-// Progress listeners allow extensions to be notified of events associated
-// with documents loading in the browser and with tab switching events.
-// Progress listeners implement the nsIWebProgressListener interface.
-// Create an object which implements nsIWebProgressListener
-var cookieMonster_tabProgressListener =
-{
- QueryInterface: function(aIID)
- {
- if (aIID.equals(Components.interfaces.nsIWebProgressListener) ||
- aIID.equals(Components.interfaces.nsISupportsWeakReference) ||
- aIID.equals(Components.interfaces.nsISupports))
- return this;
- throw Components.results.NS_NOINTERFACE;
- },
-
- onLocationChange: function(aBrowser, aProgress, aRequest, aURI)
- {
- //alert("Location Change: " + aBrowser.currentURI.asciiHost);
- return 0;
- },
-
- onStateChange: function(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus)
- {
- const nsIWebProgressListener = Components.interfaces.nsIWebProgressListener;
-
- if (aStateFlags & nsIWebProgressListener.STATE_START && aStateFlags & nsIWebProgressListener.STATE_IS_NETWORK)
- {
- // This fires when the load event of type network is initiated
- //alert("Start State Flags: " + aStateFlags + " Request Name: " + aRequest.name);
- cookieMonster_CookieRequest.clearBrowser(aBrowser);
- }
-
- if (aStateFlags & nsIWebProgressListener.STATE_STOP && aStateFlags & nsIWebProgressListener.STATE_IS_NETWORK)
- {
- // Process any cookie requests made by browser during load
- cookieMonster_CookieRequest.processCookieRequests(aBrowser);
- }
-
- return 0;
- },
- onProgressChange: function() {return 0;},
- onStatusChange: function() {return 0;},
- onSecurityChange: function() {return 0;},
- onLinkIconAvailable: function() {return 0;}
-};
-
-var cookieMonster =
-{
- _oldURL: null,
- _oldAccess: null,
- _browser: null,
- _menuBundle: null,
- _userDefault: null,
- _statusBarPanel: null,
- _statusBarMenu: null,
- _statusBarMenuId: null,
- _statusBarSubMenu: null,
- _statusBarSubMenuId: null,
- _statusBarMenuArray: null,
- _secondLevel: false,
- _secondLevelId: null,
- _secondLevelMenuOption: null,
- _thirdPartyMenuOption: null,
- _thirdPartyId: null,
- _globalOverrideId: null,
- _globalOverrideMenuOption: null,
- _usingGlobalOverride: false,
- _allowGlobalOverride: false,
- _currentGlobalPreference: new Array(),
- _currentSubMenu: CM_SECOND_LEVEL,
- _reloadOnPermissionChange: false,
- _menuStatus: false,
- _iconArray: null,
- _flagMenuEvent: false,
- _flagGlobalCookieEvent: false,
-
- init: function()
- {
- var copyURI = null;
- // Listen for webpage loads
- // gBrowser is only accessible from the scope of Firefox,
- // to use gBrowser within an extension you must declare it
- this._browser = document.getElementById("content");
- this._browser.addProgressListener(cookieMonster_urlBarListener,
- Components.interfaces.nsIWebProgress.NOTIFY_STATE_DOCUMENT);
- gBrowser.addTabsProgressListener(cookieMonster_tabProgressListener);
-
- gBrowser.tabContainer.addEventListener("TabClose", cookieMonster.tabUnload, false);
-
- copyURI = Components.classes["@mozilla.org/network/io-service;1"].
- getService(Components.interfaces.nsIIOService);
- this._oldURL = copyURI.newURI("about:blank", null, null);
- this._oldAccess = new Array(CM_COOKIE_ACCESS_DEFAULT, CM_COOKIE_ACCESS_DEFAULT, CM_COOKIE_ACCESS_DEFAULT);
-
- // Add extension name to cookieMonster_nsPreferences
- cookieMonster_nsPreferences.mBranch = "cookiemonster";
-
- // Initialize CookieInfo and Utils
- cookieMonster_CookieInfo.init();
- cookieMonster_Utils.init();
-
- // Register preferences and permission observers
- cookieMonster_PrefObserver.register();
- cookieMonster_ObserverService.register();
-
- // Retrieve users's default cookie permissions
- this._userDefault = cookieMonster_PrefObserver.getCookiePrefString();
- this._currentGlobalPreference = cookieMonster_PrefObserver.getCookiePrefArray();
-
- // Create a reference to all the menu elements
- this._menuBundle = document.getElementById("cookie-menu-labels");
- this._statusBarPanel = document.getElementById("cookiemonster-status");
-
-// if (cookieMonster_CookieInfo.isExactPermissions())
-// {
-// this._statusBarMenuId = "cookie-access";
-// this._secondLevelId = "second-level";
-// this._statusBarSubMenuId = "cookie-access-alternate";
-// }
-// else
-// {
-// this._statusBarMenuId = "cookie-access-old";
-// this._secondLevelId = "second-level-old";
-// this._statusBarSubMenuId = "cookie-access-alternate";
-// }
-
- this._statusBarMenuId = "cookie-access";
- this._secondLevelId = "option-second-level";
- this._statusBarSubMenuId = "cookie-access-alternate";
- this._globalOverrideId = "show-global-override";
- this._thirdPartyId = "cookie-thirdparty-permissions";
-
- // Retrieve the current value for secondlevelurl and
- // initialize secondlevelurl in StatusbarMenu
- this._secondLevel = cookieMonster_nsPreferences.getBoolPref("secondlevelurl", false);
-
- this._statusBarMenu = document.getElementById(this._statusBarMenuId);
- this._statusBarMenu.addEventListener('command', function(event) {cookieMonster.extMenuCommandHandler(event)},
- true);
-
- this._statusBarSubMenu = document.getElementById(this._statusBarSubMenuId);
-
- this._statusBarMenuArray = new Array(this._statusBarMenu, this._statusBarSubMenu);
-
- this._secondLevelMenuOption = document.getElementById(this._secondLevelId);
-
- if (this._secondLevel)
- {
- this._secondLevelMenuOption.setAttribute("checked", "true");
- this.switchCookieSubMenu();
- }
-
- this._thirdPartyMenuOption = document.getElementById(this._thirdPartyId);
-
- // Retrieve the current value for enableglobalcookieoverride
- this._allowGlobalOverride = cookieMonster_nsPreferences.getBoolPref("enableglobalcookieoverride", false);
- this._globalOverrideMenuOption = document.getElementById(this._globalOverrideId);
- this._globalOverrideMenuOption.setAttribute("disabled", !this._allowGlobalOverride);
-
- // Retrieve the current value for reloadOnPermissionChange
- this._reloadOnPermissionChange = cookieMonster_nsPreferences.getBoolPref("reloadonpermissionchange", false);
-
- // Set tooltip attribute for enhanced tool tip info
- this._statusBarPanel.removeAttribute("tooltiptext");
- this._statusBarPanel.setAttribute("tooltip", "cookie-results");
-
- this._statusBarPanel.addEventListener('command',
- function(event) {cookieMonster.extThirdPartyMenuLoadHandler(event)}, false);
-
- // Load icons into _iconArray (actually an object)
- this._iconArray = new Object();
-
- // Determine what default icon to use
- if (!cookieMonster_nsPreferences.getBoolPref("originaldefaulticon", false))
- {
- this._iconArray[CM_COOKIE_ACCESS_DEFAULT] = CM_ICON_DEFAULT;
- }
- else
- {
- this._iconArray[CM_COOKIE_ACCESS_DEFAULT] = CM_ICON_DEFAULT_ORIGINAL;
- }
-
- this._iconArray[CM_COOKIE_ACCESS_TEMP_ALLOW] = CM_ICON_TEMP_ALLOW;
- this._iconArray[CM_COOKIE_ACCESS_ALLOW] = CM_ICON_ALLOW;
- this._iconArray[CM_COOKIE_ACCESS_DENY] = CM_ICON_DENY;
- this._iconArray[CM_COOKIE_ACCESS_SESSION] = CM_ICON_SESSION;
- this._iconArray[CM_COOKIE_ACCESS_ALLOW_OG] = CM_ICON_ALLOW_OG;
- this._iconArray[CM_COOKIE_ACCESS_SESSION_OG] = CM_ICON_SESSION_OG;
- },
-
- uninit: function()
- {
- this._browser.removeProgressListener(cookieMonster_urlBarListener);
- gBrowser.removeTabsProgressListener(cookieMonster_tabProgressListener);
-
- gBrowser.tabContainer.removeEventListener("TabClose", cookieMonster.tabUnload, false);
-
- // Unregister all observers
- cookieMonster_PrefObserver.unregister();
- cookieMonster_ObserverService.unregister();
- },
-
- tabUnload: function(evt)
- {
- var browser = gBrowser.getBrowserForTab(evt.target);
- //cookieMonster_CookieRequest.removeHost(browser.currentURI.asciiHost);
- cookieMonster_CookieRequest.removeBrowser(browser);
- },
-
- processNewURL: function(aProgress, aRequest, aURI)
- {
- // Check to see if the URI contains any data
- if ((aURI != null) && (aURI.asciiHost != undefined))
- {
- // If necessary, "Enable" popup menu for statusbar panel
- this.setStatusMenuEnabled(true);
-
- // Check if the URI is changing
- if (aURI.spec != this._oldURL.spec)
- {
- // Update oldURL and oldAccess
- this._oldURL = aURI.clone();
- this._oldAccess = cookieMonster_CookieInfo.checkPermissionArray(aURI, CM_PERMISSION_TYPE_COOKIE);
-
- // if host is empty, "disable" statusbar menu \s\w*
- if (aURI.asciiHost.replace(/^\s*$/, "") == "")
- {
- this.setStatusMenuEnabled(false);
- }
- }
-
- // Update statusbar menu
- cookieMonster.updateStatusbarMenu(this._oldURL.asciiHost, this._oldAccess);
- }
- else
- {
- // If URI is blank, then "disable" popup menu for statusbar panel
- this.setStatusMenuEnabled(false);
- }
- },
-
- // Update the text and menuitems in the statusbar popup menu
- updateStatusbarMenu: function(aHost, aAccess)
- {
- //alert("Host: " + aHost + " Access: " + aAccess[CM_TOP_LEVEL]);
- var menuNodes = null;
- var hostDisplay = aHost;
- var hostDomain = cookieMonster_CookieInfo.getSecondLevelHost(aHost);
- var hostAccess = aAccess[CM_URL_STANDARD_LEVEL];
- var checkOldAccess = aAccess[CM_TOP_LEVEL];
- var permissionsDisplayTop = document.getElementById("permissions-top");
- var permissionsDisplaySecond = document.getElementById("permissions-second");
- var permissionsDisplayResult = document.getElementById("permissions-result");
- var cookieTooltipSite = document.getElementById("cookie-group-site");
- var cookieTooltipDomain = document.getElementById("cookie-group-domain");
- var cookieTooltipResult = document.getElementById("cookie-group-result");
- var showCookiesCurrentDomain = document.getElementById("show-cookies-site");
- var deleteCookiesCurrentDomain = document.getElementById("delete-cookies-site");
-
- // If the user has selected 2nd Level domains,
- // then display as such
- if (this._secondLevel)
- {
- hostDisplay = hostDomain;
- checkOldAccess = aAccess[CM_SECOND_LEVEL];
- }
-
- // Walk the menus to update the menuitems
- for (var x = 0; x < this._statusBarMenuArray.length; x++)
- {
- if (this._statusBarMenuArray[x].hasChildNodes())
- {
- menuNodes = this._statusBarMenuArray[x].childNodes;
- for (var i = 0; i < menuNodes.length; i++)
- {
- var menu = menuNodes [i];
- if (menu.nodeName != "menuitem")
- {
- continue;
- }
-
- // If access level matches node, then name
- // current-access in order for image to show
- var idName = menu.getAttribute("id").split("-");
- var idDomain = idName[idName.length - 2];
- var idParsed = idName[idName.length - 1];
-
- if (idDomain == "top")
- {
- if (idParsed == aAccess[CM_TOP_LEVEL].toString().toLowerCase())
- {
- menu.setAttribute("name","current-access");
- }
- else
- {
- menu.setAttribute("name","cookie-top");
- }
- menu.setAttribute("label", this._menuBundle.getString(idParsed) + " " + aHost);
- }
- else if (idDomain == "second")
- {
- if (idParsed == aAccess[CM_SECOND_LEVEL].toString().toLowerCase())
- {
- menu.setAttribute("name","current-access");
- }
- else
- {
- menu.setAttribute("name","cookie-two");
- }
- menu.setAttribute("label", this._menuBundle.getString(idParsed) + " " + hostDomain);
- }
- else if (idDomain == "default")
- {
- if (idParsed == aAccess[CM_URL_STANDARD_LEVEL].toString().toLowerCase())
- {
- menu.setAttribute("name","current-access");
- }
- else
- {
- menu.setAttribute("name","cookie-default");
- }
- menu.setAttribute("label", this._menuBundle.getString(idParsed) + " (" + this._userDefault + ")");
- }
- else if (idDomain == "access")
- {
- // This is for the old version of the menu
- if (idParsed == checkOldAccess.toString().toLowerCase())
- {
- menu.setAttribute("name","current-access");
- }
- else
- {
- menu.setAttribute("name","cookie-access");
- }
- menu.setAttribute("label", this._menuBundle.getString(idParsed) + " " + hostDisplay);
-
- // For default, display users cookie permission preferences
- if (idParsed == CM_COOKIE_ACCESS_DEFAULT.toLowerCase())
- {
- menu.setAttribute("label", this._menuBundle.getString(idParsed) + " (" + this._userDefault + ")");
- }
- }
- }
- }
- }
-
- // Add domain name to show cookies for current site and delete cookies
- // for current site
- showCookiesCurrentDomain.setAttribute("label", this._menuBundle.getString("showcurrentcookies") + " " + hostDomain);
- showCookiesCurrentDomain.setAttribute("name", hostDomain);
- deleteCookiesCurrentDomain.setAttribute("label", this._menuBundle.getString("deletecurrentcookies") + " " + hostDomain);
- deleteCookiesCurrentDomain.setAttribute("name", hostDomain);
-
- // Update permissions Synopsis and Enhanced Tooltip
- permissionsDisplayTop.setAttribute("label", this._menuBundle.getString("sitepermissions") +
- " (" + aHost + "): " + this._menuBundle.getString(aAccess[CM_TOP_LEVEL]));
- permissionsDisplaySecond.setAttribute("label", this._menuBundle.getString("domainpermissions") +
- " (" + hostDomain + "): " + this._menuBundle.getString(aAccess[CM_SECOND_LEVEL]));
- permissionsDisplayResult.setAttribute("label", this._menuBundle.getString("permissionsresultfor") +
- " " + aHost + ": " + this._menuBundle.getString(hostAccess));
-
- permissionsDisplayTop.setAttribute("image", this.getIcon(aAccess[CM_TOP_LEVEL])); //this._iconArray[aAccess[CM_TOP_LEVEL]]
- permissionsDisplaySecond.setAttribute("image", this.getIcon(aAccess[CM_SECOND_LEVEL]));
- permissionsDisplayResult.setAttribute("image", this.getIcon(hostAccess));
-
- cookieTooltipSite.firstChild.setAttribute("label", this._menuBundle.getString("sitepermissions") +
- ": " + this._menuBundle.getString(aAccess[CM_TOP_LEVEL]));
- cookieTooltipDomain.firstChild.setAttribute("label", this._menuBundle.getString("domainpermissions") +
- ": " + this._menuBundle.getString(aAccess[CM_SECOND_LEVEL]));
- cookieTooltipResult.firstChild.setAttribute("label", this._menuBundle.getString("permissionsresult") +
- ": " + this._menuBundle.getString(hostAccess));
-
- cookieTooltipSite.firstChild.setAttribute("image", this.getIcon(aAccess[CM_TOP_LEVEL]));
- cookieTooltipDomain.firstChild.setAttribute("image", this.getIcon(aAccess[CM_SECOND_LEVEL]));
- cookieTooltipResult.firstChild.setAttribute("image", this.getIcon(hostAccess));
-
- cookieTooltipSite.lastChild.setAttribute("value", aHost);
- cookieTooltipDomain.lastChild.setAttribute("value", hostDomain);
- cookieTooltipResult.lastChild.setAttribute("value", aHost);
-
- // Set the icon for the status bar menu
- this._statusBarPanel.setAttribute("src", this.getIcon(hostAccess));
- },
-
- // Swap the menu items in the submenu
- // with those in the main menu,
- // based on the _secondLevel flag
- switchCookieSubMenu: function()
- {
- if (this._secondLevel)
- {
- this.setCookieSubMenu(CM_TOP_LEVEL);
- }
- else
- {
- this.setCookieSubMenu(CM_SECOND_LEVEL);
- }
- },
-
- // Move cookie setting menu items for aUrlLevel
- // to the submenu and place the cookie setting menu items
- // for the other aUrlLevel in the main menu
- setCookieSubMenu: function(aUrlLevel)
- {
- var cookieMenuItems = new Array(
- new Array(document.getElementById("cookie-access-top-temp"), document.getElementById("cookie-access-second-temp")),
- new Array(document.getElementById("cookie-access-top-allow"), document.getElementById("cookie-access-second-allow")),
- new Array(document.getElementById("cookie-access-top-deny"), document.getElementById("cookie-access-second-deny")),
- new Array(document.getElementById("cookie-access-top-session"), document.getElementById("cookie-access-second-session"))
- );
- var cookieMenuSeparator = document.getElementById("temp-after-this");
- var altAccessMenu = document.getElementById("cookie-access-menu");
- var accessMenuLabel = this._menuBundle.getString("sitemenulabel");
- var swapCookieMenuItems;
-
- // Check current setting to see if
- // a switch is necessary
- if (aUrlLevel != this._currentSubMenu)
- {
- // Configure how the cookieMenuItems array values
- // are sent to the replace command
- if (aUrlLevel == CM_SECOND_LEVEL)
- {
- // Reverse the array order for each menu item
- for (var i = 0, menuItems; menuItems = cookieMenuItems[i]; i++)
- {
- menuItems.reverse();
- }
-
- // Change the label to (2nd) Domain level
- accessMenuLabel = this._menuBundle.getString("domainmenulabel");
- }
-
- // Replace menu items in sub menu
- swapCookieMenuItems = cookieMenuItems.map(function(menuItem)
- {
- //alert("swapCookieMenuItems: menuItem " + menuItem[0].getAttribute("id"));
- var replaceItem = this._statusBarSubMenu.replaceChild(menuItem[0], menuItem[1]);
- return replaceItem;
- }, cookieMonster);
-
- // Add replaced menu items to main status bar menu
- for (var i = 0, swapMenuItem; swapMenuItem = swapCookieMenuItems[i]; i++)
- {
- // Place menu item temp after correct menu separator
- if (i == 0)
- {
- this._statusBarMenu.insertBefore(swapMenuItem, cookieMenuSeparator.nextSibling);
- }
- else
- {
- this._statusBarMenu.appendChild(swapMenuItem);
- }
- }
-
- // Change this._currentSubMenu to aUrllevel
- this._currentSubMenu = aUrlLevel;
- altAccessMenu.setAttribute("label", this._menuBundle.getString("alternatecookieaccess") + " (" + accessMenuLabel + ")");
- }
- },
-
- /**
- * Update the sub menu structure for any 3rd Party Cookies,
- * including creating menu items for each one
- * @param {CookieInfo[]} aThirdPartyCookieList
- */
- setThirdPartyCookieSubMenu: function(aThirdPartyCookieList)
- {
- var defaultMenuItem;
- var tempAllowAllMenuItem;
- var tempRevokeAllMenuItem;
- var thirdPartyHosts = new Array();
- var menu = this._thirdPartyMenuOption;
-
- // Remove all menuitems
- if (menu.hasChildNodes())
- {
- while(menu.hasChildNodes())
- {
- menu.removeChild(menu.firstChild);
- }
- }
-
- // If aThirdPartyCookieList contains no cookie info,
- // make the default menu item visible
- // Else Add menu items for each third party cookie and
- // make the default menu item invisible
- if (aThirdPartyCookieList == null || aThirdPartyCookieList.length == 0)
- {
- defaultMenuItem = document.createElement("menuitem");
- defaultMenuItem.id = "cookie-thirdparty-default-none";
- defaultMenuItem.setAttribute("label", this._menuBundle.getString("thirdpartynone"));
- defaultMenuItem.setAttribute("class", "menuitem-iconic");
- defaultMenuItem.setAttribute("disabled", "true");
- menu.appendChild(defaultMenuItem);
- }
- else
- {
- aThirdPartyCookieList.forEach(
- function(tempCookieItem, index)
- {
- // First construct the menu
- var tempMenuItem = document.createElement("menu");
- var hostAccess = cookieMonster_CookieInfo.getPermissionString(tempCookieItem.accessValue);
-
- tempMenuItem.id = "cookie-thirdparty-" + index;
- tempMenuItem.setAttribute("label", this._menuBundle.getString("permissionsresultfor") +
- " " + tempCookieItem.host + ": " + this._menuBundle.getString(hostAccess));
- tempMenuItem.setAttribute("image", this.getIcon(hostAccess));
- tempMenuItem.setAttribute("class", "menu-iconic");
- tempMenuItem.addEventListener('command',
- function(event) {cookieMonster.extThirdPartyMenuSiteHandler(event, tempCookieItem.host)}, false);
- menu.appendChild(tempMenuItem);
-
- // Then create a popup containing all of the cookie access choices
- var tempMenuPopup = tempMenuItem.appendChild(document.createElement("menupopup"));
-
- tempMenuPopup.appendChild(this._createThirdPartyMenuItem("default", 0, tempCookieItem));
- tempMenuPopup.appendChild(document.createElement("menuseparator"));
- tempMenuPopup.appendChild(this._createThirdPartyMenuItem("temp", -1, tempCookieItem));
- tempMenuPopup.appendChild(document.createElement("menuseparator"));
- tempMenuPopup.appendChild(this._createThirdPartyMenuItem("allow", 1, tempCookieItem));
- tempMenuPopup.appendChild(this._createThirdPartyMenuItem("deny", 2, tempCookieItem));
- tempMenuPopup.appendChild(this._createThirdPartyMenuItem("session", 8, tempCookieItem));
-
- // Add host to third party host array
- thirdPartyHosts.push(tempCookieItem.host);
- }, this
- );
-
- menu.appendChild(document.createElement("menuseparator"));
- tempAllowAllMenuItem = document.createElement("menuitem");
- tempAllowAllMenuItem.id = "cookie-thirdparty-tempallow-all";
- tempAllowAllMenuItem.setAttribute("label", this._menuBundle.getString("thirdpartytempallowall"));
- tempAllowAllMenuItem.setAttribute("class", "menuitem-iconic");
- tempAllowAllMenuItem.addEventListener('command',
- function(event) {cookieMonster.extThirdPartyMenuAllHandler(event, thirdPartyHosts)}, false);
- menu.appendChild(tempAllowAllMenuItem);
-
- tempRevokeAllMenuItem = document.createElement("menuitem");
- tempRevokeAllMenuItem.id = "cookie-thirdparty-tempallow-revoke";
- tempRevokeAllMenuItem.setAttribute("label", this._menuBundle.getString("thirdpartytemprevokeall"));
- tempRevokeAllMenuItem.setAttribute("class", "menuitem-iconic");
- tempRevokeAllMenuItem.addEventListener('command',
- function(event) {cookieMonster.extThirdPartyMenuAllHandler(event, thirdPartyHosts, true)}, false);
- menu.appendChild(tempRevokeAllMenuItem);
- }
- },
-
- /**
- * Create menu item for third party cookie menu
- * @param {String} aType
- * @param {Integer} aMenuItemValue
- * @param {CookieInfo} aCookieItem
- * @return {nsIDOMElement} menu item
- */
- _createThirdPartyMenuItem: function(aType, aMenuItemValue, aCookieItem)
- {
- var cookieMenuItem = document.createElement("menuitem");
-
- cookieMenuItem.id = "cookie-access-third-" + aType;
- cookieMenuItem.value = aMenuItemValue.toString();
- cookieMenuItem.setAttribute("name", "cookie-three");
- cookieMenuItem.setAttribute("label", this._menuBundle.getString(aType) + " " + aCookieItem.host);
- cookieMenuItem.setAttribute("class", "menuitem-iconic");
-
- // Update label if default
- if (aType == "default")
- {
- if (this._currentGlobalPreference[CM_PREF_COOKIE_BEHAVIOR] != CM_PREF_BLOCK_THIRD_PARTY)
- {
- cookieMenuItem.setAttribute("label", this._menuBundle.getString(aType) + " (" + this._userDefault + ")");
- }
- else
- {
- cookieMenuItem.setAttribute("label", this._menuBundle.getString("thirdpartyblocked"));
- }
- }
-
- if (aCookieItem.accessValue == aMenuItemValue)
- {
- cookieMenuItem.setAttribute("name", "current-access");
- }
-
- return cookieMenuItem;
- },
-
- setStatusMenuEnabled: function(aEnable)
- {
- // Set popup attribute to desired status, if necessary
- if (aEnable != this._menuStatus)
- {
- if (aEnable)
- {
- this._statusBarPanel.setAttribute("popup", this._statusBarMenuId);
- }
- else
- {
- // If disable popup, then
- // set the icon for the status bar menu to default
- this._statusBarPanel.setAttribute("popup", "");
- this._statusBarPanel.setAttribute("src", this._iconArray[CM_COOKIE_ACCESS_DEFAULT]);
- }
-
- // Set member variable to track status of the menu
- this._menuStatus = aEnable;
- }
- },
-
- // Get the appropriate icon for the access type
- // (Replaces _iconArray for now, in order to
- // properly handle the Global Override functionality)
- getIcon: function(aAccess)
- {
- var retValue = this._iconArray[aAccess];
-
- // Check Global Override settings
- if (this._usingGlobalOverride && this._allowGlobalOverride)
- {
- if (aAccess == CM_COOKIE_ACCESS_ALLOW)
- {
- retValue = this._iconArray[CM_COOKIE_ACCESS_ALLOW_OG];
- }
- else if (aAccess == CM_COOKIE_ACCESS_SESSION)
- {
- retValue = this._iconArray[CM_COOKIE_ACCESS_SESSION_OG];
- }
- }
-
- return retValue;
- },
-
- // External access to current URI
- extGetCurrentURI: function()
- {
- return this._oldURL;
- },
-
- // External access to current URI.asciihost,
- // based on domain type
- extGetCurrentHost: function()
- {
- var currentHost = this._oldURL.asciiHost;
-
- if (this._secondLevel)
- {
- currentHost = cookieMonster_CookieInfo.getSecondLevelHost(currentHost);
- }
-
- return currentHost;
- },
-
- // External access to current domain type
- extGetCurrentDomainType: function()
- {
- var domainType = CM_URL_STANDARD_LEVEL;
-
- if (this._secondLevel)
- {
- domainType = CM_SECOND_LEVEL;
- }
- else
- {
- domainType = CM_TOP_LEVEL;
- }
-
- return domainType;
- },
-
- // External access to _allowGlobalOverride
- extGetIsAllowGlobalOverride: function()
- {
- return this._allowGlobalOverride;
- },
-
- // External access to reloading the current page
- extReloadCurrentPage: function()
- {
- this._browser.reload(this._browser.webNavigation.LOAD_FLAGS_BYPASS_CACHE);
- },
-
- // Return numeric representation of cookie access level
- // for current URL and domainType
- // If domainType is not passed, then domainType = CM_URL_STANDARD_LEVEL
- // by default
- // If aURI is not passed, then aURI = current URL
- extGetCookieAccess: function()
- {
- var domainType = CM_URL_STANDARD_LEVEL;
- var aURI = this._oldURL;
-
- if (arguments.length == 1)
- {
- domainType = arguments[0];
- }
- else if (arguments.length == 2)
- {
- domainType = arguments[0];
- aURI = arguments[1];
- }
-
- var accessLevel = cookieMonster_CookieInfo.checkPermissionArray(aURI, CM_PERMISSION_TYPE_COOKIE);
- return cookieMonster_CookieInfo.getPermissionValue(accessLevel[domainType]);
- },
-
- extSetCookieAccess: function(aAccess, domainType)
- {
- //alert("Setting Cookie Status for " + this._oldURL.asciiHost);
- cookieMonster_CookieInfo.setCookieAccess(this._oldURL, aAccess, domainType);
- this._oldAccess = cookieMonster_CookieInfo.checkPermissionArray(this._oldURL, CM_PERMISSION_TYPE_COOKIE);
- },
-
- extResetTempCookies: function(/*, aQuit */)
- {
- var aQuit = false || Boolean(arguments[0]);
-
- // Set menu event flag so we don't double trigger a permissions update
- this._flagMenuEvent = true;
-
- cookieMonster_TempAllow.resetTempCookies();
-
- if (!aQuit)
- {
- this._oldAccess = cookieMonster_CookieInfo.checkPermissionArray(this._oldURL, CM_PERMISSION_TYPE_COOKIE);
-
- // Only reload page if reloadOnPermissionChange preference == true
- if (this._reloadOnPermissionChange)
- {
- this._browser.reload(this._browser.webNavigation.LOAD_FLAGS_BYPASS_CACHE);
- }
-
- this.updateStatusbarMenu(this._oldURL.asciiHost, this._oldAccess);
- }
-
- // Reset menu event flag
- this._flagMenuEvent = false;
- },
-
- // If current URL is part of override global cookie list,
- // then the global cookie prefs will be changed to match
- // the individual cookie prefs for the URL
- // Else if current URL is NOT part of override global cookie list
- // then the global cookies prefs will be set to the user's current
- // global preferences
- extCheckGlobalCookiePref: function(aURI)
- {
- var overrideGlobal = null;
- var currentSiteAccess = CM_CA_LEVEL_DEFAULT;
-// var domainType = CM_TOP_LEVEL;
-//
-// if (this._secondLevel)
-// {
-// domainType = CM_SECOND_LEVEL;
-// }
-
- overrideGlobal = cookieMonster_CookieInfo.checkOverrideGlobal(aURI);
-
- // For now, set _usingGlobalOverride if either CM_TOP_LEVEL or
- // CM_SECOND_LEVEL are set, as the Global Override setting
- // allows cookies, period, thus paying no attention to the
- // domain level of the cookie
- this._usingGlobalOverride = overrideGlobal[CM_TOP_LEVEL] || overrideGlobal[CM_SECOND_LEVEL];
-
- if (this._usingGlobalOverride && this._allowGlobalOverride)
- {
- // Set _flagGlobalCookieEvent so _currentGlobalPreferences
- // are not changed during a global override
- this._flagGlobalCookieEvent = true;
-
- // Check for the resulting current site access (CM_URL_STANDARD_LEVEL)
- // to coincide with the preface of setting global override
- // if either CM_TOP_LEVEL or CM_SECOND_LEVEL are set
- currentSiteAccess = cookieMonster.extGetCookieAccess(CM_URL_STANDARD_LEVEL, aURI);
- //alert("Current URL Access: " + currentSiteAccess);
-
- if (currentSiteAccess == nsIPermissionManager.ALLOW_ACTION)
- {
- cookieMonster_PrefObserver.setCookiePref(new Array(0, 0));
- }
- else if (currentSiteAccess == nsICookiePermission.ACCESS_SESSION)
- {
- cookieMonster_PrefObserver.setCookiePref(new Array(0, 2));
- }
- else
- {
- cookieMonster.extResetGlobalCookiePref();
- }
-
- // Reset flag
- this._flagGlobalCookieEvent = false;
- }
- else
- {
- cookieMonster.extResetGlobalCookiePref();
- }
- },
-
- // Either add or remove current URL from override global list
- extSetGlobalCookiePref: function()
- {
- //var aSet = this._usingGlobalOverride;
- var domainType = CM_TOP_LEVEL;
-
- if (this._secondLevel)
- {
- domainType = CM_SECOND_LEVEL;
- }
- //alert("Setting Global Cookie Status for " + this._oldURL.asciiHost);
-
- if (this._usingGlobalOverride)
- {
- cookieMonster_CookieInfo.addOverrideGlobal(this._oldURL.asciiHost, domainType);
- }
- else
- {
- cookieMonster_CookieInfo.removeOverrideGlobal(this._oldURL.asciiHost, domainType);
- }
- },
-
- extResetGlobalCookiePref: function()
- {
- // Have the global permissions been changed
- var curGlobalCookie = cookieMonster_PrefObserver.getCookiePrefArray();
-
- //alert("curGlobalCookie: " + curGlobalCookie + " defaultGlobPref: " + this._currentGlobalPreference);
- if ((curGlobalCookie[CM_PREF_COOKIE_BEHAVIOR] != this._currentGlobalPreference[CM_PREF_COOKIE_BEHAVIOR]) ||
- (curGlobalCookie[CM_PREF_LIFETIME_POLICY] != this._currentGlobalPreference[CM_PREF_LIFETIME_POLICY]))
- {
- cookieMonster_PrefObserver.setCookiePref(this._currentGlobalPreference);
- }
- },
-
- // Process the commands pertaining
- // to the menu choices made by the user
- extMenuCommandHandler: function(evt)
- {
- var checkExpCookie = /^cookie-access/i;
- var checkExpOptions = /^option-/i;
- var itemPicked = null;
- var accessString = null;
- var accessValue = null;
-
- var itemPicked = document.getElementById(evt.target.id);
- //alert("Menu Command Event Id: " + evt.target.id + " CM_TOP_LEVEL: " + this._oldAccess[CM_TOP_LEVEL]);
-
- // Set menu event flag so we don't double trigger a permissions update
- this._flagMenuEvent = true;
-
- // If id contains cookie-access and name = cookie, then assign new
- // cookie access and reload page
- if (checkExpCookie.test(evt.target.id))
- {
- if (itemPicked.getAttribute("name") == "cookie-top")
- {
- this.extSetCookieAccess(evt.target.value, CM_TOP_LEVEL);
- }
- else if(itemPicked.getAttribute("name") == "cookie-two")
- {
- this.extSetCookieAccess(evt.target.value, CM_SECOND_LEVEL);
- }
- else if(itemPicked.getAttribute("name") == "cookie-access")
- {
- if (this._secondLevel)
- {
- this.extSetCookieAccess(evt.target.value, CM_SECOND_LEVEL);
- }
- else
- {
- this.extSetCookieAccess(evt.target.value, CM_TOP_LEVEL);
- }
- }
- else if(itemPicked.getAttribute("name") == "cookie-default")
- {
- this.extSetCookieAccess(evt.target.value, CM_TOP_LEVEL);
- this.extSetCookieAccess(evt.target.value, CM_SECOND_LEVEL);
- }
-
- // Only reload page if reloadOnPermissionChange preference == true
- if (this._reloadOnPermissionChange)
- {
- this._browser.reload(this._browser.webNavigation.LOAD_FLAGS_BYPASS_CACHE);
- }
-
- //accessString = cookieMonster_CookieInfo.getPermissionString(evt.target.value);
- this.updateStatusbarMenu(this._oldURL.asciiHost, this._oldAccess);
- }
- else if (checkExpOptions.test(evt.target.id))
- {
- // If id=second-level, then determine
- // if it is checked and set variable and
- // user preference cookiemonster.secondlevelurl and
- // call switchCookieSubMenu to check if the cookie
- // submenu needs to be switched
- // Else if id = this._globalOverrideId, then
- // update user cookie preferences
- if ((evt.target.id == this._secondLevelId) &&
- (this._secondLevel != itemPicked.getAttribute("checked")))
- {
- this._secondLevel = itemPicked.getAttribute("checked");
- cookieMonster_nsPreferences.setBoolPref("secondlevelurl", this._secondLevel);
- }
-/* else if((evt.target.id == this._globalOverrideId) &&
- (this._usingGlobalOverride != itemPicked.getAttribute("checked")))
- {
- itemPicked.setAttribute("checked", this._usingGlobalOverride);
- //this.extSetGlobalCookiePref();
- //this._browser.reload(this._browser.webNavigation.LOAD_FLAGS_BYPASS_CACHE);
- //alert("Global Override Option: " + this._usingGlobalOverride);
- } */
- }
-
- // Reset menu event flag
- this._flagMenuEvent = false;
-
- return false;
- },
-
- /**
- * Handle the command event for loading the third party menu
- * @param {Event} evt
- */
- extThirdPartyMenuLoadHandler: function(evt)
- {
- var cookieRequestData = cookieMonster_CookieRequest.getRequestList(this._oldURL.asciiHost);
- cookieMonster.setThirdPartyCookieSubMenu(cookieRequestData);
- //alert("length: " + cookieRequestData.length);
- evt.stopPropagation();
- },
-
- /**
- * Handle the command event for the third party menu items
- * @param {Event} evt
- * @param {String} aHost
- */
- extThirdPartyMenuSiteHandler: function(evt, aHost)
- {
- var hostURI = cookieMonster_Utils.createURIFromHostName(aHost);
- cookieMonster_CookieInfo.setCookieAccess(hostURI, evt.target.value, CM_TOP_LEVEL);
-
- if (!this._reloadOnPermissionChange)
- {
- cookieMonster_CookieRequest.updateCookieRequest(aHost, this._oldURL.asciiHost);
- }
-
- evt.stopPropagation();
- },
-
- /**
- * Handle the command event for the third party menu items
- * of temp allow all or temp allow revoke
- * @param {Event} evt
- * @param {String[]} aHosts
- * @optional {Boolean} aRevoke
- */
- extThirdPartyMenuAllHandler: function(evt, aHosts /*, aRevoke */)
- {
- var aRevoke = false || Boolean(arguments[2]);
-
- aHosts.forEach(
- function(host, index)
- {
- if (!aRevoke)
- {
- var hostURI = cookieMonster_Utils.createURIFromHostName(host);
- cookieMonster_CookieInfo.setCookieAccess(hostURI, -1, CM_TOP_LEVEL);
- }
- else
- {
- cookieMonster_TempAllow.resetTempCookie(host);
- }
-
- if (!this._reloadOnPermissionChange)
- {
- cookieMonster_CookieRequest.updateCookieRequest(host, this._oldURL.asciiHost);
- }
- }, this
- );
-
- // Only reload page if reloadOnPermissionChange preference == true
- if (this._reloadOnPermissionChange)
- {
- this._browser.reload(this._browser.webNavigation.LOAD_FLAGS_BYPASS_CACHE);
- }
-
- //alert("Got to extThirdPartyMenuAllHandler: target: " + evt.currentTarget.id + " hosts: " + aHosts.toSource());
-
- evt.stopPropagation();
- },
-
- extSetSiteRequestedSetCookie: function(evt)
- {
- var cookieTooltipAttempt = document.getElementById("cookie-group-attempt");
- var attemptDisplay = null;
-
- // Set the tool tip text indicating if the site has requested
- // to leave cookies
- if (cookieMonster_CookieRequest.hasMadeCookieRequest(this._oldURL.asciiHost))
- {
- attemptDisplay = this._menuBundle.getString("siteattemptedcookie");
- }
- else
- {
- attemptDisplay = this._menuBundle.getString("sitenotattemptedcookie");
- }
-
- cookieTooltipAttempt.lastChild.setAttribute("value", attemptDisplay);
-
- evt.stopPropagation();
- },
-
- // Set values based on preferences
- extUpdateFromPreferences: function(aPref)
- {
- var globalOverridePref = null;
-
- if (aPref == "secondlevelurl")
- {
- this._secondLevel = cookieMonster_nsPreferences.getBoolPref("secondlevelurl", false);
-
- if (this._secondLevel)
- {
- this._secondLevelMenuOption.setAttribute("checked", "true");
- }
- else
- {
- this._secondLevelMenuOption.setAttribute("checked", "false");
- }
-
- this.updateStatusbarMenu(this._oldURL.asciiHost, this._oldAccess);
- this.switchCookieSubMenu();
- }
- else if (aPref == "enableglobalcookieoverride")
- {
- // Retrieve the new value for enableglobalcookieoverride
- globalOverridePref = cookieMonster_nsPreferences.getBoolPref("enableglobalcookieoverride", false);
-
- // If enableglobalcookieoverride has changed then assign
- // the updated value, update the menu, reset global cookie
- // prefs if _allowGlobalOverride is false, and reload page
- // if the current URI is using global override
- if (this._allowGlobalOverride != globalOverridePref)
- {
- this._allowGlobalOverride = globalOverridePref;
- this._globalOverrideMenuOption.setAttribute("disabled", !this._allowGlobalOverride);
-
- if (!this._allowGlobalOverride)
- {
- this.extResetGlobalCookiePref();
- }
-
- if (this._usingGlobalOverride)
- {
- this._browser.reload(this._browser.webNavigation.LOAD_FLAGS_BYPASS_CACHE);
- }
- }
- }
- else if (aPref == "originaldefaulticon")
- {
- // Determine what default icon to use
- if (!cookieMonster_nsPreferences.getBoolPref("originaldefaulticon", false))
- {
- this._iconArray[CM_COOKIE_ACCESS_DEFAULT] = CM_ICON_DEFAULT;
- }
- else
- {
- this._iconArray[CM_COOKIE_ACCESS_DEFAULT] = CM_ICON_DEFAULT_ORIGINAL;
- }
-
- this.updateStatusbarMenu(this._oldURL.asciiHost, this._oldAccess);
- }
- else if (aPref == "reloadonpermissionchange")
- {
- this._reloadOnPermissionChange = cookieMonster_nsPreferences.getBoolPref("reloadonpermissionchange", false);
- }
- else if ((aPref == "cookieBehavior") || (aPref == "lifetimePolicy"))
- {
- // Retrieve users's updated default cookie permissions and
- // update Statusbar menu
- this._userDefault = cookieMonster_PrefObserver.getCookiePrefString();
-
- if (!this._flagGlobalCookieEvent)
- {
- this._currentGlobalPreference = cookieMonster_PrefObserver.getCookiePrefArray();
- }
-
- this.updateStatusbarMenu(this._oldURL.asciiHost, this._oldAccess);
- }
- },
-
- // Set values based on permissions
- extUpdateFromPermissions: function(aHost)
- {
- var currentURL = this._oldURL.host;
-
- // If the user has selected 2nd Level domains, then compare as such
- if (this._secondLevel)
- {
- currentURL = cookieMonster_CookieInfo.getSecondLevelHost(this._oldURL.host);
- }
-
- // Retrieve new cookies permission for current URL, reload page and
- // update status bar
- if ((aHost == currentURL) && !this._flagMenuEvent)
- {
- //alert("Permission Event and Not Menu Event: " + this._oldAccess);
- this._oldAccess = cookieMonster_CookieInfo.checkPermissionArray(this._oldURL, CM_PERMISSION_TYPE_COOKIE);
-
- // Only reload page if reloadOnPermissionChange preference == true
- if (this._reloadOnPermissionChange)
- {
- this._browser.reload(this._browser.webNavigation.LOAD_FLAGS_BYPASS_CACHE);
- }
-
- this.updateStatusbarMenu(this._oldURL.asciiHost, this._oldAccess);
- }
- }
-};
-
-// Edit: for me on Firefox 2.0, I had to change "document" to "window"
-// for the following lines to work
-window.addEventListener("load", function() {cookieMonster.init()},
-false);
-window.addEventListener("unload", function() {cookieMonster.uninit()},
-false);
diff --git a/chrome/cookiemonster.jar!/content/cookieMonster.xul b/chrome/cookiemonster.jar!/content/cookieMonster.xul
deleted file mode 100644
index b6171d4..0000000
--- a/chrome/cookiemonster.jar!/content/cookieMonster.xul
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
-<!DOCTYPE window SYSTEM "chrome://cookiemonster/locale/cookieMonster.dtd">
-
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- title="&title.label;">
-
-<hbox align="center">
- <description flex="1">&separate.label;</description>
- <groupbox>
- <caption label="Cookie Rule"/>
- <radiogroup oncommand="window.arguments[1](event.target.value); false;">
- <radio id="default" value="0" selected="true" label="Default"/>
- <radio id="allow" value="1" label="Allow"/>
- <radio id="deny" value="2" label="Deny"/>
- <radio id="session" value="8" label="Session"/>
- </radiogroup>
- </groupbox>
- <spacer style="width: 10px;"/>
- <button label="&close.label;" oncommand="close();"/>
-</hbox>
-
-</window>
diff --git a/chrome/cookiemonster.jar!/content/cookiePreferences.js b/chrome/cookiemonster.jar!/content/cookiePreferences.js
deleted file mode 100644
index 0a6ff9a..0000000
--- a/chrome/cookiemonster.jar!/content/cookiePreferences.js
+++ /dev/null
@@ -1,493 +0,0 @@
-/**
- * cookieMonster_nsPreferences - a wrapper around nsIPrefService. Provides built in
- * exception handling to make preferences access simpler.
- * Based on chrome://global/content/nsUserSettings.js
- **/
-var cookieMonster_nsPreferences =
-{
- _branch: null,
-
- get mPrefService()
- {
- if (this._branch != undefined)
- {
- return Components.classes["@mozilla.org/preferences-service;1"]
- .getService(Components.interfaces.nsIPrefBranch)
- .getBranch(this._branch);
- }
- else
- {
- return Components.classes["@mozilla.org/preferences-service;1"]
- .getService(Components.interfaces.nsIPrefBranch);
- }
- },
-
- set mBranch(aExtension)
- {
- this._branch = "extensions." + aExtension + ".";
- },
-
- // Boolean preferences
- setBoolPref: function (aPrefName, aPrefValue)
- {
- try
- {
- // This looks weird, but otherwise, setBoolPref
- // for aPrefValue = true does not work for me
- if (aPrefValue)
- {
- this.mPrefService.setBoolPref(aPrefName, true);
- }
- else
- {
- this.mPrefService.setBoolPref(aPrefName, false);
- }
- }
- catch(e)
- {
- }
- },
-
- getBoolPref: function (aPrefName, aDefVal)
- {
- try
- {
- return this.mPrefService.getBoolPref(aPrefName);
- }
- catch(e)
- {
- return aDefVal != undefined ? aDefVal : null;
- }
- return null; // quiet warnings
- },
-
- // String preferences
- setStringPref: function (aPrefName, aPrefValue)
- {
- try
- {
- this.mPrefService.setCharPref(aPrefName, aPrefValue);
- }
- catch(e)
- {
- }
- },
-
- setAppendToStringPref: function (aPrefName, aPrefValue)
- {
- var stringPref = null;
-
- try
- {
- // Get the string preference, add to it and
- // write back to preferences
- stringPref = this.getStringPref(aPrefName, false);
-
- if ((stringPref == null) || (stringPref.length == 0))
- {
- this.setStringPref(aPrefName, aPrefValue);
- }
- else
- {
- this.setStringPref(aPrefName, stringPref + '|' + aPrefValue);
- }
- }
- catch(e)
- {
- }
- },
-
- setRemoveFromStringPref: function (aPrefName, aPrefValue)
- {
- var stringPrefArray = null;
-
- try
- {
- // Get the string preference array, check for aPrefValue,
- // remove it from array and write back to preferences
- stringPrefArray = this.getStringPrefArray(aPrefName);
-
- for (var i = 0; i < stringPrefArray.length; i++)
- {
- var tempItem = stringPrefArray[i].split(';');
-
- if (tempItem[0] === aPrefValue)
- {
- stringPrefArray.splice(i, 1);
- break;
- }
- }
-
- this.setStringPrefArray(aPrefName, stringPrefArray);
- }
- catch(e)
- {
- }
- },
-
- setStringPrefArray: function (aPrefName, aPrefValue)
- {
- var stringPref = null;
-
- try
- {
- // Convert aPrefValue into a string,
- // with array values separated by a '|'
- stringPref = aPrefValue.join('|');
-
- this.setStringPref(aPrefName, stringPref);
- }
- catch(e)
- {
- }
- },
-
- getStringPref: function (aPrefName, aDefVal)
- {
- try
- {
- return this.mPrefService.getCharPref(aPrefName);
- }
- catch(e)
- {
- return aDefVal != undefined ? aDefVal : null;
- }
- return null;
- },
-
- getStringPrefArray: function (aPrefName)
- {
- var stringPref = null;
- var retValue = new Array();
-
- try
- {
- stringPref = this.getStringPref(aPrefName, false);
-
- if ((stringPref != null) && (stringPref != ""))
- {
- retValue = stringPref.split('|');
- }
- }
- catch(e)
- {
- }
- return retValue;
- },
-
- // Special Int Preference for Global Cookies
- setCookiePrefInt: function()
- {
- try
- {
- this.mPrefService.setCharPref(aPrefName, aPrefValue);
- }
- catch(e)
- {
- }
- },
-
- // Clear User preference
- clearUserPref: function (aPrefName)
- {
- try
- {
- this.mPrefService.clearUserPref(aPrefName);
- }
- catch(e)
- {
- }
- }
-};
-
-// Observer to notify when preferences are changed
-var cookieMonster_PrefObserver =
-{
- _branchExt: null,
- _branchNetworkCookie: null,
- _menuBundle: null,
-
- register: function()
- {
- var prefService = Components.classes["@mozilla.org/preferences-service;1"]
- .getService(Components.interfaces.nsIPrefService);
- this._branchExt = prefService.getBranch("extensions.cookiemonster.");
- this._branchExt.QueryInterface(Components.interfaces.nsIPrefBranch2);
- this._branchExt.addObserver("", this, false);
-
- this._branchNetworkCookie = prefService.getBranch("network.cookie.");
- this._branchNetworkCookie.QueryInterface(Components.interfaces.nsIPrefBranch2);
- this._branchNetworkCookie.addObserver("", this, false);
-
- // Create a reference to all the menu elements
- this._menuBundle = document.getElementById("cookie-menu-labels");
- },
-
- unregister: function()
- {
- if(this._branchExt)
- {
- this._branchExt.removeObserver("", this);
- }
- if(this._branchNetworkCookie)
- {
- this._branchNetworkCookie.removeObserver("", this);
- }
- },
-
- observe: function(aSubject, aTopic, aData)
- {
- if(aTopic != "nsPref:changed") return;
- // aSubject is the nsIPrefBranch we're observing (after appropriate QI)
- // aData is the name of the pref that's been changed (relative to aSubject)
-
- cookieMonster.extUpdateFromPreferences(aData);
- // switch (aData) {
- // case "secondlevelurl":
- // cookieMonster.extUpdateFromPreferences(aData);
- // break;
- // case "deletecookiesondeny":
- // // extensions.myextension.pref2 was changed
- // break;
- // }
- },
-
- // Return array representing user's current
- // choices for cookie preferences: cookieBehavior and lifetimePolicy
- getCookiePrefArray: function()
- {
- var resultPolicy = new Array(-1, -1);
-
- var prefService = Components.classes["@mozilla.org/preferences-service;1"]
- .getService(Components.interfaces.nsIPrefBranch)
- .getBranch("network.cookie.");
-
- resultPolicy[CM_PREF_COOKIE_BEHAVIOR] = prefService.getIntPref("cookieBehavior");
- resultPolicy[CM_PREF_LIFETIME_POLICY] = prefService.getIntPref("lifetimePolicy");
-
- return resultPolicy;
- },
-
- // Return string representing user's current
- // choices for cookie preferences
- getCookiePrefString: function()
- {
- var resultPolicy = null;
-
- var prefService = Components.classes["@mozilla.org/preferences-service;1"]
- .getService(Components.interfaces.nsIPrefBranch)
- .getBranch("network.cookie.");
-
- var cookieBehavior = prefService.getIntPref("cookieBehavior");
- var lifetimePolicy = prefService.getIntPref("lifetimePolicy");
-
- if (cookieBehavior != 2)
- {
- switch (lifetimePolicy)
- {
- case 0: //Server sets time
- resultPolicy = this._menuBundle.getString("accepted");
- break;
- case 1: // The user is prompted
- resultPolicy = this._menuBundle.getString("userprompted");
- break;
- case 2: // Session
- resultPolicy = this._menuBundle.getString("acceptedsession");
- break;
- default:
- resultPolicy = this._menuBundle.getString("accepted");
- break;
- }
-
- if (cookieBehavior == 1)
- {
- // Originator only
- resultPolicy += " [" + this._menuBundle.getString("originatingsiteonly") + "]";
- }
- }
- else
- {
- resultPolicy = this._menuBundle.getString("rejected");
- //resultPolicy = "Rejected";
- }
-
- return resultPolicy;
- },
-
- // Set user's current
- // choices for cookie preferences: cookieBehavior and lifetimePolicy
- // aGlobalCookiePref is an array of type (int, int)
- setCookiePref: function(aGlobalCookiePref)
- {
- var resultPolicy = new Array(-1, -1);
-
- var prefService = Components.classes["@mozilla.org/preferences-service;1"]
- .getService(Components.interfaces.nsIPrefBranch)
- .getBranch("network.cookie.");
-
- try
- {
- prefService.setIntPref("cookieBehavior", aGlobalCookiePref[CM_PREF_COOKIE_BEHAVIOR]);
- prefService.setIntPref("lifetimePolicy", aGlobalCookiePref[CM_PREF_LIFETIME_POLICY]);
- }
- catch(e)
- {
- alert("Error in setCookiePref: " + e);
- }
- }
-};
-
-// Observer to notify when cookie permissions have changed and
-// when the browser is shutting down
-var cookieMonster_ObserverService =
-{
- _permService: null,
- _nsIHttpChannel: Components.interfaces.nsIHttpChannel,
-
- // Ensure the observers are only added once
- register: function()
- {
- if (this._permService == null)
- {
- this._permService = Components.classes["@mozilla.org/observer-service;1"]
- .getService(Components.interfaces.nsIObserverService);
- this._permService.addObserver(this, "perm-changed", false);
- this._permService.addObserver(this, "quit-application-requested", false);
- this._permService.addObserver(this, "http-on-examine-response", false);
- this._permService.addObserver(this, "http-on-examine-cached-response", false);
- }
- },
-
- unregister: function()
- {
- if (this._permService)
- {
- this._permService.removeObserver(this, "perm-changed");
- this._permService.removeObserver(this, "quit-application-requested");
- this._permService.removeObserver(this, "http-on-examine-response");
- this._permService.removeObserver(this, "http-on-examine-cached-response");
- }
- },
-
- observe: function(aSubject, aTopic, aData)
- {
- if (aTopic == "perm-changed")
- {
- var permission = aSubject.QueryInterface(Components.interfaces.nsIPermission);
-
- if (permission.type == "cookie")
- {
- //alert("Perm Observer Host: " + permission.host + " Topic: " + aTopic + " Data: " + aData);
- cookieMonster.extUpdateFromPermissions(permission.host);
- }
- }
- else if (aTopic == "quit-application-requested")
- {
- // Delete all cookies from web sites listed
- // in the CM_PREFERENCE_TYPE_COOKIE_TEMP
- // preference string and then remove
- // the sites from the preference
- // Using quit-application-requested is a little
- // risky because the quit-application
- // process can still be aborted at this point,
- // but I have to in order to catch the browser
- // being closed by clicking the close [x] button
- // for the actual window
- //alert("quit-application-requested " + " Topic: " + aTopic + " Data: " + aData);
- cookieMonster.extResetTempCookies(true);
-
- // Also restore the user's current global cookie
- // permission preferences if override global is used
- cookieMonster.extResetGlobalCookiePref();
- }
- else if (aTopic == "http-on-examine-response" || aTopic == "http-on-examine-cached-response")
- {
- var httpChannel = aSubject.QueryInterface(this._nsIHttpChannel);
-
- if (httpChannel.visitResponseHeaders)
- {
- httpChannel.visitResponseHeaders(cookieMonster_HeaderVisitor);
- }
-
- if (cookieMonster_HeaderVisitor.isCookieRequest())
- {
- httpChannel.visitRequestHeaders(cookieMonster_HeaderVisitor);
- var browser = cookieMonster_Utils.getBrowserFromChannel(httpChannel);
-
- if (browser)
- {
- cookieMonster_CookieRequest.addCookieRequest(cookieMonster_HeaderVisitor.getHost(),
- browser, cookieMonster_HeaderVisitor.isDomainCookie());
- }
- else
- {
- //alert("browser null: cookieRequests: " + cookieRequests + " Request Name: " + requestObject.name + " url: " + url);
- }
- }
-
- cookieMonster_HeaderVisitor.reset();
- }
- }
-};
-
-var cookieMonster_HeaderVisitor =
-{
- _isCookieRequest: false,
- _isDomainCookie: false,
- _host: null,
- _referer: null,
-
- visitHeader: function (aHeader, aValue)
- {
- if (aHeader.indexOf("Set-Cookie") !== -1)
- {
- this._isCookieRequest = true;
- this._isDomainCookie = (aValue.toLowerCase().indexOf("domain=") !== -1);
- }
-
- if (aHeader.indexOf("Host") !== -1)
- {
- this._host = aValue;
- }
-
- if (aHeader.indexOf("Referer") !== -1)
- {
- this._referer = aValue;
- }
- },
-
- isCookieRequest: function ()
- {
- return this._isCookieRequest;
- },
-
- isDomainCookie: function ()
- {
- return this._isDomainCookie;
- },
-
- getHost: function ()
- {
- return this._host;
- },
-
- getReferer: function ()
- {
- var retValue = "None";
-
- if (this._referer)
- {
- retValue = this._referer;
- }
-
- return retValue;
- },
-
- reset: function ()
- {
- this._isCookieRequest = false;
- this._isDomainCookie = false;
- this._host = null;
- this._referer = null;
- }
-};
diff --git a/chrome/cookiemonster.jar!/content/cookieRequest.js b/chrome/cookiemonster.jar!/content/cookieRequest.js
deleted file mode 100644
index f729d52..0000000
--- a/chrome/cookiemonster.jar!/content/cookieRequest.js
+++ /dev/null
@@ -1,314 +0,0 @@
-/**
- * Store cookie requests for each browser host
- * @type cookieMonster_CookieRequest
- */
-var cookieMonster_CookieRequest =
-{
- _uriList: new Object(),
- _browserList: new Array(),
-
- init: function()
- {
- // Do nothing for now
- },
-
- /**
- * Check if the host is already contained in this list
- * @param {} aList
- * @param {} elt
- * @return Integer
- */
- _requestHostIndexOf: function(aList, elt /*, checkDomain, from*/)
- {
- var len = aList.length >>> 0;
- var checkDomain = false || Boolean(arguments[2]);
-
- var from = Number(arguments[3]) || 0;
- from = (from < 0)
- ? Math.ceil(from)
- : Math.floor(from);
- if (from < 0)
- from += len;
-
- if (!checkDomain)
- {
- for (; from < len; from++)
- {
- if (from in aList &&
- aList[from].host === elt.host)
- return from;
- }
- }
- else
- {
- for (; from < len; from++)
- {
- if (from in aList &&
- cookieMonster_CookieInfo.getSecondLevelHost(aList[from].host) === elt.host)
- return from;
- }
- }
-
- return -1;
- },
-
- /**
- * Check if the property is already contained in this list
- * @param {} aList
- * @param {} aProperty
- * @param {} aValue
- * @return Integer
- */
- _requestPropertyIndexOf: function(aList, aProperty, aValue /*, from*/)
- {
- var len = aList.length >>> 0;
- var checkDomain = false || Boolean(arguments[2]);
-
- var from = Number(arguments[3]) || 0;
- from = (from < 0)
- ? Math.ceil(from)
- : Math.floor(from);
- if (from < 0)
- from += len;
-
- for (; from < len; from++)
- {
- if (from in aList &&
- aList[from][aProperty] === aValue)
- return from;
- }
-
- return -1;
- },
-
- containsHost: function(aHost)
- {
- return this._uriList.hasOwnProperty(aHost);
- },
-
- hasMadeCookieRequest: function(aHost)
- {
- var retValue = false;
-
- if (this.containsHost(aHost))
- {
- retValue = this._uriList[aHost].hasMadeCookieRequest;
- }
-
- return retValue;
- },
-
- /**
- * Add cookie request to browser list
- * @param {String} aCookieHost
- * @param {Browser} aBrowser
- * @param {Boolean} aIsDomain
- */
- addCookieRequest: function(aCookieHost, aBrowser, aIsDomain)
- {
- if (aBrowser)
- {
- // Check if this browser is already contained in the list
- var browserIndex = this._requestPropertyIndexOf(this._browserList, 'browser', aBrowser);
- var cookieHostInfo = {host: aCookieHost, isDomain: aIsDomain};
-
- if (browserIndex > -1)
- {
- this._browserList[browserIndex].cookieRequestList.push(cookieHostInfo);
- }
- else
- {
- this._browserList.push({browser: aBrowser, cookieRequestList: new Array(cookieHostInfo)});
- }
-
- //alert("Add Cookie Request Browser: " + aBrowser.currentURI.asciiHost + " cookieURI: " + aCookieURI);
- }
- },
-
- /**
- * Process Cookie Requests for aBrowser
- * @param {Browser} aBrowser
- */
- processCookieRequests: function(aBrowser)
- {
- // Check if this browser is contained in the list
- var browserIndex = this._requestPropertyIndexOf(this._browserList, 'browser', aBrowser);
-
- if (browserIndex > -1)
- {
- var browserHost = aBrowser.currentURI.asciiHost;
-
- // Process each cookie URI in array for aBrowser
- for (var i = 0, cookieHostInfo; cookieHostInfo = this._browserList[browserIndex].cookieRequestList[i]; i++)
- {
- this._processCookieRequest(cookieHostInfo.host, browserHost, cookieHostInfo.isDomain);
- }
-
-// alert("Loading Cookies for Browser Host: " + browserHost +
-// "\nNumber of 3rd Party Cookies: " + this._uriList[browserHost].cookieRequestList.length +
-// "\nHost attempted to leave Cookie: " + this._uriList[browserHost].hasMadeCookieRequest);
- }
- },
-
- _processCookieRequest: function(aCookieURI, aLoadHost /*, aIsDomain */)
- {
- if (!(aCookieURI instanceof Components.interfaces.nsIURI))
- {
- aCookieURI = cookieMonster_Utils.createURIFromHostName(aCookieURI);
- }
-
- var aIsDomain = false || Boolean(arguments[2]);
- var secondLevelCookieHost = cookieMonster_CookieInfo.getSecondLevelHost(aCookieURI.host);
- var secondLevelLoadHost;
-
- // First of all, check to see if aLoadHost is null
- if (aLoadHost != null)
- {
- secondLevelLoadHost = cookieMonster_CookieInfo.getSecondLevelHost(aLoadHost);
-
- // Check if this host is already contained in the list
- if (!this._uriList.hasOwnProperty(aLoadHost))
- {
- this._uriList[aLoadHost] = new Object();
- this._uriList[aLoadHost].cookieRequestList = new Array();
- this._uriList[aLoadHost].hasMadeCookieRequest = false;
- }
-
- //alert("Process secondLevelCookieHost: " + secondLevelCookieHost + " secondLevelLoadHost: " + secondLevelLoadHost);
-
- // Filter out cookies from the load host
- if (secondLevelCookieHost != secondLevelLoadHost)
- {
- // If this is a domain cookie request, then convert
- // aCookieURI to a domain
- if (aIsDomain)
- {
- aCookieURI = cookieMonster_CookieInfo.getSecondLevelURI(aCookieURI);
- }
-
- // Check if URI already has a non-default cookie access
- // Use CM_URL_STANDARD_LEVEL in order to reflect the result
- // of aCookieURI
- var accessLevel = cookieMonster_CookieInfo.checkPermissionArray(aCookieURI, CM_PERMISSION_TYPE_COOKIE);
- var accessValue = cookieMonster_CookieInfo.getPermissionValue(accessLevel[CM_URL_STANDARD_LEVEL]);
- var cookieInfo = {host: aCookieURI.asciiHost, accessValue: accessValue};
-
- // Check if this URI is already contained in the list for the host and
- // if so, check to see if the accessValue has changed
- // Also check for the situation where the TOP LEVEL URL may already be
- // in the list and a Domain cookie being added
- var hostIndex = this._requestHostIndexOf(this._uriList[aLoadHost].cookieRequestList, cookieInfo);
-
- //alert("hostIndex: " + hostIndex + " _uriList: " + this._uriList.toSource());
- //alert("Process secondLevelCookieHost: " + secondLevelCookieHost + " secondLevelLoadHost: " + secondLevelLoadHost);
-
- if (hostIndex > -1)
- {
- if (this._uriList[aLoadHost].cookieRequestList[hostIndex].accessValue != accessValue)
- {
- this._uriList[aLoadHost].cookieRequestList[hostIndex].accessValue = accessValue;
- }
- }
- else
- {
- this._uriList[aLoadHost].cookieRequestList.push(cookieInfo);
- }
- }
- else
- {
- this._uriList[aLoadHost].hasMadeCookieRequest = true;
- }
- }
- },
-
- _refreshCookieRequest: function(aLoadHost)
- {
- if (this.containsHost(aLoadHost))
- {
- this._uriList[aLoadHost].cookieRequestList.forEach(
- function(tempCookieItem, index)
- {
- this._processCookieRequest(tempCookieItem.host, aLoadHost);
- }, this
- );
- }
- },
-
- /**
- * Update the cookie info for aCookieHost
- * @param {String} aCookieHost
- * @param {String} aHost
- */
- updateCookieRequest: function(aCookieHost, aHost)
- {
- this._processCookieRequest(aCookieHost, aHost);
- },
-
- /**
- * Retrieve cookie request list for aLoadHost
- * @param {String} aLoadHost
- * @return {cookieInfo[]} cookieInfo {host: accessValue:} objects
- */
- getRequestList: function(aLoadHost)
- {
- var retValue = null;
-
- if (this.containsHost(aLoadHost))
- {
- this._refreshCookieRequest(aLoadHost);
- retValue = this._uriList[aLoadHost].cookieRequestList;
- }
-
- return (retValue != undefined) ? retValue : null;
- },
-
- /**
- * Clear cookie requests from aBrowser
- * @param {Browser} aBrowser
- */
- clearBrowser: function(aBrowser)
- {
- // Check if this browser is contained in the list
- var browserIndex = this._requestPropertyIndexOf(this._browserList, 'browser', aBrowser);
-
- if (browserIndex > -1)
- {
- this._browserList[browserIndex].cookieRequestList = new Array();
- }
- },
-
- /**
- * Remove aBrowser from browser list
- * @param {Browser} aBrowser
- */
- removeBrowser: function(aBrowser)
- {
- // Check if this browser is contained in the list
- var browserIndex = this._requestPropertyIndexOf(this._browserList, 'browser', aBrowser);
-
- //alert(" Browser List Count Before Delete: " + this._browserList.length + " at Index: " + browserIndex);
-
- if (browserIndex > -1)
- {
- this._browserList.splice(browserIndex, 1);
- }
- },
-
- /**
- * Remove aLoadHost from uri list
- * @param {String} aLoadHost
- */
- removeHost: function(aLoadHost)
- {
- if (this.containsHost(aLoadHost))
- {
- //alert("uriList contains " + aLoadHost);
-
- if (!cookieMonster_Utils.isUrlMultipleTabs(aLoadHost, true))
- {
- //alert(aLoadHost + " only open in one tab, so deleting host");
- delete this._uriList[aLoadHost];
- }
- }
- }
-}
diff --git a/chrome/cookiemonster.jar!/content/cookieTempAllow.js b/chrome/cookiemonster.jar!/content/cookieTempAllow.js
deleted file mode 100644
index 81bc4c2..0000000
--- a/chrome/cookiemonster.jar!/content/cookieTempAllow.js
+++ /dev/null
@@ -1,147 +0,0 @@
-/**
- * Handle Temporary Allow List by maintaining the config preference
- * CM_PREFERENCE_TYPE_COOKIE_TEMP
- * @type cookieMonster_TempAllow
- */
-var cookieMonster_TempAllow =
-{
- init: function()
- {
- // Do nothing for now
- },
-
- /**
- * Check if the host is already contained in this list
- * @param {} aList
- * @param {} elt
- * @return Integer
- */
- _requestHostIndexOf: function(aList, elt /*, checkDomain, from*/)
- {
- var len = aList.length >>> 0;
- var checkDomain = false || Boolean(arguments[2]);
-
- var from = Number(arguments[3]) || 0;
- from = (from < 0)
- ? Math.ceil(from)
- : Math.floor(from);
- if (from < 0)
- from += len;
-
- if (!checkDomain)
- {
- for (; from < len; from++)
- {
- if (from in aList &&
- aList[from].split(';')[0] === elt)
- return from;
- }
- }
- else
- {
- for (; from < len; from++)
- {
- if (from in aList &&
- cookieMonster_CookieInfo.getSecondLevelHost(aList[from].split(';')[0]) === elt)
- return from;
- }
- }
-
- return -1;
- },
-
- add: function(aURI)
- {
- // Check if URI already has a non-default cookie access
- // Use CM_TOP_LEVEL because the level is already inherently defined
- // by aURI in this case
- var accessLevel = cookieMonster_CookieInfo.checkPermissionArray(aURI, CM_PERMISSION_TYPE_COOKIE);
- var accessValue = cookieMonster_CookieInfo.getPermissionValue(accessLevel[CM_TOP_LEVEL]);
-
- cookieMonster_nsPreferences.setAppendToStringPref(CM_PREFERENCE_TYPE_COOKIE_TEMP, aURI.asciiHost + ';' + accessValue);
- },
-
- remove: function(aURI)
- {
- cookieMonster_nsPreferences.setRemoveFromStringPref(CM_PREFERENCE_TYPE_COOKIE_TEMP, aURI.asciiHost);
- },
-
- // Check to see if aURI is a temporary permission
- isTempPermission: function(aURI)
- {
- var retValue = false;
- var tempList = cookieMonster_nsPreferences.getStringPrefArray(CM_PREFERENCE_TYPE_COOKIE_TEMP);
-
- // Each array item should contain a URI and a cookie preference,
- // separated by a semicolon
- for (var i = 0; i < tempList.length; i++)
- {
- var tempItem = tempList[i].split(';');
-
- if (tempItem[0] === aURI.asciiHost)
- {
- retValue = true;
- break;
- }
- }
-
- return retValue;
- },
-
- /**
- * Reset permission for aHost from temp allow
- * back to original permission
- * @param {string} aHost
- * @return {Integer} Original Permission Setting
- */
- resetTempCookie: function(aHost)
- {
- var retValue = null;
- var tempList = cookieMonster_nsPreferences.getStringPrefArray(CM_PREFERENCE_TYPE_COOKIE_TEMP);
-
- // Retrieve index position for aURI
- var hostIndex = this._requestHostIndexOf(tempList, aHost);
- //alert("Got to resetTempCookie: hostIndex: " + hostIndex + " " + tempList[hostIndex]);
-
- // Reset cookie permissions back to previous setting and
- // remove from preference string
- if (hostIndex > -1)
- {
- this._resetTempCookieValues(tempList[hostIndex], hostIndex);
- cookieMonster_nsPreferences.setRemoveFromStringPref(CM_PREFERENCE_TYPE_COOKIE_TEMP, aHost);
- retValue = tempList[hostIndex].split(';')[1];
- }
-
- return retValue;
- },
-
- /**
- * Reset temp cookie list
- */
- resetTempCookies: function()
- {
- var tempList = cookieMonster_nsPreferences.getStringPrefArray(CM_PREFERENCE_TYPE_COOKIE_TEMP);
- tempList.forEach(this._resetTempCookieValues, this);
-
- cookieMonster_nsPreferences.clearUserPref(CM_PREFERENCE_TYPE_COOKIE_TEMP);
- },
-
- // Delete temp cookies from host and reset temp cookie permissions
- _resetTempCookieValues: function(aItem, aIndex)
- {
- var hostURI = null;
- var item = aItem.split(';');
- var host = item[0];
- var prefSetting = item[1];
-
- // Set aUseBaseDomain to true
- cookieMonster_CookieInfo.deleteHostCookies(host, true);
-
- //alert("resetTempCookieValues: Host: " + host + " Previous Setting: " + prefSetting);
-
- hostURI = cookieMonster_Utils.createURIFromHostName(host);
-
- // Reset cookie permissions back to previous setting
- cookieMonster_CookieInfo.choice.setAccess(hostURI, prefSetting);
- }
-}
diff --git a/chrome/cookiemonster.jar!/content/cookieUtils.js b/chrome/cookiemonster.jar!/content/cookieUtils.js
deleted file mode 100644
index b587162..0000000
--- a/chrome/cookiemonster.jar!/content/cookieUtils.js
+++ /dev/null
@@ -1,97 +0,0 @@
-var cookieMonster_Utils =
-{
- _bundle: null,
-
- init: function()
- {
- this._bundle = document.getElementById("cookie-preferences");
- },
-
- getBrowserFromChannel: function (aChannel)
- {
- try
- {
- var notificationCallbacks =
- aChannel.notificationCallbacks ? aChannel.notificationCallbacks : aChannel.loadGroup.notificationCallbacks;
-
- if (!notificationCallbacks)
- return null;
-
- var domWin = notificationCallbacks.getInterface(Components.interfaces.nsIDOMWindow);
- return gBrowser.getBrowserForDocument(domWin.top.document);
- }
- catch (e)
- {
- dump(e + "\n");
- return null;
- }
- },
-
- isUrlMultipleTabs: function(aHost /*, checkDomain*/)
- {
- var numberTabs = 0;
- var checkDomain = false || Boolean(arguments[1]);
- var num = gBrowser.browsers.length;
-
- if (!checkDomain)
- {
- for (var i = 0; i < num; i++)
- {
- var b = gBrowser.getBrowserAtIndex(i);
-
- //alert("browser host " + i + " " + b.currentURI.asciiHost + " host: " + aHost);
-
- if (b.currentURI.asciiHost === aHost)
- {
- if(++numberTabs >= 2)
- {
- break;
- }
- }
- }
- }
- else
- {
- var secondLevelHost = cookieMonster_CookieInfo.getSecondLevelHost(aHost);
-
- for (var i = 0; i < num; i++)
- {
- var b = gBrowser.getBrowserAtIndex(i);
- var secondLevelBrowserHost = cookieMonster_CookieInfo.getSecondLevelHost(b.currentURI.asciiHost);
-
- if (secondLevelBrowserHost === secondLevelHost)
- {
- if(++numberTabs >= 2)
- {
- break;
- }
- }
- }
- }
-
- return (numberTabs >= 2);
- },
-
- createURIFromHostName: function(aHostName)
- {
- var newHost = null;
-
- try
- {
- var ioService = Components.classes["@mozilla.org/network/io-service;1"]
- .getService(Components.interfaces.nsIIOService);
-
- newHost = ioService.newURI("http://"+aHostName, null, null);
- }
- catch(ex)
- {
- var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
- .getService(Components.interfaces.nsIPromptService);
- var message = this._bundle.getString("invalidURI");
- var title = this._bundle.getString("invalidURITitle");
- promptService.alert(window, title, message);
- }
-
- return newHost;
- }
-}
diff --git a/chrome/cookiemonster.jar!/content/cookies.js b/chrome/cookiemonster.jar!/content/cookies.js
deleted file mode 100644
index e6c7d40..0000000
--- a/chrome/cookiemonster.jar!/content/cookies.js
+++ /dev/null
@@ -1,903 +0,0 @@
-//@line 39 "/e/fx19rel/WINNT_5.2_Depend/mozilla/browser/components/preferences/cookies.js"
-
-const nsICookie = Components.interfaces.nsICookie;
-
-var gSiteCookiesWindow = {
- _cm : Components.classes["@mozilla.org/cookiemanager;1"]
- .getService(Components.interfaces.nsICookieManager),
- _ds : Components.classes["@mozilla.org/intl/scriptabledateformat;1"]
- .getService(Components.interfaces.nsIScriptableDateFormat),
- _hosts : {},
- _hostOrder : [],
- _tree : null,
- _bundle : null,
- _bundleExtra : null,
- _searchFilterBox : null,
-
- init: function ()
- {
- var os = Components.classes["@mozilla.org/observer-service;1"]
- .getService(Components.interfaces.nsIObserverService);
- os.addObserver(this, "cookie-changed", false);
- os.addObserver(this, "perm-changed", false);
-
- this._bundle = document.getElementById("bundlePreferences");
- this._bundleExtra = document.getElementById("site-cookie-labels");
- this._tree = document.getElementById("cookiesList");
- this._searchFilterBox = document.getElementById("searchFilter");
-
- this._loadCookies();
- this._tree.treeBoxObject.view = this._view;
- this.sort("rawHost");
- if (this._view.rowCount > 0)
- this._tree.view.selection.select(0);
-
- // Add label and access key for clear button, since FF3.1
- // removed these from cookies.dtd
- var clearFilterButton = document.getElementById("clearFilter");
- clearFilterButton.setAttribute("label", this._bundleExtra.getString("clearlabel"));
- clearFilterButton.setAttribute("accesskey", this._bundleExtra.getString("clearaccesskey"));
-
- if ("arguments" in window && window.arguments[0])
- {
- if (window.arguments[0].filterString)
- {
- this.setFilter(window.arguments[0].filterString);
- }
- if (!window.arguments[0].showSearch)
- {
- //alert("Argument showSearch: " + !window.arguments[0].showSearch);
- this._searchFilterBox.setAttribute("hidden", !window.arguments[0].showSearch);
- }
- else
- {
- document.getElementById("searchFilterLabel").value = gSiteCookiesWindow._bundleExtra.getString("searchbyurl");
- }
- }
-
-
-
- this._saveState();
-
- document.getElementById("filter").focus();
- },
-
- uninit: function ()
- {
- var os = Components.classes["@mozilla.org/observer-service;1"]
- .getService(Components.interfaces.nsIObserverService);
- os.removeObserver(this, "cookie-changed");
- os.removeObserver(this, "perm-changed");
- },
-
- _cookieEquals: function (aCookieA, aCookieB, aStrippedHost)
- {
- return aCookieA.rawHost == aStrippedHost &&
- aCookieA.name == aCookieB.name &&
- aCookieA.path == aCookieB.path;
- },
-
- observe: function (aCookie, aTopic, aData)
- {
- if (aTopic != "cookie-changed")
- return;
-
- if (aCookie instanceof Components.interfaces.nsICookie) {
- var strippedHost = this._makeStrippedHost(aCookie.host);
- if (aData == "changed")
- this._handleCookieChanged(aCookie, strippedHost);
- else if (aData == "added")
- this._handleCookieAdded(aCookie, strippedHost);
- }
- else if (aData == "cleared") {
- this._hosts = {};
- this._hostOrder = [];
-
- var oldRowCount = this._view._rowCount;
- this._view._rowCount = 0;
- this._tree.treeBoxObject.rowCountChanged(0, -oldRowCount);
- this._view.selection.clearSelection();
- }
-
- // We don't yet handle aData == "deleted" - it's a less common case
- // and is rather complicated as selection tracking is difficult
- },
-
- _handleCookieChanged: function (changedCookie, strippedHost)
- {
- var rowIndex = 0;
- var cookieItem = null;
- if (!this._view._filtered) {
- for (var i = 0; i < this._hostOrder.length; ++i) { // (var host in this._hosts) {
- ++rowIndex;
- var hostItem = this._hosts[this._hostOrder[i]]; // var hostItem = this._hosts[host];
- if (this._hostOrder[i] == strippedHost) { // host == strippedHost) {
- // Host matches, look for the cookie within this Host collection
- // and update its data
- for (var j = 0; j < hostItem.cookies.length; ++j) {
- ++rowIndex;
- var currCookie = hostItem.cookies[j];
- if (this._cookieEquals(currCookie, changedCookie, strippedHost)) {
- currCookie.value = changedCookie.value;
- currCookie.isSecure = changedCookie.isSecure;
- currCookie.isDomain = changedCookie.isDomain;
- currCookie.expires = changedCookie.expires;
- cookieItem = currCookie;
- break;
- }
- }
- }
- else if (hostItem.open)
- rowIndex += hostItem.cookies.length;
- }
- }
- else {
- // Just walk the filter list to find the item. It doesn't matter that
- // we don't update the main Host collection when we do this, because
- // when the filter is reset the Host collection is rebuilt anyway.
- for (rowIndex = 0; rowIndex < this._view._filterSet.length; ++rowIndex) {
- currCookie = this._view._filterSet[rowIndex];
- if (this._cookieEquals(currCookie, changedCookie, strippedHost)) {
- currCookie.value = changedCookie.value;
- currCookie.isSecure = changedCookie.isSecure;
- currCookie.isDomain = changedCookie.isDomain;
- currCookie.expires = changedCookie.expires;
- cookieItem = currCookie;
- break;
- }
- }
- }
-
- // Make sure the tree display is up to date...
- this._tree.treeBoxObject.invalidateRow(rowIndex);
- // ... and if the cookie is selected, update the displayed metadata too
- if (cookieItem != null && this._view.selection.currentIndex == rowIndex)
- this._updateCookieData(cookieItem);
- },
-
- _handleCookieAdded: function (changedCookie, strippedHost)
- {
- var rowCountImpact = 0;
- var addedHost = { value: 0 };
- this._addCookie(strippedHost, changedCookie, addedHost);
- if (!this._view._filtered) {
- // The Host collection for this cookie already exists, and it's not open,
- // so don't increment the rowCountImpact becaues the user is not going to
- // see the additional rows as they're hidden.
- if (addedHost.value || this._hosts[strippedHost].open)
- ++rowCountImpact;
- }
- else {
- // We're in search mode, and the cookie being added matches
- // the search condition, so add it to the list.
- var c = this._makeCookieObject(strippedHost, changedCookie);
- if (this._cookieMatchesFilter(c)) {
- this._view._filterSet.push(this._makeCookieObject(strippedHost, changedCookie));
- ++rowCountImpact;
- }
- }
- // Now update the tree display at the end (we could/should re run the sort
- // if any to get the position correct.)
- var oldRowCount = this._rowCount;
- this._view._rowCount += rowCountImpact;
- this._tree.treeBoxObject.rowCountChanged(oldRowCount - 1, rowCountImpact);
-
- document.getElementById("removeAllCookies").disabled = this._view._filtered;
- },
-
- _view: {
- _filtered : false,
- _filterSet : [],
- _filterValue: "",
- _rowCount : 0,
- _cacheValid : 0,
- _cacheItems : [],
- get rowCount()
- {
- return this._rowCount;
- },
-
- _getItemAtIndex: function (aIndex)
- {
- if (this._filtered)
- return this._filterSet[aIndex];
-
- var start = 0;
- var count = 0, hostIndex = 0;
-
- var cacheIndex = Math.min(this._cacheValid, aIndex);
- if (cacheIndex > 0) {
- var cacheItem = this._cacheItems[cacheIndex];
- start = cacheItem['start'];
- count = hostIndex = cacheItem['count'];
- }
-
- for (var i = start; i < gSiteCookiesWindow._hostOrder.length; ++i) { // var host in gSiteCookiesWindow._hosts) {
- var currHost = gSiteCookiesWindow._hosts[gSiteCookiesWindow._hostOrder[i]]; // gSiteCookiesWindow._hosts[host];
- if (!currHost) continue;
- if (count == aIndex)
- return currHost;
- hostIndex = count;
-
- var cacheEntry = { 'start' : i, 'count' : count };
- var cacheStart = count;
-
- if (currHost.open) {
- if (count < aIndex && aIndex <= (count + currHost.cookies.length)) {
- // We are looking for an entry within this host's children,
- // enumerate them looking for the index.
- ++count;
- for (var i = 0; i < currHost.cookies.length; ++i) {
- if (count == aIndex) {
- var cookie = currHost.cookies[i];
- cookie.parentIndex = hostIndex;
- return cookie;
- }
- ++count;
- }
- }
- else {
- // A host entry was open, but we weren't looking for an index
- // within that host entry's children, so skip forward over the
- // entry's children. We need to add one to increment for the
- // host value too.
- count += currHost.cookies.length + 1;
- }
- }
- else
- ++count;
-
- for (var j = cacheStart; j < count; j++)
- this._cacheItems[j] = cacheEntry;
- this._cacheValid = count - 1;
- }
- return null;
- },
-
- _removeItemAtIndex: function (aIndex, aCount)
- {
- var removeCount = aCount === undefined ? 1 : aCount;
- if (this._filtered) {
- // remove the cookies from the unfiltered set so that they
- // don't reappear when the filter is changed. See bug 410863.
- for (var i = aIndex; i < aIndex + removeCount; ++i) {
- var item = this._filterSet[i];
- var parent = gSiteCookiesWindow._hosts[item.rawHost];
- for (var j = 0; j < parent.cookies.length; ++j) {
- if (item == parent.cookies[j]) {
- parent.cookies.splice(j, 1);
- break;
- }
- }
- }
- this._filterSet.splice(aIndex, removeCount);
- return;
- }
-
- var item = this._getItemAtIndex(aIndex);
- if (!item) return;
- this._invalidateCache(aIndex - 1);
- if (item.container)
- gSiteCookiesWindow._hosts[item.rawHost] = null;
- else {
- var parent = this._getItemAtIndex(item.parentIndex);
- for (var i = 0; i < parent.cookies.length; ++i) {
- var cookie = parent.cookies[i];
- if (item.rawHost == cookie.rawHost &&
- item.name == cookie.name && item.path == cookie.path)
- parent.cookies.splice(i, removeCount);
- }
- }
- },
-
- _invalidateCache: function (aIndex)
- {
- this._cacheValid = Math.min(this._cacheValid, aIndex);
- },
-
- getCellText: function (aIndex, aColumn)
- {
- if (!this._filtered) {
- var item = this._getItemAtIndex(aIndex);
- if (!item)
- return "";
- if (aColumn.id == "domainCol")
- return item.rawHost;
- else if (aColumn.id == "nameCol")
- return item.name;
- }
- else {
- if (aColumn.id == "domainCol")
- return this._filterSet[aIndex].rawHost;
- else if (aColumn.id == "nameCol")
- return this._filterSet[aIndex].name;
- }
- return "";
- },
-
- _selection: null,
- get selection () { return this._selection; },
- set selection (val) { this._selection = val; return val; },
- getRowProperties: function (aIndex, aProperties) {},
- getCellProperties: function (aIndex, aColumn, aProperties) {},
- getColumnProperties: function (aColumn, aProperties) {},
- isContainer: function (aIndex)
- {
- if (!this._filtered) {
- var item = this._getItemAtIndex(aIndex);
- if (!item) return false;
- return item.container;
- }
- return false;
- },
- isContainerOpen: function (aIndex)
- {
- if (!this._filtered) {
- var item = this._getItemAtIndex(aIndex);
- if (!item) return false;
- return item.open;
- }
- return false;
- },
- isContainerEmpty: function (aIndex)
- {
- if (!this._filtered) {
- var item = this._getItemAtIndex(aIndex);
- if (!item) return false;
- return item.cookies.length == 0;
- }
- return false;
- },
- isSeparator: function (aIndex) { return false; },
- isSorted: function (aIndex) { return false; },
- canDrop: function (aIndex, aOrientation) { return false; },
- drop: function (aIndex, aOrientation) {},
- getParentIndex: function (aIndex)
- {
- if (!this._filtered) {
- var item = this._getItemAtIndex(aIndex);
- // If an item has no parent index (i.e. it is at the top level) this
- // function MUST return -1 otherwise we will go into an infinite loop.
- // Containers are always top level items in the cookies tree, so make
- // sure to return the appropriate value here.
- if (!item || item.container) return -1;
- return item.parentIndex;
- }
- return -1;
- },
- hasNextSibling: function (aParentIndex, aIndex)
- {
- if (!this._filtered) {
- // |aParentIndex| appears to be bogus, but we can get the real
- // parent index by getting the entry for |aIndex| and reading the
- // parentIndex field.
- // The index of the last item in this host collection is the
- // index of the parent + the size of the host collection, and
- // aIndex has a next sibling if it is less than this value.
- var item = this._getItemAtIndex(aIndex);
- if (item) {
- if (item.container) {
- for (var i = aIndex + 1; i < this.rowCount; ++i) {
- var subsequent = this._getItemAtIndex(i);
- if (subsequent.container)
- return true;
- }
- return false;
- }
- else {
- var parent = this._getItemAtIndex(item.parentIndex);
- if (parent && parent.container)
- return aIndex < item.parentIndex + parent.cookies.length;
- }
- }
- }
- return aIndex < this.rowCount - 1;
- },
- hasPreviousSibling: function (aIndex)
- {
- if (!this._filtered) {
- var item = this._getItemAtIndex(aIndex);
- if (!item) return false;
- var parent = this._getItemAtIndex(item.parentIndex);
- if (parent && parent.container)
- return aIndex > item.parentIndex + 1;
- }
- return aIndex > 0;
- },
- getLevel: function (aIndex)
- {
- if (!this._filtered) {
- var item = this._getItemAtIndex(aIndex);
- if (!item) return 0;
- return item.level;
- }
- return 0;
- },
- getImageSrc: function (aIndex, aColumn) {},
- getProgressMode: function (aIndex, aColumn) {},
- getCellValue: function (aIndex, aColumn) {},
- setTree: function (aTree) {},
- toggleOpenState: function (aIndex)
- {
- if (!this._filtered) {
- var item = this._getItemAtIndex(aIndex);
- if (!item) return;
- this._invalidateCache(aIndex);
- var multiplier = item.open ? -1 : 1;
- var delta = multiplier * item.cookies.length;
- this._rowCount += delta;
- item.open = !item.open;
- gSiteCookiesWindow._tree.treeBoxObject.rowCountChanged(aIndex + 1, delta);
- gSiteCookiesWindow._tree.treeBoxObject.invalidateRow(aIndex);
- }
- },
- cycleHeader: function (aColumn) {},
- selectionChanged: function () {},
- cycleCell: function (aIndex, aColumn) {},
- isEditable: function (aIndex, aColumn)
- {
- return false;
- },
- isSelectable: function (aIndex, aColumn)
- {
- return false;
- },
- setCellValue: function (aIndex, aColumn, aValue) {},
- setCellText: function (aIndex, aColumn, aValue) {},
- performAction: function (aAction) {},
- performActionOnRow: function (aAction, aIndex) {},
- performActionOnCell: function (aAction, aindex, aColumn) {}
- },
-
- _makeStrippedHost: function (aHost)
- {
- var formattedHost = aHost.charAt(0) == "." ? aHost.substring(1, aHost.length) : aHost;
- return formattedHost.substring(0, 4) == "www." ? formattedHost.substring(4, formattedHost.length) : formattedHost;
- },
-
- _addCookie: function (aStrippedHost, aCookie, aHostCount)
- {
- if (!(aStrippedHost in this._hosts) || !this._hosts[aStrippedHost]) {
- this._hosts[aStrippedHost] = { cookies : [],
- rawHost : aStrippedHost,
- level : 0,
- open : false,
- container : true };
- this._hostOrder.push(aStrippedHost);
- ++aHostCount.value;
- }
-
- var c = this._makeCookieObject(aStrippedHost, aCookie);
- this._hosts[aStrippedHost].cookies.push(c);
- },
-
- _makeCookieObject: function (aStrippedHost, aCookie)
- {
- var host = aCookie.host;
- var formattedHost = host.charAt(0) == "." ? host.substring(1, host.length) : host;
- var c = { name : aCookie.name,
- value : aCookie.value,
- isDomain : aCookie.isDomain,
- host : aCookie.host,
- rawHost : aStrippedHost,
- path : aCookie.path,
- isSecure : aCookie.isSecure,
- expires : aCookie.expires,
- level : 1,
- container : false };
- return c;
- },
-
- _loadCookies: function ()
- {
- var e = this._cm.enumerator;
- var hostCount = { value: 0 };
- this._hosts = {};
- this._hostOrder = [];
- while (e.hasMoreElements()) {
- var cookie = e.getNext();
- if (cookie && cookie instanceof Components.interfaces.nsICookie) {
- var strippedHost = this._makeStrippedHost(cookie.host);
- this._addCookie(strippedHost, cookie, hostCount);
- }
- else
- break;
- }
- this._view._rowCount = hostCount.value;
- },
-
- formatExpiresString: function (aExpires)
- {
- if (aExpires) {
- var date = new Date(1000 * aExpires);
- return this._ds.FormatDateTime("", this._ds.dateFormatLong,
- this._ds.timeFormatSeconds,
- date.getFullYear(),
- date.getMonth() + 1,
- date.getDate(),
- date.getHours(),
- date.getMinutes(),
- date.getSeconds());
- }
-
- // Due to change in chrome://browser/locale/preferences/preferences.properties
- // from FF 3.5 to 3.6, AtEndOfSession in <= 3.5 is expireAtEndOfSession in 3.6
- var endOfsession = null;
-
- try
- {
- endOfSession = this._bundle.getString("expireAtEndOfSession");
- }
- catch(e)
- {
- endOfSession = this._bundle.getString("AtEndOfSession");
- }
-
- return endOfSession;
- },
-
- _updateCookieData: function (aItem)
- {
- var seln = this._view.selection;
- var ids = ["name", "value", "host", "path", "isSecure", "expires"];
- var properties;
-
- if (aItem && !aItem.container && seln.count > 0) {
- properties = { name: aItem.name, value: aItem.value, host: aItem.host,
- path: aItem.path, expires: this.formatExpiresString(aItem.expires),
- isDomain: aItem.isDomain ? this._bundle.getString("domainColon")
- : this._bundle.getString("hostColon"),
- isSecure: aItem.isSecure ? this._bundle.getString("forSecureOnly")
- : this._bundle.getString("forAnyConnection") };
- for (var i = 0; i < ids.length; ++i)
- document.getElementById(ids[i]).disabled = false;
- }
- else {
- var noneSelected = this._bundle.getString("noCookieSelected");
- properties = { name: noneSelected, value: noneSelected, host: noneSelected,
- path: noneSelected, expires: noneSelected,
- isSecure: noneSelected };
- for (i = 0; i < ids.length; ++i)
- document.getElementById(ids[i]).disabled = true;
- }
- for (var property in properties)
- document.getElementById(property).value = properties[property];
- },
-
- onCookieSelected: function ()
- {
- var properties, item;
- var seln = this._tree.view.selection;
- if (!this._view._filtered)
- item = this._view._getItemAtIndex(seln.currentIndex);
- else
- item = this._view._filterSet[seln.currentIndex];
-
- this._updateCookieData(item);
-
- var rangeCount = seln.getRangeCount();
- var selectedCookieCount = 0;
- for (var i = 0; i < rangeCount; ++i) {
- var min = {}; var max = {};
- seln.getRangeAt(i, min, max);
- for (var j = min.value; j <= max.value; ++j) {
- item = this._view._getItemAtIndex(j);
- if (!item) continue;
- if (item.container && !item.open)
- selectedCookieCount += item.cookies.length;
- else if (!item.container)
- ++selectedCookieCount;
- }
- }
- var item = this._view._getItemAtIndex(seln.currentIndex);
- if (item && seln.count == 1 && item.container && item.open)
- selectedCookieCount += 2;
-
- var stringKey = selectedCookieCount == 1 ? "removeCookie" : "removeCookies";
- document.getElementById("removeCookie").label = this._bundle.getString(stringKey);
-
- document.getElementById("removeAllCookies").disabled = this._view._filtered;
- document.getElementById("removeCookie").disabled = !(seln.count > 0);
- },
-
- deleteCookie: function ()
- {
-//@line 651 "/e/fx19rel/WINNT_5.2_Depend/mozilla/browser/components/preferences/cookies.js"
- var seln = this._view.selection;
- var tbo = this._tree.treeBoxObject;
-
- if (seln.count < 1) return;
-
- var nextSelected = 0;
- var rowCountImpact = 0;
- var deleteItems = [];
- if (!this._view._filtered) {
- var ci = seln.currentIndex;
- nextSelected = ci;
- var invalidateRow = -1;
- var item = this._view._getItemAtIndex(ci);
- if (item.container) {
- rowCountImpact -= (item.open ? item.cookies.length : 0) + 1;
- deleteItems = deleteItems.concat(item.cookies);
- if (!this._view.hasNextSibling(-1, ci))
- --nextSelected;
- this._view._removeItemAtIndex(ci);
- }
- else {
- var parent = this._view._getItemAtIndex(item.parentIndex);
- --rowCountImpact;
- if (parent.cookies.length == 1) {
- --rowCountImpact;
- deleteItems.push(item);
- if (!this._view.hasNextSibling(-1, ci))
- --nextSelected;
- if (!this._view.hasNextSibling(-1, item.parentIndex))
- --nextSelected;
- this._view._removeItemAtIndex(item.parentIndex);
- invalidateRow = item.parentIndex;
- }
- else {
- deleteItems.push(item);
- if (!this._view.hasNextSibling(-1, ci))
- --nextSelected;
- this._view._removeItemAtIndex(ci);
- }
- }
- this._view._rowCount += rowCountImpact;
- tbo.rowCountChanged(ci, rowCountImpact);
- if (invalidateRow != -1)
- tbo.invalidateRow(invalidateRow);
- }
- else {
- var rangeCount = seln.getRangeCount();
- for (var i = 0; i < rangeCount; ++i) {
- var min = {}; var max = {};
- seln.getRangeAt(i, min, max);
- nextSelected = min.value;
- for (var j = min.value; j <= max.value; ++j) {
- deleteItems.push(this._view._getItemAtIndex(j));
- if (!this._view.hasNextSibling(-1, max.value))
- --nextSelected;
- }
- var delta = max.value - min.value + 1;
- this._view._removeItemAtIndex(min.value, delta);
- rowCountImpact = -1 * delta;
- this._view._rowCount += rowCountImpact;
- tbo.rowCountChanged(min.value, rowCountImpact);
- }
- }
-
- var psvc = Components.classes["@mozilla.org/preferences-service;1"]
- .getService(Components.interfaces.nsIPrefBranch);
- var blockFutureCookies = false;
- if (psvc.prefHasUserValue("network.cookie.blockFutureCookies"))
- blockFutureCookies = psvc.getBoolPref("network.cookie.blockFutureCookies");
- for (i = 0; i < deleteItems.length; ++i) {
- var item = deleteItems[i];
- this._cm.remove(item.host, item.name, item.path, blockFutureCookies);
- }
-
- if (nextSelected < 0)
- seln.clearSelection();
- else {
- seln.select(nextSelected);
- this._tree.focus();
- }
- },
-
- deleteAllCookies: function ()
- {
- this._cm.removeAll();
- this._tree.focus();
- },
-
- onCookieKeyPress: function (aEvent)
- {
- if (aEvent.keyCode == 46)
- this.deleteCookie();
- },
-
- _lastSortProperty : "",
- _lastSortAscending: false,
- sort: function (aProperty)
- {
- var ascending = (aProperty == this._lastSortProperty) ? !this._lastSortAscending : true;
- // Sort the Non-Filtered Host Collections
- if (aProperty == "rawHost") {
- function sortByHost(a, b)
- {
- return a.toLowerCase().localeCompare(b.toLowerCase());
- }
- this._hostOrder.sort(sortByHost);
- if (!ascending)
- this._hostOrder.reverse();
- }
-
- function sortByProperty(a, b)
- {
- return a[aProperty].toLowerCase().localeCompare(b[aProperty].toLowerCase());
- }
- for (var host in this._hosts) {
- var cookies = this._hosts[host].cookies;
- cookies.sort(sortByProperty);
- if (!ascending)
- cookies.reverse();
- }
- // Sort the Filtered List, if in Filtered mode
- if (this._view._filtered) {
- this._view._filterSet.sort(sortByProperty);
- if (!ascending)
- this._view._filterSet.reverse();
- }
-
- this._view._invalidateCache(0);
- this._view.selection.clearSelection();
- this._view.selection.select(0);
- this._tree.treeBoxObject.invalidate();
- this._tree.treeBoxObject.ensureRowIsVisible(0);
-
- this._lastSortAscending = ascending;
- this._lastSortProperty = aProperty;
- },
-
- clearFilter: function ()
- {
- // Revert to single-select in the tree
- this._tree.setAttribute("seltype", "single");
-
- // Clear the Filter and the Tree Display
- document.getElementById("filter").value = "";
- this._view._filtered = false;
- this._view._rowCount = 0;
- this._tree.treeBoxObject.rowCountChanged(0, -this._view._filterSet.length);
- this._view._filterSet = [];
-
- // Just reload the list to make sure deletions are respected
- this._loadCookies();
- this._tree.treeBoxObject.view = this._view;
-
- // Restore sort order
- var sortby = this._lastSortProperty;
- if (sortby == "") {
- this._lastSortAscending = false;
- this.sort("rawHost");
- }
- else {
- this._lastSortAscending = !this._lastSortAscending;
- this.sort(sortby);
- }
-
- // Restore open state
- for (var i = 0; i < this._openIndices.length; ++i)
- this._view.toggleOpenState(this._openIndices[i]);
- this._openIndices = [];
-
- // Restore selection
- this._view.selection.clearSelection();
- for (i = 0; i < this._lastSelectedRanges.length; ++i) {
- var range = this._lastSelectedRanges[i];
- this._view.selection.rangedSelect(range.min, range.max, true);
- }
- this._lastSelectedRanges = [];
-
- document.getElementById("cookiesIntro").value = this._bundle.getString("cookiesAll");
- document.getElementById("clearFilter").disabled = true;
- document.getElementById("filter").focus();
- },
-
- _cookieMatchesFilter: function (aCookie)
- {
- return aCookie.rawHost.indexOf(this._view._filterValue) != -1 ||
- aCookie.name.indexOf(this._view._filterValue) != -1 ||
- aCookie.value.indexOf(this._view._filterValue) != -1;
- },
-
- _cookieHostMatchesFilter: function (aCookie)
- {
- return aCookie.rawHost.indexOf(this._view._filterValue) != -1;
- },
-
- _filterCookies: function (aFilterValue)
- {
- this._view._filterValue = aFilterValue;
- var cookies = [];
- for (var i = 0; i < gSiteCookiesWindow._hostOrder.length; ++i) { //var host in gSiteCookiesWindow._hosts) {
- var currHost = gSiteCookiesWindow._hosts[gSiteCookiesWindow._hostOrder[i]]; // gSiteCookiesWindow._hosts[host];
- if (!currHost) continue;
- for (var j = 0; j < currHost.cookies.length; ++j) {
- var cookie = currHost.cookies[j];
- // Change to only match on host
- if (this._cookieHostMatchesFilter(cookie))
- cookies.push(cookie);
- }
- }
- return cookies;
- },
-
- _lastSelectedRanges: [],
- _openIndices: [],
- _saveState: function ()
- {
- // Save selection
- var seln = this._view.selection;
- this._lastSelectedRanges = [];
- var rangeCount = seln.getRangeCount();
- for (var i = 0; i < rangeCount; ++i) {
- var min = {}; var max = {};
- seln.getRangeAt(i, min, max);
- this._lastSelectedRanges.push({ min: min.value, max: max.value });
- }
-
- // Save open states
- this._openIndices = [];
- for (i = 0; i < this._view.rowCount; ++i) {
- var item = this._view._getItemAtIndex(i);
- if (item && item.container && item.open)
- this._openIndices.push(i);
- }
- },
-
- _filterTimeout: -1,
- onFilterInput: function ()
- {
- if (this._filterTimeout != -1)
- clearTimeout(this._filterTimeout);
-
- function filterCookies()
- {
- var filter = document.getElementById("filter").value;
- if (filter == "") {
- gSiteCookiesWindow.clearFilter();
- return;
- }
- var view = gSiteCookiesWindow._view;
- view._filterSet = gSiteCookiesWindow._filterCookies(filter);
- if (!view._filtered) {
- // Save Display Info for the Non-Filtered mode when we first
- // enter Filtered mode.
- gSiteCookiesWindow._saveState();
- view._filtered = true;
- }
- // Move to multi-select in the tree
- gSiteCookiesWindow._tree.setAttribute("seltype", "multiple");
-
- // Clear the display
- var oldCount = view._rowCount;
- view._rowCount = 0;
- gSiteCookiesWindow._tree.treeBoxObject.rowCountChanged(0, -oldCount);
- // Set up the filtered display
- view._rowCount = view._filterSet.length;
- gSiteCookiesWindow._tree.treeBoxObject.rowCountChanged(0, view.rowCount);
-
- // if the view is not empty then select the first item
- if (view.rowCount > 0)
- view.selection.select(0);
-
- document.getElementById("cookiesIntro").value = gSiteCookiesWindow._bundleExtra.getString("sitelabel") + ' ' + filter;
- document.getElementById("clearFilter").disabled = false;
- }
- window.filterCookies = filterCookies;
- this._filterTimeout = setTimeout("filterCookies();", 500);
- },
-
- onFilterKeyPress: function (aEvent)
- {
- var filter = document.getElementById("filter").value;
- if (aEvent.keyCode == 27 && filter != "") // ESC key
- this.clearFilter();
- },
-
- focusFilterBox: function ()
- {
- var filter = document.getElementById("filter");
- filter.focus();
- filter.select();
- },
-
- setFilter: function (aFilterString)
- {
- document.getElementById("filter").value = aFilterString;
- this.onFilterInput();
- }
-};
-
diff --git a/chrome/cookiemonster.jar!/content/options.xul b/chrome/cookiemonster.jar!/content/options.xul
deleted file mode 100644
index fe81e6a..0000000
--- a/chrome/cookiemonster.jar!/content/options.xul
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<!DOCTYPE window SYSTEM "chrome://cookiemonster/locale/options.dtd">
-
-<prefwindow id="cookiemonster-prefs"
- title="&options_window_title;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <prefpane id="cookiemonster-options" label="&options;"
- onpaneload="if (document.getElementById('pref-cookiebehavior').value == 1) {document.getElementById('check-thirdparty').checked = true;} else {document.getElementById('check-thirdparty').checked = false;} if (document.getElementById('pref-cookiebehavior').value == 2) {document.getElementById('check-denybydefault').checked = true; document.getElementById('check-thirdparty').disabled = true;} false;">
-
- <command id="cmd_cookiebehavior" oncommand="if(document.getElementById('check-denybydefault').checked) {document.getElementById('pref-cookiebehavior').value='2'; document.getElementById('check-thirdparty').disabled=true;} else if (document.getElementById('check-thirdparty').checked) {document.getElementById('pref-cookiebehavior').value='1';} else {document.getElementById('pref-cookiebehavior').value='0'; document.getElementById('check-thirdparty').disabled=false;} false;"/>
-
- <preferences>
- <preference id="pref-cookiebehavior" name="network.cookie.cookieBehavior" type="int"
- onchange="if (value == 2) {document.getElementById('check-denybydefault').checked = true;} else {document.getElementById('check-denybydefault').checked = false;} if (value == 1) {document.getElementById('check-thirdparty').checked = true;} else {document.getElementById('check-thirdparty').checked = false;} false;"/>
- <preference id="pref-secondlevelurl" name="extensions.cookiemonster.secondlevelurl" type="bool"/>
- <preference id="pref-reloadonpermissionchange" name="extensions.cookiemonster.reloadonpermissionchange" type="bool"/>
- <preference id="pref-enablecontextmenu" name="extensions.cookiemonster.enablecontextmenu" type="bool"/>
- <preference id="pref-deletecookiesondeny" name="extensions.cookiemonster.deletecookiesondeny" type="bool"/>
- <preference id="pref-enableglobalcookieoverride" name="extensions.cookiemonster.enableglobalcookieoverride" type="bool"/>
- <preference id="pref-disabledeletecookieconfirm" name="extensions.cookiemonster.disabledeletecookieconfirm" type="bool"/>
- <preference id="pref-originaldefaulticon" name="extensions.cookiemonster.originaldefaulticon" type="bool"/>
- </preferences>
- <vbox>
- <checkbox id="check-denybydefault" label="&denyCookiesDefault;" command="cmd_cookiebehavior"/>
- <checkbox id="check-thirdparty" label="&thirdPartyCookies;" command="cmd_cookiebehavior"/>
- <checkbox label="&secondlevel;" preference="pref-secondlevelurl"/>
- <checkbox label="&reloadonpermissionchange;" preference="pref-reloadonpermissionchange"/>
- <checkbox label="&enablecontextmenu;" preference="pref-enablecontextmenu"/>
- <checkbox label="&deletecookies;" preference="pref-deletecookiesondeny"/>
- <checkbox label="&enableglobalcookies;" preference="pref-enableglobalcookieoverride"/>
- <checkbox label="&disabledeletecookieconfirm;" preference="pref-disabledeletecookieconfirm"/>
- <checkbox label="&originaldefaulticon;" preference="pref-originaldefaulticon"/>
- </vbox>
- </prefpane>
- <!-- <prefpane id="cookiemonster-test" label="OverRide">
- <label class="header" value="Test OverRide Panel" />
- </prefpane> -->
-</prefwindow>
\ No newline at end of file
diff --git a/chrome/cookiemonster.jar!/content/overlay.js b/chrome/cookiemonster.jar!/content/overlay.js
deleted file mode 100644
index cbb5f5b..0000000
--- a/chrome/cookiemonster.jar!/content/overlay.js
+++ /dev/null
@@ -1,178 +0,0 @@
-var ShowCookieExceptions =
-{
- onLoad: function()
- {
- // initialization code
- this.initialized = true;
- },
-
- onMenuItemCommand: function(evt)
- {
- var bundlePreferences = document.getElementById("cookie-preferences");
- var windowAddress = "chrome://browser/content/preferences/permissions.xul";
- var windowName = "cookieMonster_ShowExceptions";
- var params =
- {
- blockVisible : true,
- sessionVisible : true,
- allowVisible : true,
- prefilledHost : "",
- permissionType : "cookie",
- windowTitle : bundlePreferences.getString("cookiepermissionstitle"),
- introText : bundlePreferences.getString("cookiepermissionstext")
- };
-
- if (evt.target.id == 'show-cookies' || evt.target.id == 'show-cookies-site')
- {
- //windowAddress = "chrome://browser/content/preferences/cookies.xul";
- windowAddress = "chrome://cookiemonster/content/siteCookies.xul";
- windowName = "cookieMonster_ShowCookies";
- params = {filterString : "", showSearch: true};
-
- if (evt.target.id == 'show-cookies-site')
- {
- //windowAddress = "chrome://cookiemonster/content/siteCookies.xul";
- var currentDomain = document.getElementById(evt.target.id);
- params = {filterString : currentDomain.getAttribute("name"), showSearch: false};
- }
- }
-
- var cookieWindow = window.openDialog(windowAddress, windowName, "chrome=yes,close=yes", params);
- }
-
-};
-
-var ShowOverrideGlobal =
-{
- // Callback method for overrideGlobal window
- // to add, delete or delete all URI hosts
- // from preference list
- overrideListChange: function(aHost, aListType)
- {
- var domainType = cookieMonster.extGetCurrentDomainType();
-
- //alert("Callback Host: " + aHost + " ListType: " + aListType);
-
- switch (aListType)
- {
- case 0: // Add
- cookieMonster_CookieInfo.addOverrideGlobal(aHost, domainType);
- break;
- case 1: // Delete
- cookieMonster_CookieInfo.removeOverrideGlobal(aHost, domainType);
- break;
- case 2: // Delete All and reload page
- cookieMonster_CookieInfo.removeAllOverrideGlobal();
- break;
- default:
- break;
- }
-
- // If aHost is the current host or if remove all, reload page
- if ((aHost != null) && (cookieMonster.extGetCurrentHost() == aHost))
- {
- cookieMonster.extReloadCurrentPage();
- }
- },
-
- onMenuItemCommand: function(evt)
- {
- var bundlePreferences = document.getElementById("cookie-preferences");
- var windowAddress = "chrome://cookiemonster/content/overrideGlobal.xul";
- var windowName = "cookieMonster_ShowOverride";
- var params =
- {
- prefilledHost : cookieMonster.extGetCurrentHost(),
- //aURI : cookieMonster.extGetCurrentURI(),
- //windowTitle : bundlePreferences.getString("cookiepermissionstitle"),
- //introText : bundlePreferences.getString("cookiepermissionstext"),
- globalOverrideList: cookieMonster_CookieInfo.getGlobalOverrideList()
- };
-
- var cookieWindow = window.openDialog(windowAddress, windowName, "modal=yes,chrome=yes,close=yes", params, this.overrideListChange);
- }
-};
-
-var DeleteCookies =
-{
- onMenuItemCommand: function(evt)
- {
- var menuBundle = document.getElementById("cookie-menu-labels");
- var currentHost = null;
- var result = true;
-
- if (evt.target.id == 'delete-cookies-site')
- {
- currentHost = cookieMonster.extGetCurrentHost();
-
- // Display confirmation dialog, unless turned off in Options
- if (!cookieMonster_nsPreferences.getBoolPref("disabledeletecookieconfirm", false))
- {
- var prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
- .getService(Components.interfaces.nsIPromptService);
- result = prompts.confirm(null, menuBundle.getString("confirmtitle"),
- menuBundle.getFormattedString("confirmtext", [currentHost]));
- }
-
- if (result)
- {
- cookieMonster_CookieInfo.deleteHostCookies(currentHost, true);
- }
-
- //alert("Cookies Deleted for " + currentHost);
- }
- }
-};
-
-var ShowCookieMenu =
-{
- onMenuItemCommand: function(evt)
- {
- if (evt.target.id == 'contentAreaContextMenu')
- {
- // Make cookie monster menu item visible in context menu and add
- // the cookie-access menu popup
- var menuItem = document.getElementById("cookiemonster-context");
- var cookieMenu = document.getElementById("cookie-access");
- var statusBar = document.getElementById("status-bar");
- var statusBarPanel = document.getElementById("cookiemonster-status");
-
- // Only show the context menu if enablecontextmenu is set to true
- if (cookieMonster_nsPreferences.getBoolPref("enablecontextmenu", false))
- {
- if (evt.type == 'popupshown')
- {
- menuItem.hidden = false;
- menuItem.setAttribute("image", statusBarPanel.getAttribute("src"));
- cookieMenu.setAttribute("position", "end_before");
- menuItem.appendChild(cookieMenu);
- }
- else if (evt.type == 'popuphidden')
- {
- menuItem.hidden = true;
- statusBar.appendChild(cookieMenu);
- cookieMenu.setAttribute("position", "before_end");
- }
- }
- }
- },
-
- onKeyboardShortcut: function(evt)
- {
- if (evt.target.id == 'cookiemonster-key')
- {
- // Check if cookie-access menu popup is showing and hide
- var cookieMenu = document.getElementById("cookie-access");
-
- if (cookieMenu.state == 'open')
- {
- cookieMenu.hidePopup();
- }
-
- cookieMenu.openPopup(null, "", 0, 0, false, false);
- }
- }
-}
-
-//window.addEventListener("load", function(e) { ShowCookieExceptions.onLoad(e); },
-//false);
diff --git a/chrome/cookiemonster.jar!/content/overlay.xul b/chrome/cookiemonster.jar!/content/overlay.xul
deleted file mode 100644
index 29ba348..0000000
--- a/chrome/cookiemonster.jar!/content/overlay.xul
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://cookiemonster/skin/overlay.css" type="text/css"?>
-<!DOCTYPE overlay SYSTEM "chrome://cookiemonster/locale/overlay.dtd">
-
-<overlay id="cookieMonster-overlay"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script src="overlay.js"/>
- <script src="cookieUtils.js"/>
- <script src="cookiePreferences.js"/>
- <script src="cookieMonster.js"/>
- <script src="cookieInfo.js"/>
- <script src="cookieTempAllow.js"/>
- <script src="cookieRequest.js"/>
- <stringbundleset id="stringbundleset">
- <stringbundle id="cookie-preferences" src="chrome://browser/locale/preferences/preferences.properties"/>
- <stringbundle id="cookie-menu-labels" src="chrome://cookiemonster/locale/cookieMonster.properties"/>
- </stringbundleset>
- <!-- Status Bar -->
- <statusbar id="status-bar">
- <statusbarpanel id="cookiemonster-status" label="&cookiemonster;" popup=""
- src="chrome://cookiemonster/skin/face-monkey-small.png" tooltiptext="Click here to see if this site can leave you cookies" class="statusbarpanel-iconic">
- </statusbarpanel>
- <popupset>
- <!-- Cookie Access Popup Menu from overlay -->
- <menupopup id="cookie-access" position="before_end" name="hidden" onpopupshowing="this.setAttribute('name', 'visible');" onpopuphidden="this.setAttribute('name', 'hidden');">
- <menu id="cookie-options-menu" label="&options;">
- <menupopup id="current-options">
- <menuitem id="option-second-level" label="&secondlevel;" type="checkbox"/>
- <menuitem id="show-global-override" label="&globaloverride;" disabled="true"
- oncommand="ShowOverrideGlobal.onMenuItemCommand(event);"/>
- <!-- <menu id="current-options-block-menu" label="&globalpermissions;">
- <menupopup id="current-options-block">
- <menuitem id="option-block-globally" label="&blockglobal;" type="checkbox"/>
- <menuitem id="option-block-thirdparty" label="&blockthirdparty;" type="checkbox"/>
- </menupopup>
- </menu> -->
- </menupopup>
- </menu>
- <menu id="cookie-view-menu" label="&viewcookies;">
- <menupopup id="view-cookies">
- <menuitem id="show-cookies-site" label="&showcookies;" name=""
- oncommand="ShowCookieExceptions.onMenuItemCommand(event);"/>
- <menuitem id="show-cookies" label="&showallcookies;"
- oncommand="ShowCookieExceptions.onMenuItemCommand(event);"/>
- <menuseparator/>
- <menuitem id="show-exceptions" label="&showcookieexceptions;"
- oncommand="ShowCookieExceptions.onMenuItemCommand(event);"/>
- <menuseparator/>
- <menuitem id="delete-cookies-site" label="&deletecookies;" name=""
- oncommand="DeleteCookies.onMenuItemCommand(event);"/>
- </menupopup>
- </menu>
- <menu id="cookie-thirdparty-menu" label="&thirdpartycookies;">
- <menupopup id="cookie-thirdparty-permissions">
- <menuitem id="cookie-thirdparty-default-none" label="&thirdpartydefault;" disabled="false" class="menuitem-iconic"/>
- </menupopup>
- </menu>
- <menu id="cookie-permissions-menu" label="¤tpermissions;">
- <menupopup id="current-permissions">
- <menuitem id="permissions-top" label="&sitepermissions;" class="menuitem-iconic"/>
- <menuitem id="permissions-second" label="&domainpermissions;" class="menuitem-iconic"/>
- <menuseparator/>
- <menuitem id="permissions-result" label="&permissionsresult;" class="menuitem-iconic"/>
- <!-- <menuseparator/>
- <menuitem id="option-override-global" label="&globaloverride;" type="checkbox"/> -->
- </menupopup>
- </menu>
- <menu id="cookie-access-menu" label="&alternatecookieaccess;">
- <menupopup id="cookie-access-alternate">
- <menuitem id="cookie-access-second-temp" value="-1" label="&tempallow;" name="cookie-two" class="menuitem-iconic"/>
- <menuseparator/>
- <menuitem id="cookie-access-second-allow" value="1" label="&allow;" name="cookie-two" class="menuitem-iconic"/>
- <menuitem id="cookie-access-second-deny" value="2" label="&deny;" name="cookie-two" class="menuitem-iconic"/>
- <menuitem id="cookie-access-second-session" value="8" label="&session;" name="cookie-two" class="menuitem-iconic"/>
- </menupopup>
- </menu>
- <menuseparator/>
- <menuitem id="revoke-temp-permissions" label="&revoketempallow;" class="menuitem-iconic"
- oncommand="cookieMonster.extResetTempCookies();" />
- <!-- <menuseparator/>
- <menuitem id="label-cookie-access" class="header" label="&cookieaccess;"/> -->
- <menuseparator/>
- <menuseparator/>
- <menuitem id="cookie-access-default-default" value="0" label="&default;" name="current-access" class="menuitem-iconic"/>
- <menuseparator id="temp-after-this"/>
- <menuitem id="cookie-access-top-temp" value="-1" label="&tempallow;" name="cookie-top" class="menuitem-iconic"/>
- <menuseparator id="allow-after-this"/>
- <menuitem id="cookie-access-top-allow" value="1" label="&allow;" name="cookie-top" class="menuitem-iconic"/>
- <menuitem id="cookie-access-top-deny" value="2" label="&deny;" name="cookie-top" class="menuitem-iconic"/>
- <menuitem id="cookie-access-top-session" value="8" label="&session;" name="cookie-top" class="menuitem-iconic"/>
- </menupopup>
-
- <tooltip id="cookie-results" orient="vertical" position="before_end" class="cookie-status-tooltip"
- onpopupshowing="cookieMonster.extSetSiteRequestedSetCookie(event); return (document.getElementById('cookie-access').getAttribute('name') == 'hidden');">
- <label id="cookie-status-header" value="¤tpermissions;"/>
- <vbox>
- <groupbox id="cookie-group-site" flex="1">
- <caption id="cookie-caption-site" label="&sitepermissions;" image="chrome://cookiemonster/skin/face-monkey-small.png"/>
- <description id="cookie-description-site" value="&default;"/>
- </groupbox>
- <groupbox id="cookie-group-domain" flex="1">
- <caption id="cookie-caption-domain" label="&domainpermissions;" image="chrome://cookiemonster/skin/face-monkey-small.png"/>
- <description id="cookie-description-domain" value="&default;"/>
- </groupbox>
- <separator class="groove"/>
- <groupbox id="cookie-group-result" flex="1">
- <caption id="cookie-caption-result" label="&permissionsresult;" image="chrome://cookiemonster/skin/face-monkey-small.png"/>
- <description id="cookie-description-result" value="&default;"/>
- </groupbox>
- <separator class="groove"/>
- <groupbox id="cookie-group-attempt" flex="1">
- <description id="cookie-description-attempt" value="&default;"/>
- </groupbox>
- </vbox>
- </tooltip>
- </popupset>
- </statusbar>
-
- <!-- Firefox Context Menu -->
- <popup id="contentAreaContextMenu" onpopupshown="ShowCookieMenu.onMenuItemCommand(event);"
- onpopuphidden="ShowCookieMenu.onMenuItemCommand(event);">
- <menu id="cookiemonster-context" label="&cookiemonster;" hidden="true" class="menu-iconic">
- </menu>
- </popup>
-
- <!-- Shortcut Keys to Menu -->
- <keyset>
- <key id="cookiemonster-key" modifiers="control shift" key="M" oncommand="ShowCookieMenu.onKeyboardShortcut(event);"/>
- </keyset>
-
-</overlay>
diff --git a/chrome/cookiemonster.jar!/content/overrideGlobal.js b/chrome/cookiemonster.jar!/content/overrideGlobal.js
deleted file mode 100644
index 08c67c5..0000000
--- a/chrome/cookiemonster.jar!/content/overrideGlobal.js
+++ /dev/null
@@ -1,172 +0,0 @@
-// overrideGlobal.js
-// Tony Schilling
-// Created: 11/12/2008
-// Last Updated: 11/13/2008
-
-// Constants
-const CM_OG_ADD = 0;
-const CM_OG_REMOVE = 1;
-const CM_OG_REMOVE_ALL = 2;
-
-var gOverrideGlobalWindow = {
- _bundle : null,
- _currentHost: null,
- _list : null,
- _listChanged: null,
-
- onLoad: function ()
- {
- this._bundle = document.getElementById("bundlePreferences");
- var params = window.arguments[0];
- this._listChanged = window.arguments[1];
- this.init(params);
- },
-
- init: function (aParams)
- {
- // Load override list array and check
- // if prefilled host is already in list
- var urlField = document.getElementById("url");
- var addUrlButton = document.getElementById("btnAddUrl");
- var addUrlLabel = document.getElementById("urlLabel");
- var urlExistsLabel = document.getElementById("urlLabelExists");
- var closeButton = document.getElementById("btnClose");
-
- this._currentHost = aParams.prefilledHost;
- urlField.value = this._currentHost;
-
- this._loadOverrideList(aParams.globalOverrideList);
-
- if (aParams.globalOverrideList.indexOf(aParams.prefilledHost) > -1)
- {
- addUrlButton.disabled = true;
- addUrlLabel.hidden = true;
- urlExistsLabel.hidden = false;
- closeButton.focus();
- }
- else
- {
- addUrlButton.focus();
- }
- },
-
- // Public Methods
- addOverrideGlobalURI: function ()
- {
- var urlField = document.getElementById("url");
- this._list.appendItem(urlField.value);
- this._listChanged(urlField.value, CM_OG_ADD);
-
- // Determine what buttons should de enabled/disabled
- this._updateUI(urlField.value, CM_OG_ADD);
- },
-
- // Private Methods
- _loadOverrideList: function (aList)
- {
- this._list = document.getElementById("overrideList");
-
- // Load array values into list element
- aList.forEach(this._list.appendItem, this._list);
- },
-
- _updateUI: function (aItem, aOperation)
- {
- var addUrlButton = document.getElementById("btnAddUrl");
- var addUrlLabel = document.getElementById("urlLabel");
- var urlExistsLabel = document.getElementById("urlLabelExists");
- var closeButton = document.getElementById("btnClose");
-
- if ((aItem != null) && (aItem == this._currentHost))
- {
- if (aOperation == CM_OG_ADD)
- {
- addUrlButton.disabled = true;
- addUrlLabel.hidden = true;
- urlExistsLabel.hidden = false;
- }
- else
- {
- addUrlButton.disabled = false;
- addUrlLabel.hidden = false;
- urlExistsLabel.hidden = true;
- }
- }
- else if (aOperation == CM_OG_REMOVE_ALL)
- {
- addUrlButton.disabled = false;
- addUrlLabel.hidden = false;
- urlExistsLabel.hidden = true;
- }
-
- this.onListItemSelected();
- closeButton.focus();
- },
-
- // Events
- onListItemSelected: function ()
- {
- var hasSelection = this._list.selectedCount > 0;
- var hasRows = this._list.getRowCount() > 0;
- document.getElementById("removePermission").disabled = !hasRows || !hasSelection;
- document.getElementById("removeAllPermissions").disabled = !hasRows;
- },
-
- onListItemDeleted: function ()
- {
- var selectedItem = this._list.selectedItem;
- var hostInList = null;
-
- // If an item is selected, remove from list and
- // remove from globalOverrideList
- if (selectedItem != null)
- {
- if (selectedItem.label == this._currentHost)
- {
- hostInList = this._currentHost;
- }
- this._listChanged(selectedItem.label, CM_OG_REMOVE);
- this._list.removeItemAt(this._list.selectedIndex);
- }
-
- // Determine what buttons should de enabled/disabled
- this._updateUI(hostInList, CM_OG_REMOVE);
- },
-
- onAllListItemsDeleted: function ()
- {
- var hostInList = null;
- var numberRows = this._list.getRowCount();
-
- // Clear list and globalOverrideList and
- // if current host is in list, pass back
- // in _listChanged
- while (this._list.getRowCount() > 0)
- {
- if (this._list.getItemAtIndex(0).label == this._currentHost)
- {
- hostInList = this._currentHost;
- }
-
- this._list.removeItemAt(0);
- }
-
- this._listChanged(hostInList, CM_OG_REMOVE_ALL);
-
- // Determine what buttons should de enabled/disabled
- this._updateUI(hostInList, CM_OG_REMOVE_ALL);
-
- //document.getElementById("removePermission").disabled = true;
- //document.getElementById("removeAllPermissions").disabled = true;
- },
-
- onListKeyPress: function (aEvent)
- {
- if (aEvent.keyCode == 46)
- this.onListItemDeleted();
- },
-
- uninit: function ()
- {
- }
-}
\ No newline at end of file
diff --git a/chrome/cookiemonster.jar!/content/overrideGlobal.xul b/chrome/cookiemonster.jar!/content/overrideGlobal.xul
deleted file mode 100644
index 00fe033..0000000
--- a/chrome/cookiemonster.jar!/content/overrideGlobal.xul
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0"?>
-
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css" type="text/css"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://cookiemonster/locale/overrideGlobal.dtd" >
-<window id="OverrideGlobalDialog" class="windowDialog"
- windowtype="Browser:Permissions"
- title="&window.title;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- style="width: &window.width;;"
- onload="gOverrideGlobalWindow.onLoad();"
- onunload="gOverrideGlobalWindow.uninit();"
- persist="screenX screenY width height">
-
- <script src="overrideGlobal.js"/>
-
- <stringbundle id="bundlePreferences"
- src="chrome://browser/locale/preferences/preferences.properties"/>
-
- <keyset>
- <key key="&windowClose.key;" modifiers="accel" oncommand="window.close();"/>
- </keyset>
-
- <vbox class="contentPane" flex="1">
- <description id="overrideGlobalText" control="url">&overrideglobaltext.label;</description>
- <separator class="thin"/>
- <label id="urlLabel" control="url" value="&address.label;" hidden="false"/>
- <label id="urlLabelExists" class="header" control="url" value="&addressexists.label;" hidden="true"/>
- <hbox align="start">
- <textbox id="url" flex="1" readonly="true"
- oninput="gOverrideGlobalWindow.onHostInput(event.target);"
- onkeypress="gOverrideGlobalWindow.onHostKeyPress(event);"/>
- <button id="btnAddUrl" disabled="false" label="&addurl.label;" accesskey="&addurl.accesskey;"
- oncommand="gOverrideGlobalWindow.addOverrideGlobalURI();"/>
- </hbox>
- <separator class="thin"/>
- <listbox id="overrideList" flex="1" style="height: 18em;"
- onkeypress="gOverrideGlobalWindow.onListKeyPress(event)"
- onselect="gOverrideGlobalWindow.onListItemSelected();">
- </listbox>
- </vbox>
- <hbox align="end">
- <hbox class="actionButtons" flex="1">
- <button id="removePermission" disabled="true"
- accesskey="&removepermission.accesskey;"
- icon="remove" label="&removepermission.label;"
- oncommand="gOverrideGlobalWindow.onListItemDeleted();"/>
- <button id="removeAllPermissions"
- icon="clear" label="&removeallpermissions.label;"
- accesskey="&removeallpermissions.accesskey;"
- oncommand="gOverrideGlobalWindow.onAllListItemsDeleted();"/>
- <spacer flex="1"/>
- <button id="btnClose" oncommand="close();" icon="close"
- label="&button.close.label;" accesskey="&button.close.accesskey;"/>
- </hbox>
- <resizer dir="bottomright"/>
- </hbox>
-</window>
diff --git a/chrome/cookiemonster.jar!/content/siteCookies.xul b/chrome/cookiemonster.jar!/content/siteCookies.xul
deleted file mode 100644
index 9e87ec3..0000000
--- a/chrome/cookiemonster.jar!/content/siteCookies.xul
+++ /dev/null
@@ -1,110 +0,0 @@
-<?xml version="1.0"?>
-
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css" type="text/css"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://browser/locale/preferences/cookies.dtd" >
-<window id="SiteCookiesDialog" windowtype="Browser:Cookies"
- class="windowDialog" title="&window.title;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- style="width: &window.width;"
- onload="gSiteCookiesWindow.init();"
- onunload="gSiteCookiesWindow.uninit();"
- persist="screenX screenY width height">
-
- <script src="chrome://browser/content/preferences/permissionsutils.js"/>
- <script src="cookies.js"/>
-
- <stringbundleset id="stringbundleset">
- <stringbundle id="bundlePreferences"
- src="chrome://browser/locale/preferences/preferences.properties"/>
-
- <stringbundle id="site-cookie-labels"
- src="chrome://cookiemonster/locale/siteCookies.properties"/>
- </stringbundleset>
-
- <keyset>
- <key key="&windowClose.key;" modifiers="accel" oncommand="window.close();"/>
- <key key="&focusSearch1.key;" modifiers="accel" oncommand="gSiteCookiesWindow.focusFilterBox();"/>
- <key key="&focusSearch2.key;" modifiers="accel" oncommand="gSiteCookiesWindow.focusFilterBox();"/>
- </keyset>
-
- <vbox flex="1" class="contentPane">
- <hbox id="searchFilter" align="center" hidden="false">
- <label id="searchFilterLabel" accesskey="&filter.accesskey;" control="filter">&filter.label;</label>
- <textbox id="filter" flex="1" oninput="gSiteCookiesWindow.onFilterInput();"
- onkeypress="gSiteCookiesWindow.onFilterKeyPress(event);"/>
- <!-- <button id="clearFilter" icon="clear" label="&clear.label;"
- accesskey="&clear.accesskey;"
- oncommand="gSiteCookiesWindow.clearFilter();" disabled="true"/> -->
- <button id="clearFilter" icon="clear" label="Clear"
- accesskey="l"
- oncommand="gSiteCookiesWindow.clearFilter();" disabled="true"/>
- </hbox>
- <separator class="thin"/>
- <label control="cookiesList" id="cookiesIntro" value="&cookiesonsystem.label;"/>
- <separator class="thin"/>
- <tree id="cookiesList" flex="1" style="height: 10em;"
- onkeypress="gSiteCookiesWindow.onCookieKeyPress(event)"
- onselect="gSiteCookiesWindow.onCookieSelected();"
- hidecolumnpicker="true" seltype="single">
- <treecols>
- <treecol id="domainCol" label="&cookiedomain.label;" flex="2" primary="true"
- class="sortDirectionIndicator" persist="width" onclick="gSiteCookiesWindow.sort('rawHost');" />
- <splitter class="tree-splitter"/>
- <treecol id="nameCol" label="&cookiename.label;" flex="1"
- class="sortDirectionIndicator" persist="width"
- onclick="gSiteCookiesWindow.sort('name');"/>
- </treecols>
- <treechildren id="cookiesChildren"/>
- </tree>
- <hbox id="cookieInfoBox">
- <grid flex="1" id="cookieInfoGrid">
- <columns>
- <column/>
- <column flex="1"/>
- </columns>
- <rows>
- <row align="center">
- <hbox pack="end"><label id="nameLabel" control="name" value="&props.name.label;"/></hbox>
- <textbox id="name" readonly="true" class="plain"/>
- </row>
- <row align="center">
- <hbox pack="end"><label id="valueLabel" control="value" value="&props.value.label;"/></hbox>
- <textbox id="value" readonly="true" class="plain"/>
- </row>
- <row align="center">
- <hbox pack="end"><label id="isDomain" control="host" value="&props.domain.label;"/></hbox>
- <textbox id="host" readonly="true" class="plain"/>
- </row>
- <row align="center">
- <hbox pack="end"><label id="pathLabel" control="path" value="&props.path.label;"/></hbox>
- <textbox id="path" readonly="true" class="plain"/>
- </row>
- <row align="center">
- <hbox pack="end"><label id="isSecureLabel" control="isSecure" value="&props.secure.label;"/></hbox>
- <textbox id="isSecure" readonly="true" class="plain"/>
- </row>
- <row align="center">
- <hbox pack="end"><label id="expiresLabel" control="expires" value="&props.expires.label;"/></hbox>
- <textbox id="expires" readonly="true" class="plain"/>
- </row>
- </rows>
- </grid>
- </hbox>
- </vbox>
- <hbox align="end">
- <hbox class="actionButtons" flex="1">
- <button id="removeCookie" disabled="true" icon="remove"
- label="&button.removecookie.label;" accesskey="&button.removecookie.accesskey;"
- oncommand="gSiteCookiesWindow.deleteCookie();"/>
- <button id="removeAllCookies" disabled="true" icon="clear"
- label="&button.removeallcookies.label;" accesskey="&button.removeallcookies.accesskey;"
- oncommand="gSiteCookiesWindow.deleteAllCookies();"/>
- <spacer flex="1"/>
- <button oncommand="close();" icon="close"
- label="&button.close.label;" accesskey="&button.close.accesskey;"/>
- </hbox>
- <resizer dir="bottomright"/>
- </hbox>
-</window>
diff --git a/chrome/cookiemonster.jar!/locale/de-DE/cookieMonster.dtd b/chrome/cookiemonster.jar!/locale/de-DE/cookieMonster.dtd
deleted file mode 100644
index b9c195d..0000000
--- a/chrome/cookiemonster.jar!/locale/de-DE/cookieMonster.dtd
+++ /dev/null
@@ -1,3 +0,0 @@
-<!ENTITY title.label "Hallo Welt">
-<!ENTITY separate.label "Das ist ein separates Fenster!">
-<!ENTITY close.label "Schließen">
diff --git a/chrome/cookiemonster.jar!/locale/de-DE/cookieMonster.properties b/chrome/cookiemonster.jar!/locale/de-DE/cookieMonster.properties
deleted file mode 100644
index e0ba0df..0000000
--- a/chrome/cookiemonster.jar!/locale/de-DE/cookieMonster.properties
+++ /dev/null
@@ -1,41 +0,0 @@
-#### Cookie Access for Menu
-
-default=Standardautorisierung
-accepted=erlaube
-userprompted=Nutzer aufgefordert
-acceptedsession=Für Sitzung erlaubt
-rejected=verweigert
-originatingsiteonly=Nur Ursprungsseite
-allow=Erlaube Cookies von
-deny=Verweigere Cookies von
-session=Erlaube Sitzungscookies von
-tooltiptext=Cookiezugriff für
-temp=Erlaube Cookies temporär von
-sitepermissions=Seite
-domainpermissions=Domain
-permissionsresult=Folgeverhalten
-permissionsresultfor=Folgeverhalten für
-showcurrentcookies=Cookies anzeigen für
-deletecurrentcookies=Cookies löschen für
-Default=Standard
-Allow=Erlauben
-Session=Sitzung erlauben
-Deny=Blockieren
-Temp=Temporär erlauben
-alternatecookieaccess=Cookieautorisierung
-sitemenulabel=Seitenbezogen
-domainmenulabel=Domainbezogen
-thirdpartyblocked=Cookie von Drittanbieter blockiert
-
-## Labels for Confirmation Dialog
-confirmtitle=Cookies löschen
-confirmtext=Cookies von %S wirklich löschen?
-
-## Labels for Third Party Menu
-thirdpartynone=Keine erkannt
-thirdpartytempallowall=Temporär alle erlauben
-thirdpartytemprevokeall=Hebe alle temporären Berechtigungen auf
-
-## Label for Site Requesting to Set Cookie Indicator
-siteattemptedcookie=Diese Seite möchte Cookie(s) speichern
-sitenotattemptedcookie=Diese Seite möchte keine(n) Cookie(s) speichern
diff --git a/chrome/cookiemonster.jar!/locale/de-DE/options.dtd b/chrome/cookiemonster.jar!/locale/de-DE/options.dtd
deleted file mode 100644
index 652583f..0000000
--- a/chrome/cookiemonster.jar!/locale/de-DE/options.dtd
+++ /dev/null
@@ -1,12 +0,0 @@
-<!ENTITY options_window_title "Cookie Monster Einstellungen">
-<!ENTITY cookiemonster "Hallo Cookies!">
-<!ENTITY options "Einstellungen">
-<!ENTITY secondlevel "2nd Level Domain Namen verwenden">
-<!ENTITY reloadonpermissionchange "Betroffene Seite automatisch bei Änderung der Cookie-Berechtigung neu laden">
-<!ENTITY enablecontextmenu "Kontextmenüeintrag für Cookie Monster anzeigen">
-<!ENTITY deletecookies "Cookies beim Autorisierungswechsel nach verweigert löschen">
-<!ENTITY enableglobalcookies "Überschreiben der globalen Cookieautorisierung aktivieren">
-<!ENTITY thirdPartyCookies "3rd Party Cookies blockieren">
-<!ENTITY denyCookiesDefault "Alle Cookies blockieren">
-<!ENTITY disabledeletecookieconfirm "Bestätigungsdialog beim Löschen von Cookies abschalten">
-<!ENTITY originaldefaulticon "Original Standard Icon verwenden (der Affee)">
diff --git a/chrome/cookiemonster.jar!/locale/de-DE/overlay.dtd b/chrome/cookiemonster.jar!/locale/de-DE/overlay.dtd
deleted file mode 100644
index 8ce2587..0000000
--- a/chrome/cookiemonster.jar!/locale/de-DE/overlay.dtd
+++ /dev/null
@@ -1,26 +0,0 @@
-<!ENTITY helloworld "Hallo Welt!">
-<!ENTITY cookiemonster "Hallo Cookies!">
-<!ENTITY secondlevel "2nd Level Domain Namen verwenden">
-<!ENTITY globalpermissions "Globale Cookie-Einstellungen">
-<!ENTITY blockglobal "Alle Cookies verweigern (Abwählen zum erlauben)">
-<!ENTITY blockthirdparty "Nur 3rd Party Cookies verweigern">
-<!ENTITY globaloverride "Überschreibe globale Cookieautorisierung">
-<!ENTITY showcookieexceptions "Cookie Ausnahmen anzeigen">
-<!ENTITY showcookies "Cookies anzeigen">
-<!ENTITY showallcookies "Cookies anzeigen für alle Seiten">
-<!ENTITY viewcookies "Cookies anzeigen">
-<!ENTITY deletecookies "Cookies löschen">
-<!ENTITY currentpermissions "Aktuelle Cookieautorisierung">
-<!ENTITY alternatecookieaccess "Cookie Zugriff setzen">
-<!ENTITY sitepermissions "Seite:">
-<!ENTITY domainpermissions "Domain:">
-<!ENTITY permissionsresult "Folgeverhalten:">
-<!ENTITY options "Optionen">
-<!ENTITY default "Vorgabe">
-<!ENTITY allow "Erlauben">
-<!ENTITY deny "Verweigern">
-<!ENTITY session "Sitzung">
-<!ENTITY tempallow "Temporär Erlauben">
-<!ENTITY thirdpartycookies "Cookies von Drittanbietern">
-<!ENTITY thirdpartydefault "Keine">
-<!ENTITY revoketempallow "Hebe alle temporären Berechtigungen auf">
diff --git a/chrome/cookiemonster.jar!/locale/de-DE/overrideGlobal.dtd b/chrome/cookiemonster.jar!/locale/de-DE/overrideGlobal.dtd
deleted file mode 100644
index bb5933d..0000000
--- a/chrome/cookiemonster.jar!/locale/de-DE/overrideGlobal.dtd
+++ /dev/null
@@ -1,16 +0,0 @@
-<!ENTITY window.title "Globale Cookieautorisierung überschreiben">
-<!ENTITY window.width "30em">
-
-<!ENTITY overrideglobaltext.label "Globales überschreiben der Cookieautorisierung nur verwenden, wenn seitenspezifische Cookieautorisierung nicht korrekt funktioniert, besonders bei Seiten die von JavaScript navigator.cookieEnabled verwenden um die Cookieautorisierung zu erkennen.">
-<!ENTITY removepermission.label "Seite entfernen">
-<!ENTITY removepermission.accesskey "R">
-<!ENTITY removeallpermissions.label "Alle Seiten entfernen">
-<!ENTITY removeallpermissions.accesskey "e">
-<!ENTITY address.label "URL der Internetseite:">
-<!ENTITY addressexists.label "URL bereits vorhanden:">
-<!ENTITY addurl.label "URL hinzufügen">
-<!ENTITY addurl.accesskey "A">
-<!ENTITY windowClose.key "w">
-
-<!ENTITY button.close.label "Schließen">
-<!ENTITY button.close.accesskey "C">
diff --git a/chrome/cookiemonster.jar!/locale/de-DE/siteCookies.properties b/chrome/cookiemonster.jar!/locale/de-DE/siteCookies.properties
deleted file mode 100644
index 74cc105..0000000
--- a/chrome/cookiemonster.jar!/locale/de-DE/siteCookies.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#### Site Cookie Viewer
-
-sitelabel=Cookies für
-searchbyurl=Nach URL suchen
-clearlabel=Löschen
-clearaccesskey=L
diff --git a/chrome/cookiemonster.jar!/locale/en-US/cookieMonster.dtd b/chrome/cookiemonster.jar!/locale/en-US/cookieMonster.dtd
deleted file mode 100644
index 6db568c..0000000
--- a/chrome/cookiemonster.jar!/locale/en-US/cookieMonster.dtd
+++ /dev/null
@@ -1,3 +0,0 @@
-<!ENTITY title.label "Hello World">
-<!ENTITY separate.label "This is a separate window!">
-<!ENTITY close.label "Close">
diff --git a/chrome/cookiemonster.jar!/locale/en-US/cookieMonster.properties b/chrome/cookiemonster.jar!/locale/en-US/cookieMonster.properties
deleted file mode 100644
index a94ba10..0000000
--- a/chrome/cookiemonster.jar!/locale/en-US/cookieMonster.properties
+++ /dev/null
@@ -1,41 +0,0 @@
-#### Cookie Access for Menu
-
-default=Default Action
-accepted=Accepted
-userprompted=User Prompted
-acceptedsession=Accepted for Session
-rejected=Rejected
-originatingsiteonly=Originating Site Only
-allow=Accept Cookies from
-deny=Reject Cookies from
-session=Accept Session Cookies from
-tooltiptext=Cookie Access for
-temp=Temporarily Allow Cookies from
-sitepermissions=Site
-domainpermissions=Domain
-permissionsresult=Resulting Action
-permissionsresultfor=Resulting Action for
-showcurrentcookies=Show Cookies for
-deletecurrentcookies=Delete Cookies for
-Default=Default
-Allow=Allow
-Session=Allow Session
-Deny=Block
-Temp=Temporarily Allow
-alternatecookieaccess=Cookie Access
-sitemenulabel=Site Level
-domainmenulabel=Domain Level
-thirdpartyblocked=Third Party Blocked
-
-## Labels for Confirmation Dialog
-confirmtitle=Delete Cookies
-confirmtext=Do you really want to delete cookies for %S?
-
-## Labels for Third Party Menu
-thirdpartynone=None Detected
-thirdpartytempallowall=Temporarily Allow All
-thirdpartytemprevokeall=Revoke Temporarily Allow
-
-## Label for Site Requesting to Set Cookie Indicator
-siteattemptedcookie=This site has requested to set cookie(s)
-sitenotattemptedcookie=This site has NOT requested to set cookie(s)
diff --git a/chrome/cookiemonster.jar!/locale/en-US/options.dtd b/chrome/cookiemonster.jar!/locale/en-US/options.dtd
deleted file mode 100644
index 9708311..0000000
--- a/chrome/cookiemonster.jar!/locale/en-US/options.dtd
+++ /dev/null
@@ -1,12 +0,0 @@
-<!ENTITY options_window_title "Cookie Monster Options">
-<!ENTITY cookiemonster "Hello Cookies!">
-<!ENTITY options "Options">
-<!ENTITY secondlevel "Use 2nd Level Domain Names">
-<!ENTITY reloadonpermissionchange "Automatically Reload Affected Page When Cookie Permissions Change">
-<!ENTITY enablecontextmenu "Display Cookie Monster Menu in Context Menu">
-<!ENTITY deletecookies "Delete Cookies When Changing access to Deny">
-<!ENTITY enableglobalcookies "Enable Global Cookie Permissions Override">
-<!ENTITY thirdPartyCookies "Block 3rd Party Cookies">
-<!ENTITY denyCookiesDefault "Block All Cookies">
-<!ENTITY disabledeletecookieconfirm "Disable Confirmation Dialog for Delete Cookies Menu Option">
-<!ENTITY originaldefaulticon "Use Original Default Icon (the Monkey)">
diff --git a/chrome/cookiemonster.jar!/locale/en-US/overlay.dtd b/chrome/cookiemonster.jar!/locale/en-US/overlay.dtd
deleted file mode 100644
index e4b72f3..0000000
--- a/chrome/cookiemonster.jar!/locale/en-US/overlay.dtd
+++ /dev/null
@@ -1,26 +0,0 @@
-<!ENTITY helloworld "Hello World!">
-<!ENTITY cookiemonster "Cookie Monster">
-<!ENTITY secondlevel "Use 2nd Level Domain Names">
-<!ENTITY globalpermissions "Global Cookie Settings">
-<!ENTITY blockglobal "Block All Cookies (Uncheck to Allow)">
-<!ENTITY blockthirdparty "Block 3rd Party Cookies Only">
-<!ENTITY globaloverride "Override Global Cookie Permissions">
-<!ENTITY showcookieexceptions "Show Cookie Exceptions">
-<!ENTITY showcookies "Show Cookies">
-<!ENTITY showallcookies "Show Cookies for All Sites">
-<!ENTITY viewcookies "View Cookies">
-<!ENTITY deletecookies "Delete Cookies">
-<!ENTITY currentpermissions "Current Cookie Permissions">
-<!ENTITY alternatecookieaccess "Set Cookie Access">
-<!ENTITY sitepermissions "Site:">
-<!ENTITY domainpermissions "Domain:">
-<!ENTITY permissionsresult "Resulting Action:">
-<!ENTITY options "Options">
-<!ENTITY default "Default">
-<!ENTITY allow "Allow">
-<!ENTITY deny "Deny">
-<!ENTITY session "Session">
-<!ENTITY tempallow "Temporarily Allow">
-<!ENTITY thirdpartycookies "Third Party Cookies">
-<!ENTITY thirdpartydefault "None">
-<!ENTITY revoketempallow "Revoke All Temporarily Allow">
diff --git a/chrome/cookiemonster.jar!/locale/en-US/overrideGlobal.dtd b/chrome/cookiemonster.jar!/locale/en-US/overrideGlobal.dtd
deleted file mode 100644
index 63a4392..0000000
--- a/chrome/cookiemonster.jar!/locale/en-US/overrideGlobal.dtd
+++ /dev/null
@@ -1,16 +0,0 @@
-<!ENTITY window.title "Override Global Cookie Permissions">
-<!ENTITY window.width "30em">
-
-<!ENTITY overrideglobaltext.label "Only use Global Override when per-site cookie permissions do not appear to properly work, most notably sites wherein the javascript uses navigator.cookieEnabled to detect cookie permissions.">
-<!ENTITY removepermission.label "Remove Site">
-<!ENTITY removepermission.accesskey "R">
-<!ENTITY removeallpermissions.label "Remove All Sites">
-<!ENTITY removeallpermissions.accesskey "e">
-<!ENTITY address.label "Address of web site:">
-<!ENTITY addressexists.label "URL already in list:">
-<!ENTITY addurl.label "Add URL">
-<!ENTITY addurl.accesskey "A">
-<!ENTITY windowClose.key "w">
-
-<!ENTITY button.close.label "Close">
-<!ENTITY button.close.accesskey "C">
diff --git a/chrome/cookiemonster.jar!/locale/en-US/siteCookies.properties b/chrome/cookiemonster.jar!/locale/en-US/siteCookies.properties
deleted file mode 100644
index d250fbd..0000000
--- a/chrome/cookiemonster.jar!/locale/en-US/siteCookies.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#### Site Cookie Viewer
-
-sitelabel=Cookies for
-searchbyurl=Search by URL
-clearlabel=Clear
-clearaccesskey=l
diff --git a/chrome/cookiemonster.jar!/locale/fr-FR/cookieMonster.dtd b/chrome/cookiemonster.jar!/locale/fr-FR/cookieMonster.dtd
deleted file mode 100644
index 7c0bde8..0000000
--- a/chrome/cookiemonster.jar!/locale/fr-FR/cookieMonster.dtd
+++ /dev/null
@@ -1,3 +0,0 @@
-<!ENTITY title.label "Hello World">
-<!ENTITY separate.label "Ceci est une fenêtre séparée!">
-<!ENTITY close.label "Fermer">
diff --git a/chrome/cookiemonster.jar!/locale/fr-FR/cookieMonster.properties b/chrome/cookiemonster.jar!/locale/fr-FR/cookieMonster.properties
deleted file mode 100644
index 7be45c8..0000000
--- a/chrome/cookiemonster.jar!/locale/fr-FR/cookieMonster.properties
+++ /dev/null
@@ -1,41 +0,0 @@
-#### Cookie Access for Menu
-
-default=Action par défaut
-accepted=Accepter
-userprompted=Demander à l'utilisateur
-acceptedsession=Accepter pour la session
-rejected=Rejeter
-originatingsiteonly=Site d'origine seulement
-allow=Accepter les cookies de
-deny=Interdire les cookies de
-session=Accepter les cookies pour la session
-tooltiptext=Accès du cookie pour
-temp=Autoriser temporairement les cookies de
-sitepermissions=Site
-domainpermissions=Domaine
-permissionsresult=Action effective
-permissionsresultfor=Action effective pour
-showcurrentcookies=Montrer les cookies pour
-deletecurrentcookies=Supprimer les cookies pour
-Default=Défaut
-Allow=Autoriser
-Session=Autoriser pour la session
-Deny=Bloquer
-Temp=Autoriser temporairement
-alternatecookieaccess=Accès aux cookies
-sitemenulabel=Sous-domaine
-domainmenulabel=Ensemble du domaine
-thirdpartyblocked=Cookies Tiers Bloqués
-
-## Labels for Confirmation Dialog
-confirmtitle=Supprimer les cookies
-confirmtext=Voulez-vous vraiment supprimer les cookies pour %S?
-
-## Labels for Third Party Menu
-thirdpartynone=Aucun Détecté
-thirdpartytempallowall=Tout autoriser temporairement
-thirdpartytemprevokeall=Tout interdire temporairement
-
-## Label for Site Requesting to Set Cookie Indicator
-siteattemptedcookie=Ce site a tenté de créer un cookie
-sitenotattemptedcookie=Ce site n'a PAS tenté de créer un cookie
diff --git a/chrome/cookiemonster.jar!/locale/fr-FR/options.dtd b/chrome/cookiemonster.jar!/locale/fr-FR/options.dtd
deleted file mode 100644
index 439ea61..0000000
--- a/chrome/cookiemonster.jar!/locale/fr-FR/options.dtd
+++ /dev/null
@@ -1,12 +0,0 @@
-<!ENTITY options_window_title "Options de Cookie Monster">
-<!ENTITY cookiemonster "Bonjour Cookies!">
-<!ENTITY options "Options">
-<!ENTITY secondlevel "Appliquer les même permissions sur l'ensemble du nom de domaine">
-<!ENTITY reloadonpermissionchange "Recharger automatiquement les pages affectées après un changement de permission">
-<!ENTITY enablecontextmenu "Afficher Cookie Monster dans le menu contextuel">
-<!ENTITY deletecookies "Supprimer les cookies lors du passage à l'état 'interdire'">
-<!ENTITY enableglobalcookies "Autoriser d'outre-passer les permissions par défaut">
-<!ENTITY thirdPartyCookies "Bloquer les cookies tiers">
-<!ENTITY denyCookiesDefault "Bloquer tous les cookies">
-<!ENTITY disabledeletecookieconfirm "Ne pas demander confirmation lors de la suppression des cookies via le menu">
-<!ENTITY originaldefaulticon "Utiliser les anciennes icônes de base (le Singe)">
diff --git a/chrome/cookiemonster.jar!/locale/fr-FR/overlay.dtd b/chrome/cookiemonster.jar!/locale/fr-FR/overlay.dtd
deleted file mode 100644
index 91d4666..0000000
--- a/chrome/cookiemonster.jar!/locale/fr-FR/overlay.dtd
+++ /dev/null
@@ -1,26 +0,0 @@
-<!ENTITY helloworld "Hello World!">
-<!ENTITY cookiemonster "Bonjour Cookies!">
-<!ENTITY secondlevel "Appliquer les même permissions sur l'ensemble du nom de domaine">
-<!ENTITY globalpermissions "Paramètres globals des cookies">
-<!ENTITY blockglobal "Bloquer tous les cookies (Décocher pour autoriser)">
-<!ENTITY blockthirdparty "Bloque les cookies tiers seulement">
-<!ENTITY globaloverride "Outre-passer les permissions par défaut">
-<!ENTITY showcookieexceptions "Montrer les exceptions">
-<!ENTITY showcookies "Afficher les cookies">
-<!ENTITY showallcookies "Afficher tous les cookies">
-<!ENTITY viewcookies "Voir les cookies">
-<!ENTITY deletecookies "Supprimer les cookies">
-<!ENTITY currentpermissions "Permissions courantes">
-<!ENTITY alternatecookieaccess "Définir l'autorisation du cookie">
-<!ENTITY sitepermissions "Site:">
-<!ENTITY domainpermissions "Domaine:">
-<!ENTITY permissionsresult "Action effective:">
-<!ENTITY options "Options">
-<!ENTITY default "Défaut">
-<!ENTITY allow "Autoriser">
-<!ENTITY deny "Interdire">
-<!ENTITY session "Session">
-<!ENTITY tempallow "Autoriser temporairement">
-<!ENTITY thirdpartycookies "Cookies Tiers">
-<!ENTITY thirdpartydefault "Aucun">
-<!ENTITY revoketempallow "Supprimer toutes les permissions temporaires">
diff --git a/chrome/cookiemonster.jar!/locale/fr-FR/overrideGlobal.dtd b/chrome/cookiemonster.jar!/locale/fr-FR/overrideGlobal.dtd
deleted file mode 100644
index cd207c1..0000000
--- a/chrome/cookiemonster.jar!/locale/fr-FR/overrideGlobal.dtd
+++ /dev/null
@@ -1,16 +0,0 @@
-<!ENTITY window.title "Outre-passer les permissions par défaut">
-<!ENTITY window.width "30em">
-
-<!ENTITY overrideglobaltext.label "Outre-passer les permissions par défaut uniquement lorsque que le site ne semble pas fonctionner correctement. C'est notamment le cas, lorsque celui-ci utilise la fonction javascript 'navigator.cookieEnabled' pour détecter l'activation des cookies.">
-<!ENTITY removepermission.label "Supprimer le site">
-<!ENTITY removepermission.accesskey "R">
-<!ENTITY removeallpermissions.label "Supprimer tous les sites">
-<!ENTITY removeallpermissions.accesskey "e">
-<!ENTITY address.label "Adresse du site web:">
-<!ENTITY addressexists.label "URL déjà dans la liste:">
-<!ENTITY addurl.label "Ajouter une URL">
-<!ENTITY addurl.accesskey "A">
-<!ENTITY windowClose.key "w">
-
-<!ENTITY button.close.label "Fermer">
-<!ENTITY button.close.accesskey "C">
diff --git a/chrome/cookiemonster.jar!/locale/fr-FR/siteCookies.properties b/chrome/cookiemonster.jar!/locale/fr-FR/siteCookies.properties
deleted file mode 100644
index b5b40e4..0000000
--- a/chrome/cookiemonster.jar!/locale/fr-FR/siteCookies.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#### Site Cookie Viewer
-
-sitelabel=Cookies pour
-searchbyurl=Recherche par URL
-clearlabel=Effacer
-clearaccesskey=E
diff --git a/chrome/cookiemonster.jar!/locale/zh-TW/cookieMonster.dtd b/chrome/cookiemonster.jar!/locale/zh-TW/cookieMonster.dtd
deleted file mode 100644
index 1d6f547..0000000
--- a/chrome/cookiemonster.jar!/locale/zh-TW/cookieMonster.dtd
+++ /dev/null
@@ -1,3 +0,0 @@
-<!ENTITY title.label "Hello World">
-<!ENTITY separate.label "這是一個獨立的視窗!">
-<!ENTITY close.label "關閉">
diff --git a/chrome/cookiemonster.jar!/locale/zh-TW/cookieMonster.properties b/chrome/cookiemonster.jar!/locale/zh-TW/cookieMonster.properties
deleted file mode 100644
index cd8c24f..0000000
--- a/chrome/cookiemonster.jar!/locale/zh-TW/cookieMonster.properties
+++ /dev/null
@@ -1,41 +0,0 @@
-#### Cookie Access for Menu
-
-default = 預設動作
-accepted = 接受
-userprompted = 提示使用者
-acceptedsession = 只接受連線階段
-rejected = 拒絕
-originatingsiteonly = 只限原網站
-allow = 接受 Cookies 來自
-deny = 拒絕 Cookies 來自
-session = 接受連線階段 Cookies 來自
-tooltiptext = Cookie 存取權於
-temp = 暫時允許 Cookies 來自
-sitepermissions = 網站
-domainpermissions = 網域
-permissionsresult = 設定後動作
-permissionsresultfor = 設定後動作於
-showcurrentcookies = 顯示 Cookies 於
-deletecurrentcookies = 刪除 Cookies 於
-Default = 預設
-Allow = 允許
-Session = 只允許連線階段
-Deny = 阻擋
-Temp = 暫時允許
-alternatecookieaccess = Cookie 存取權
-sitemenulabel = 網站層級
-domainmenulabel = 網域層級
-thirdpartyblocked=阻擋第三方
-
-## Labels for Confirmation Dialog
-confirmtitle = 刪除 Cookies
-confirmtext = 您確定要刪除 %S 的 cookies?
-
-## Labels for Third Party Menu
-thirdpartynone=未偵測到
-thirdpartytempallowall=暫時全部允許
-thirdpartytemprevokeall=取消暫時允許
-
-## Label for Site Requesting to Set Cookie Indicator
-siteattemptedcookie=此網站已要求設定 cookie(s)
-sitenotattemptedcookie=此網站未要求設定 cookie(s)
diff --git a/chrome/cookiemonster.jar!/locale/zh-TW/options.dtd b/chrome/cookiemonster.jar!/locale/zh-TW/options.dtd
deleted file mode 100644
index 46dd7ef..0000000
--- a/chrome/cookiemonster.jar!/locale/zh-TW/options.dtd
+++ /dev/null
@@ -1,12 +0,0 @@
-<!ENTITY options_window_title "Cookie Monster 選項">
-<!ENTITY cookiemonster "Hello Cookies!">
-<!ENTITY options "選項">
-<!ENTITY secondlevel "使用第二層網域名稱">
-<!ENTITY reloadonpermissionchange "Cookie 存取權改變時自動更新受影響的頁面">
-<!ENTITY enablecontextmenu "在右鍵選單顯示 Cookie Monster">
-<!ENTITY deletecookies "存取權變為拒絕時刪除 Cookies">
-<!ENTITY enableglobalcookies "啟用全域 Cookie 權限覆載">
-<!ENTITY thirdPartyCookies "阻擋來自第三方的 Cookies">
-<!ENTITY denyCookiesDefault "阻擋所有 Cookies">
-<!ENTITY disabledeletecookieconfirm "停用刪除 Cookies 選單選項裡的確認對話框">
-<!ENTITY originaldefaulticon "使用原來的預設圖示(猴子)">
diff --git a/chrome/cookiemonster.jar!/locale/zh-TW/overlay.dtd b/chrome/cookiemonster.jar!/locale/zh-TW/overlay.dtd
deleted file mode 100644
index cc1d413..0000000
--- a/chrome/cookiemonster.jar!/locale/zh-TW/overlay.dtd
+++ /dev/null
@@ -1,26 +0,0 @@
-<!ENTITY helloworld "Hello World!">
-<!ENTITY cookiemonster "Cookie Monster">
-<!ENTITY secondlevel "使用第二層網域名稱">
-<!ENTITY globalpermissions "全域 Cookies 設定">
-<!ENTITY blockglobal "阻擋所有 Cookies(若要允許請別勾選)">
-<!ENTITY blockthirdparty "只阻擋第三方 Cookies">
-<!ENTITY globaloverride "覆載全域 Cookie 權限">
-<!ENTITY showcookieexceptions "顯示 Cookie 例外">
-<!ENTITY showcookies "顯示 Cookies">
-<!ENTITY showallcookies "顯示所有網站的 Cookies">
-<!ENTITY viewcookies "檢視 Cookies">
-<!ENTITY deletecookies "刪除 Cookies">
-<!ENTITY currentpermissions "目前的 Cookie 權限">
-<!ENTITY alternatecookieaccess "設定 Cookie 存取權">
-<!ENTITY sitepermissions "網站:">
-<!ENTITY domainpermissions "網域:">
-<!ENTITY permissionsresult "設定後動作:">
-<!ENTITY options "選項">
-<!ENTITY default "預設">
-<!ENTITY allow "允許">
-<!ENTITY deny "拒絕">
-<!ENTITY session "連線階段">
-<!ENTITY tempallow "暫時允許">
-<!ENTITY thirdpartycookies "第三方 Cookies">
-<!ENTITY thirdpartydefault "無">
-<!ENTITY revoketempallow "取消所有暫時允許">
diff --git a/chrome/cookiemonster.jar!/locale/zh-TW/overrideGlobal.dtd b/chrome/cookiemonster.jar!/locale/zh-TW/overrideGlobal.dtd
deleted file mode 100644
index 44a7c26..0000000
--- a/chrome/cookiemonster.jar!/locale/zh-TW/overrideGlobal.dtd
+++ /dev/null
@@ -1,14 +0,0 @@
-<!ENTITY window.title "覆載全域 Cookie 權限">
-<!ENTITY window.width "30em">
-<!ENTITY overrideglobaltext.label "全域覆載只在個別網站 cookie 權限似乎無法正常運作時才使用,尤其是那些在 javascript 用 navigator.cookieEnabled 來偵測 cookie 權限的網站。">
-<!ENTITY removepermission.label "移除網站">
-<!ENTITY removepermission.accesskey "R">
-<!ENTITY removeallpermissions.label "移除所有網站">
-<!ENTITY removeallpermissions.accesskey "e">
-<!ENTITY address.label "網站位址:">
-<!ENTITY addressexists.label "網路位址已在清單之中:">
-<!ENTITY addurl.label "新增網路位址">
-<!ENTITY addurl.accesskey "A">
-<!ENTITY windowClose.key "w">
-<!ENTITY button.close.label "關閉">
-<!ENTITY button.close.accesskey "C">
diff --git a/chrome/cookiemonster.jar!/locale/zh-TW/siteCookies.properties b/chrome/cookiemonster.jar!/locale/zh-TW/siteCookies.properties
deleted file mode 100644
index 7334ddd..0000000
--- a/chrome/cookiemonster.jar!/locale/zh-TW/siteCookies.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-sitelabel = Cookies 於
-searchbyurl = 以網路位址搜尋
-clearlabel = 清除
-clearaccesskey = l
diff --git a/chrome/cookiemonster.jar!/skin/accept.png b/chrome/cookiemonster.jar!/skin/accept.png
deleted file mode 100644
index 219bc71..0000000
Binary files a/chrome/cookiemonster.jar!/skin/accept.png and /dev/null differ
diff --git a/chrome/cookiemonster.jar!/skin/cookie-monster-logo-bigger.png b/chrome/cookiemonster.jar!/skin/cookie-monster-logo-bigger.png
deleted file mode 100644
index 5ec3f67..0000000
Binary files a/chrome/cookiemonster.jar!/skin/cookie-monster-logo-bigger.png and /dev/null differ
diff --git a/chrome/cookiemonster.jar!/skin/cookie-monster-logo.png b/chrome/cookiemonster.jar!/skin/cookie-monster-logo.png
deleted file mode 100644
index cf66a1d..0000000
Binary files a/chrome/cookiemonster.jar!/skin/cookie-monster-logo.png and /dev/null differ
diff --git a/chrome/cookiemonster.jar!/skin/face-angel-og.png b/chrome/cookiemonster.jar!/skin/face-angel-og.png
deleted file mode 100644
index 82382c6..0000000
Binary files a/chrome/cookiemonster.jar!/skin/face-angel-og.png and /dev/null differ
diff --git a/chrome/cookiemonster.jar!/skin/face-angel-temp.png b/chrome/cookiemonster.jar!/skin/face-angel-temp.png
deleted file mode 100644
index 584e9ce..0000000
Binary files a/chrome/cookiemonster.jar!/skin/face-angel-temp.png and /dev/null differ
diff --git a/chrome/cookiemonster.jar!/skin/face-angel.png b/chrome/cookiemonster.jar!/skin/face-angel.png
deleted file mode 100644
index d2c5e94..0000000
Binary files a/chrome/cookiemonster.jar!/skin/face-angel.png and /dev/null differ
diff --git a/chrome/cookiemonster.jar!/skin/face-devil-grin.png b/chrome/cookiemonster.jar!/skin/face-devil-grin.png
deleted file mode 100644
index 8e2cd45..0000000
Binary files a/chrome/cookiemonster.jar!/skin/face-devil-grin.png and /dev/null differ
diff --git a/chrome/cookiemonster.jar!/skin/face-glasses-og.png b/chrome/cookiemonster.jar!/skin/face-glasses-og.png
deleted file mode 100644
index 92cb38b..0000000
Binary files a/chrome/cookiemonster.jar!/skin/face-glasses-og.png and /dev/null differ
diff --git a/chrome/cookiemonster.jar!/skin/face-glasses.png b/chrome/cookiemonster.jar!/skin/face-glasses.png
deleted file mode 100644
index d13f2c8..0000000
Binary files a/chrome/cookiemonster.jar!/skin/face-glasses.png and /dev/null differ
diff --git a/chrome/cookiemonster.jar!/skin/face-monkey-small.png b/chrome/cookiemonster.jar!/skin/face-monkey-small.png
deleted file mode 100644
index 69db8fa..0000000
Binary files a/chrome/cookiemonster.jar!/skin/face-monkey-small.png and /dev/null differ
diff --git a/chrome/cookiemonster.jar!/skin/face-monkey.png b/chrome/cookiemonster.jar!/skin/face-monkey.png
deleted file mode 100644
index ced7b2e..0000000
Binary files a/chrome/cookiemonster.jar!/skin/face-monkey.png and /dev/null differ
diff --git a/chrome/cookiemonster.jar!/skin/overlay.css b/chrome/cookiemonster.jar!/skin/overlay.css
deleted file mode 100644
index 9c1a9bb..0000000
--- a/chrome/cookiemonster.jar!/skin/overlay.css
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Overlay CSS Theme
-** for Cookie Monster Extension
-**
-** Modified by: Tony Schilling
-**
-**
-** Date Last Modified: 11/14/2008
-*/
-
-/*
- menupopup > menuitem#cookie-access-default {
- list-style-image: url("chrome://cookiemonster/skin/abcardWindow.ico");
- }
- */
-
-statusbarpanel#cookiemonster-status {
- list-style-image: url("chrome://cookiemonster/skin/face-monkey.png");
-}
-
-menuitem[name="cookie-top"] {
- list-style-image: url("chrome://cookiemonster/skin/record.png");
-}
-
-menuitem[name="cookie-two"] {
- list-style-image: url("chrome://cookiemonster/skin/record.png");
-}
-
-menuitem[name="cookie-three"] {
- list-style-image: url("chrome://cookiemonster/skin/record.png");
-}
-
-menuitem[name="cookie-default"] {
- list-style-image: url("chrome://cookiemonster/skin/record.png");
-}
-
-menuitem[name="cookie-access"] {
- list-style-image: url("chrome://cookiemonster/skin/record.png");
-}
-
-menuitem[name="current-access"] {
- list-style-image: url("chrome://cookiemonster/skin/accept.png");
- font-weight: bold;
-}
-
-/*
-** Set the temporarily items to italics
-*/
-menuitem#cookie-access-top-temp, menuitem#cookie-access-second-temp, menuitem#cookie-access-third-temp, label#cookie-status-header {
- font-style: italic;
-}
-
-/*
-** Cookie Status Tooltip
-*/
-.cookie-status-tooltip {
- opacity: 0.8; /* see the background through the tooltip */
-}
-
-caption[name="cookie-caption-image-default"] {
- list-style-image: url("chrome://cookiemonster/skin/face-monkey-small.png");
-}
-
diff --git a/chrome/cookiemonster.jar!/skin/record.png b/chrome/cookiemonster.jar!/skin/record.png
deleted file mode 100644
index 04b6e8c..0000000
Binary files a/chrome/cookiemonster.jar!/skin/record.png and /dev/null differ
diff --git a/debian/MPL-1.1 b/debian/MPL-1.1
deleted file mode 100644
index 18f8109..0000000
--- a/debian/MPL-1.1
+++ /dev/null
@@ -1,567 +0,0 @@
- MOZILLA PUBLIC LICENSE
- Version 1.1
-
- ---------------
-
-1. Definitions.
-
- 1.0.1. "Commercial Use" means distribution or otherwise making the
- Covered Code available to a third party.
-
- 1.1. "Contributor" means each entity that creates or contributes to
- the creation of Modifications.
-
- 1.2. "Contributor Version" means the combination of the Original
- Code, prior Modifications used by a Contributor, and the Modifications
- made by that particular Contributor.
-
- 1.3. "Covered Code" means the Original Code or Modifications or the
- combination of the Original Code and Modifications, in each case
- including portions thereof.
-
- 1.4. "Electronic Distribution Mechanism" means a mechanism generally
- accepted in the software development community for the electronic
- transfer of data.
-
- 1.5. "Executable" means Covered Code in any form other than Source
- Code.
-
- 1.6. "Initial Developer" means the individual or entity identified
- as the Initial Developer in the Source Code notice required by Exhibit
- A.
-
- 1.7. "Larger Work" means a work which combines Covered Code or
- portions thereof with code not governed by the terms of this License.
-
- 1.8. "License" means this document.
-
- 1.8.1. "Licensable" means having the right to grant, to the maximum
- extent possible, whether at the time of the initial grant or
- subsequently acquired, any and all of the rights conveyed herein.
-
- 1.9. "Modifications" means any addition to or deletion from the
- substance or structure of either the Original Code or any previous
- Modifications. When Covered Code is released as a series of files, a
- Modification is:
- A. Any addition to or deletion from the contents of a file
- containing Original Code or previous Modifications.
-
- B. Any new file that contains any part of the Original Code or
- previous Modifications.
-
- 1.10. "Original Code" means Source Code of computer software code
- which is described in the Source Code notice required by Exhibit A as
- Original Code, and which, at the time of its release under this
- License is not already Covered Code governed by this License.
-
- 1.10.1. "Patent Claims" means any patent claim(s), now owned or
- hereafter acquired, including without limitation, method, process,
- and apparatus claims, in any patent Licensable by grantor.
-
- 1.11. "Source Code" means the preferred form of the Covered Code for
- making modifications to it, including all modules it contains, plus
- any associated interface definition files, scripts used to control
- compilation and installation of an Executable, or source code
- differential comparisons against either the Original Code or another
- well known, available Covered Code of the Contributor's choice. The
- Source Code can be in a compressed or archival form, provided the
- appropriate decompression or de-archiving software is widely available
- for no charge.
-
- 1.12. "You" (or "Your") means an individual or a legal entity
- exercising rights under, and complying with all of the terms of, this
- License or a future version of this License issued under Section 6.1.
- For legal entities, "You" includes any entity which controls, is
- controlled by, or is under common control with You. For purposes of
- this definition, "control" means (a) the power, direct or indirect,
- to cause the direction or management of such entity, whether by
- contract or otherwise, or (b) ownership of more than fifty percent
- (50%) of the outstanding shares or beneficial ownership of such
- entity.
-
-2. Source Code License.
-
- 2.1. The Initial Developer Grant.
- The Initial Developer hereby grants You a world-wide, royalty-free,
- non-exclusive license, subject to third party intellectual property
- claims:
- (a) under intellectual property rights (other than patent or
- trademark) Licensable by Initial Developer to use, reproduce,
- modify, display, perform, sublicense and distribute the Original
- Code (or portions thereof) with or without Modifications, and/or
- as part of a Larger Work; and
-
- (b) under Patents Claims infringed by the making, using or
- selling of Original Code, to make, have made, use, practice,
- sell, and offer for sale, and/or otherwise dispose of the
- Original Code (or portions thereof).
-
- (c) the licenses granted in this Section 2.1(a) and (b) are
- effective on the date Initial Developer first distributes
- Original Code under the terms of this License.
-
- (d) Notwithstanding Section 2.1(b) above, no patent license is
- granted: 1) for code that You delete from the Original Code; 2)
- separate from the Original Code; or 3) for infringements caused
- by: i) the modification of the Original Code or ii) the
- combination of the Original Code with other software or devices.
-
- 2.2. Contributor Grant.
- Subject to third party intellectual property claims, each Contributor
- hereby grants You a world-wide, royalty-free, non-exclusive license
-
- (a) under intellectual property rights (other than patent or
- trademark) Licensable by Contributor, to use, reproduce, modify,
- display, perform, sublicense and distribute the Modifications
- created by such Contributor (or portions thereof) either on an
- unmodified basis, with other Modifications, as Covered Code
- and/or as part of a Larger Work; and
-
- (b) under Patent Claims infringed by the making, using, or
- selling of Modifications made by that Contributor either alone
- and/or in combination with its Contributor Version (or portions
- of such combination), to make, use, sell, offer for sale, have
- made, and/or otherwise dispose of: 1) Modifications made by that
- Contributor (or portions thereof); and 2) the combination of
- Modifications made by that Contributor with its Contributor
- Version (or portions of such combination).
-
- (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
- effective on the date Contributor first makes Commercial Use of
- the Covered Code.
-
- (d) Notwithstanding Section 2.2(b) above, no patent license is
- granted: 1) for any code that Contributor has deleted from the
- Contributor Version; 2) separate from the Contributor Version;
- 3) for infringements caused by: i) third party modifications of
- Contributor Version or ii) the combination of Modifications made
- by that Contributor with other software (except as part of the
- Contributor Version) or other devices; or 4) under Patent Claims
- infringed by Covered Code in the absence of Modifications made by
- that Contributor.
-
-3. Distribution Obligations.
-
- 3.1. Application of License.
- The Modifications which You create or to which You contribute are
- governed by the terms of this License, including without limitation
- Section 2.2. The Source Code version of Covered Code may be
- distributed only under the terms of this License or a future version
- of this License released under Section 6.1, and You must include a
- copy of this License with every copy of the Source Code You
- distribute. You may not offer or impose any terms on any Source Code
- version that alters or restricts the applicable version of this
- License or the recipients' rights hereunder. However, You may include
- an additional document offering the additional rights described in
- Section 3.5.
-
- 3.2. Availability of Source Code.
- Any Modification which You create or to which You contribute must be
- made available in Source Code form under the terms of this License
- either on the same media as an Executable version or via an accepted
- Electronic Distribution Mechanism to anyone to whom you made an
- Executable version available; and if made available via Electronic
- Distribution Mechanism, must remain available for at least twelve (12)
- months after the date it initially became available, or at least six
- (6) months after a subsequent version of that particular Modification
- has been made available to such recipients. You are responsible for
- ensuring that the Source Code version remains available even if the
- Electronic Distribution Mechanism is maintained by a third party.
-
- 3.3. Description of Modifications.
- You must cause all Covered Code to which You contribute to contain a
- file documenting the changes You made to create that Covered Code and
- the date of any change. You must include a prominent statement that
- the Modification is derived, directly or indirectly, from Original
- Code provided by the Initial Developer and including the name of the
- Initial Developer in (a) the Source Code, and (b) in any notice in an
- Executable version or related documentation in which You describe the
- origin or ownership of the Covered Code.
-
- 3.4. Intellectual Property Matters
- (a) Third Party Claims.
- If Contributor has knowledge that a license under a third party's
- intellectual property rights is required to exercise the rights
- granted by such Contributor under Sections 2.1 or 2.2,
- Contributor must include a text file with the Source Code
- distribution titled "LEGAL" which describes the claim and the
- party making the claim in sufficient detail that a recipient will
- know whom to contact. If Contributor obtains such knowledge after
- the Modification is made available as described in Section 3.2,
- Contributor shall promptly modify the LEGAL file in all copies
- Contributor makes available thereafter and shall take other steps
- (such as notifying appropriate mailing lists or newsgroups)
- reasonably calculated to inform those who received the Covered
- Code that new knowledge has been obtained.
-
- (b) Contributor APIs.
- If Contributor's Modifications include an application programming
- interface and Contributor has knowledge of patent licenses which
- are reasonably necessary to implement that API, Contributor must
- also include this information in the LEGAL file.
-
- (c) Representations.
- Contributor represents that, except as disclosed pursuant to
- Section 3.4(a) above, Contributor believes that Contributor's
- Modifications are Contributor's original creation(s) and/or
- Contributor has sufficient rights to grant the rights conveyed by
- this License.
-
- 3.5. Required Notices.
- You must duplicate the notice in Exhibit A in each file of the Source
- Code. If it is not possible to put such notice in a particular Source
- Code file due to its structure, then You must include such notice in a
- location (such as a relevant directory) where a user would be likely
- to look for such a notice. If You created one or more Modification(s)
- You may add your name as a Contributor to the notice described in
- Exhibit A. You must also duplicate this License in any documentation
- for the Source Code where You describe recipients' rights or ownership
- rights relating to Covered Code. You may choose to offer, and to
- charge a fee for, warranty, support, indemnity or liability
- obligations to one or more recipients of Covered Code. However, You
- may do so only on Your own behalf, and not on behalf of the Initial
- Developer or any Contributor. You must make it absolutely clear than
- any such warranty, support, indemnity or liability obligation is
- offered by You alone, and You hereby agree to indemnify the Initial
- Developer and every Contributor for any liability incurred by the
- Initial Developer or such Contributor as a result of warranty,
- support, indemnity or liability terms You offer.
-
- 3.6. Distribution of Executable Versions.
- You may distribute Covered Code in Executable form only if the
- requirements of Section 3.1-3.5 have been met for that Covered Code,
- and if You include a notice stating that the Source Code version of
- the Covered Code is available under the terms of this License,
- including a description of how and where You have fulfilled the
- obligations of Section 3.2. The notice must be conspicuously included
- in any notice in an Executable version, related documentation or
- collateral in which You describe recipients' rights relating to the
- Covered Code. You may distribute the Executable version of Covered
- Code or ownership rights under a license of Your choice, which may
- contain terms different from this License, provided that You are in
- compliance with the terms of this License and that the license for the
- Executable version does not attempt to limit or alter the recipient's
- rights in the Source Code version from the rights set forth in this
- License. If You distribute the Executable version under a different
- license You must make it absolutely clear that any terms which differ
- from this License are offered by You alone, not by the Initial
- Developer or any Contributor. You hereby agree to indemnify the
- Initial Developer and every Contributor for any liability incurred by
- the Initial Developer or such Contributor as a result of any such
- terms You offer.
-
- 3.7. Larger Works.
- You may create a Larger Work by combining Covered Code with other code
- not governed by the terms of this License and distribute the Larger
- Work as a single product. In such a case, You must make sure the
- requirements of this License are fulfilled for the Covered Code.
-
-4. Inability to Comply Due to Statute or Regulation.
-
- If it is impossible for You to comply with any of the terms of this
- License with respect to some or all of the Covered Code due to
- statute, judicial order, or regulation then You must: (a) comply with
- the terms of this License to the maximum extent possible; and (b)
- describe the limitations and the code they affect. Such description
- must be included in the LEGAL file described in Section 3.4 and must
- be included with all distributions of the Source Code. Except to the
- extent prohibited by statute or regulation, such description must be
- sufficiently detailed for a recipient of ordinary skill to be able to
- understand it.
-
-5. Application of this License.
-
- This License applies to code to which the Initial Developer has
- attached the notice in Exhibit A and to related Covered Code.
-
-6. Versions of the License.
-
- 6.1. New Versions.
- Netscape Communications Corporation ("Netscape") may publish revised
- and/or new versions of the License from time to time. Each version
- will be given a distinguishing version number.
-
- 6.2. Effect of New Versions.
- Once Covered Code has been published under a particular version of the
- License, You may always continue to use it under the terms of that
- version. You may also choose to use such Covered Code under the terms
- of any subsequent version of the License published by Netscape. No one
- other than Netscape has the right to modify the terms applicable to
- Covered Code created under this License.
-
- 6.3. Derivative Works.
- If You create or use a modified version of this License (which you may
- only do in order to apply it to code which is not already Covered Code
- governed by this License), You must (a) rename Your license so that
- the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
- "MPL", "NPL" or any confusingly similar phrase do not appear in your
- license (except to note that your license differs from this License)
- and (b) otherwise make it clear that Your version of the license
- contains terms which differ from the Mozilla Public License and
- Netscape Public License. (Filling in the name of the Initial
- Developer, Original Code or Contributor in the notice described in
- Exhibit A shall not of themselves be deemed to be modifications of
- this License.)
-
-7. DISCLAIMER OF WARRANTY.
-
- COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
- DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
- THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
- IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
- YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
- COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
- OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
- ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-8. TERMINATION.
-
- 8.1. This License and the rights granted hereunder will terminate
- automatically if You fail to comply with terms herein and fail to cure
- such breach within 30 days of becoming aware of the breach. All
- sublicenses to the Covered Code which are properly granted shall
- survive any termination of this License. Provisions which, by their
- nature, must remain in effect beyond the termination of this License
- shall survive.
-
- 8.2. If You initiate litigation by asserting a patent infringement
- claim (excluding declatory judgment actions) against Initial Developer
- or a Contributor (the Initial Developer or Contributor against whom
- You file such action is referred to as "Participant") alleging that:
-
- (a) such Participant's Contributor Version directly or indirectly
- infringes any patent, then any and all rights granted by such
- Participant to You under Sections 2.1 and/or 2.2 of this License
- shall, upon 60 days notice from Participant terminate prospectively,
- unless if within 60 days after receipt of notice You either: (i)
- agree in writing to pay Participant a mutually agreeable reasonable
- royalty for Your past and future use of Modifications made by such
- Participant, or (ii) withdraw Your litigation claim with respect to
- the Contributor Version against such Participant. If within 60 days
- of notice, a reasonable royalty and payment arrangement are not
- mutually agreed upon in writing by the parties or the litigation claim
- is not withdrawn, the rights granted by Participant to You under
- Sections 2.1 and/or 2.2 automatically terminate at the expiration of
- the 60 day notice period specified above.
-
- (b) any software, hardware, or device, other than such Participant's
- Contributor Version, directly or indirectly infringes any patent, then
- any rights granted to You by such Participant under Sections 2.1(b)
- and 2.2(b) are revoked effective as of the date You first made, used,
- sold, distributed, or had made, Modifications made by that
- Participant.
-
- 8.3. If You assert a patent infringement claim against Participant
- alleging that such Participant's Contributor Version directly or
- indirectly infringes any patent where such claim is resolved (such as
- by license or settlement) prior to the initiation of patent
- infringement litigation, then the reasonable value of the licenses
- granted by such Participant under Sections 2.1 or 2.2 shall be taken
- into account in determining the amount or value of any payment or
- license.
-
- 8.4. In the event of termination under Sections 8.1 or 8.2 above,
- all end user license agreements (excluding distributors and resellers)
- which have been validly granted by You or any distributor hereunder
- prior to termination shall survive termination.
-
-9. LIMITATION OF LIABILITY.
-
- UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
- (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
- DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
- OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
- ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
- CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
- WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
- COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
- INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
- LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
- RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
- PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
- EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
- THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
-
-10. U.S. GOVERNMENT END USERS.
-
- The Covered Code is a "commercial item," as that term is defined in
- 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
- software" and "commercial computer software documentation," as such
- terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
- C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
- all U.S. Government End Users acquire Covered Code with only those
- rights set forth herein.
-
-11. MISCELLANEOUS.
-
- This License represents the complete agreement concerning subject
- matter hereof. If any provision of this License is held to be
- unenforceable, such provision shall be reformed only to the extent
- necessary to make it enforceable. This License shall be governed by
- California law provisions (except to the extent applicable law, if
- any, provides otherwise), excluding its conflict-of-law provisions.
- With respect to disputes in which at least one party is a citizen of,
- or an entity chartered or registered to do business in the United
- States of America, any litigation relating to this License shall be
- subject to the jurisdiction of the Federal Courts of the Northern
- District of California, with venue lying in Santa Clara County,
- California, with the losing party responsible for costs, including
- without limitation, court costs and reasonable attorneys' fees and
- expenses. The application of the United Nations Convention on
- Contracts for the International Sale of Goods is expressly excluded.
- Any law or regulation which provides that the language of a contract
- shall be construed against the drafter shall not apply to this
- License.
-
-12. RESPONSIBILITY FOR CLAIMS.
-
- As between Initial Developer and the Contributors, each party is
- responsible for claims and damages arising, directly or indirectly,
- out of its utilization of rights under this License and You agree to
- work with Initial Developer and Contributors to distribute such
- responsibility on an equitable basis. Nothing herein is intended or
- shall be deemed to constitute any admission of liability.
-
-13. MULTIPLE-LICENSED CODE.
-
- Initial Developer may designate portions of the Covered Code as
- "Multiple-Licensed". "Multiple-Licensed" means that the Initial
- Developer permits you to utilize portions of the Covered Code under
- Your choice of the NPL or the alternative licenses, if any, specified
- by the Initial Developer in the file described in Exhibit A.
-
-EXHIBIT A -Mozilla Public License.
-
- ``The contents of this file are subject to the Mozilla Public License
- Version 1.1 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- License for the specific language governing rights and limitations
- under the License.
-
- The Original Code is ______________________________________.
-
- The Initial Developer of the Original Code is ________________________.
- Portions created by ______________________ are Copyright (C) ______
- _______________________. All Rights Reserved.
-
- Contributor(s): ______________________________________.
-
- Alternatively, the contents of this file may be used under the terms
- of the _____ license (the "[___] License"), in which case the
- provisions of [______] License are applicable instead of those
- above. If you wish to allow use of your version of this file only
- under the terms of the [____] License and not to allow others to use
- your version of this file under the MPL, indicate your decision by
- deleting the provisions above and replace them with the notice and
- other provisions required by the [___] License. If you do not delete
- the provisions above, a recipient may use your version of this file
- under either the MPL or the [___] License."
-
- [NOTE: The text of this Exhibit A may differ slightly from the text of
- the notices in the Source Code files of the Original Code. You should
- use the text of this Exhibit A rather than the text found in the
- Original Code Source Code for Your Modifications.]
-
- ----------------------------------------------------------------------
-
- AMENDMENTS
-
- The Netscape Public License Version 1.1 ("NPL") consists of the
- Mozilla Public License Version 1.1 with the following Amendments,
- including Exhibit A-Netscape Public License. Files identified with
- "Exhibit A-Netscape Public License" are governed by the Netscape
- Public License Version 1.1.
-
- Additional Terms applicable to the Netscape Public License.
- I. Effect.
- These additional terms described in this Netscape Public
- License -- Amendments shall apply to the Mozilla Communicator
- client code and to all Covered Code under this License.
-
- II. "Netscape's Branded Code" means Covered Code that Netscape
- distributes and/or permits others to distribute under one or more
- trademark(s) which are controlled by Netscape but which are not
- licensed for use under this License.
-
- III. Netscape and logo.
- This License does not grant any rights to use the trademarks
- "Netscape", the "Netscape N and horizon" logo or the "Netscape
- lighthouse" logo, "Netcenter", "Gecko", "Java" or "JavaScript",
- "Smart Browsing" even if such marks are included in the Original
- Code or Modifications.
-
- IV. Inability to Comply Due to Contractual Obligation.
- Prior to licensing the Original Code under this License, Netscape
- has licensed third party code for use in Netscape's Branded Code.
- To the extent that Netscape is limited contractually from making
- such third party code available under this License, Netscape may
- choose to reintegrate such code into Covered Code without being
- required to distribute such code in Source Code form, even if
- such code would otherwise be considered "Modifications" under
- this License.
-
- V. Use of Modifications and Covered Code by Initial Developer.
- V.1. In General.
- The obligations of Section 3 apply to Netscape, except to
- the extent specified in this Amendment, Section V.2 and V.3.
-
- V.2. Other Products.
- Netscape may include Covered Code in products other than the
- Netscape's Branded Code which are released by Netscape
- during the two (2) years following the release date of the
- Original Code, without such additional products becoming
- subject to the terms of this License, and may license such
- additional products on different terms from those contained
- in this License.
-
- V.3. Alternative Licensing.
- Netscape may license the Source Code of Netscape's Branded
- Code, including Modifications incorporated therein, without
- such Netscape Branded Code becoming subject to the terms of
- this License, and may license such Netscape Branded Code on
- different terms from those contained in this License.
-
- VI. Litigation.
- Notwithstanding the limitations of Section 11 above, the
- provisions regarding litigation in Section 11(a), (b) and (c) of
- the License shall apply to all disputes relating to this License.
-
- EXHIBIT A-Netscape Public License.
-
- "The contents of this file are subject to the Netscape Public
- License Version 1.1 (the "License"); you may not use this file
- except in compliance with the License. You may obtain a copy of
- the License at http://www.mozilla.org/NPL/
-
- Software distributed under the License is distributed on an "AS
- IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- implied. See the License for the specific language governing
- rights and limitations under the License.
-
- The Original Code is Mozilla Communicator client code, released
- March 31, 1998.
-
- The Initial Developer of the Original Code is Netscape
- Communications Corporation. Portions created by Netscape are
- Copyright (C) 1998-1999 Netscape Communications Corporation. All
- Rights Reserved.
-
- Contributor(s): ______________________________________.
-
- Alternatively, the contents of this file may be used under the
- terms of the _____ license (the "[___] License"), in which case
- the provisions of [______] License are applicable instead of
- those above. If you wish to allow use of your version of this
- file only under the terms of the [____] License and not to allow
- others to use your version of this file under the NPL, indicate
- your decision by deleting the provisions above and replace them
- with the notice and other provisions required by the [___]
- License. If you do not delete the provisions above, a recipient
- may use your version of this file under either the NPL or the
- [___] License."
diff --git a/debian/changelog b/debian/changelog
deleted file mode 100644
index 79c7617..0000000
--- a/debian/changelog
+++ /dev/null
@@ -1,5 +0,0 @@
-cookie-monster (1.0.5-1) unstable; urgency=low
-
- * Initial release (Closes: #623970)
-
- -- Fabrizio Regalli <fabreg at fabreg.it> Thu, 28 Apr 2011 22:30:20 +0200
diff --git a/debian/compat b/debian/compat
deleted file mode 100644
index 45a4fb7..0000000
--- a/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-8
diff --git a/debian/control b/debian/control
deleted file mode 100644
index aeb3d0b..0000000
--- a/debian/control
+++ /dev/null
@@ -1,23 +0,0 @@
-Source: cookie-monster
-Section: web
-Priority: optional
-Maintainer: Debian Mozilla Extension Maintainers <pkg-mozext-maintainers at lists.alioth.debian.org>
-Uploaders: Fabrizio Regalli <fabreg at fabreg.it>
-Build-Depends: debhelper (>= 8), mozilla-devscripts (>= 0.22~)
-Standards-Version: 3.9.2
-Homepage: https://addons.mozilla.org/en-US/firefox/addon/cookie-monster
-Vcs-git: git://git.debian.org/git/pkg-mozext/cookie-monster.git
-Vcs-Browser: http://git.debian.org/?p=pkg-mozext/cookie-monster.git;a=summary
-
-Package: xul-ext-cookie-monster
-Architecture: all
-Depends: ${misc:Depends}, ${xpi:Depends}
-Recommends: ${xpi:Recommends}
-Provides: ${xpi:Provides}
-Enhances: ${xpi:Enhances}
-Description: makes it very easy to manage cookies in a whitelist-based way
- Cookie Monster features fine-grained temporary or
- permanent domain, website and/or subdomains whitelisting
- in the website and/or subdomains whitelisting in the same way the
- NoScript extension does for scripts. For added ease of use, its
- user interface is similar to the NoScript extension's one.
diff --git a/debian/copyright b/debian/copyright
deleted file mode 100644
index 965ec2b..0000000
--- a/debian/copyright
+++ /dev/null
@@ -1,42 +0,0 @@
-Format-Specification: http://dep.debian.net/deps/dep5/
-Upstream-Name: Cookie Monster
-Upstream-Contact: Tony Schilling
-Source: https://addons.mozilla.org/en-US/firefox/addon/cookie-monster/
-
-Files: *
-Copyright: 2007, Tony Schilling
-License: MPL-1.1 or GPL-2+ or LGPL-2.1+
-
-Files: debian/*
-Copyright: 2011, Fabrizio Regalli <fabreg at fabreg.it>
-License: MPL-1.1 or GPL-2+ or LGPL-2.1+
-
-License: MPL-1.1 or GPL-2+ or LGPL-2.1+
- The contents of this file are subject to the Mozilla Public License
- Version 1.1 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
- .
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- License for the specific language governing rights and limitations
- under the License.
- .
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
- .
- On Debian systems the full text of the GNU General Public License Version 2
- can be found in the `/usr/share/common-licenses/GPL-2' file.
- On Debian systems the full text of the GNU Lesser General Public License
- Version 2.1 can be found in the `/usr/share/common-licenses/LGPL-2.1' file.
- The full text of the MPL is in the same directory as this file with the
- filename MPL and may be compressed.
diff --git a/debian/rules b/debian/rules
deleted file mode 100755
index 6181980..0000000
--- a/debian/rules
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/make -f
-
-%:
- dh $@ --with xul-ext
-
-override_dh_auto_build:
- xpi-pack . xul-ext-cookie-monster.xpi
-
-override_dh_auto_install:
- install-xpi --remove-license-files xul-ext-cookie-monster.xpi
-
-override_dh_installchangelogs:
- dh_installchangelogs $(CURDIR)/debian/upstream-changelog
-
-override_dh_auto_clean:
- rm -f xul-ext-cookie-monster.xpi
diff --git a/debian/source/format b/debian/source/format
deleted file mode 100644
index 163aaf8..0000000
--- a/debian/source/format
+++ /dev/null
@@ -1 +0,0 @@
-3.0 (quilt)
diff --git a/debian/upstream-changelog b/debian/upstream-changelog
deleted file mode 100644
index 252d4d8..0000000
--- a/debian/upstream-changelog
+++ /dev/null
@@ -1,9 +0,0 @@
-Version 1.0.5 - 2010-10-19
-
-List of Updates:
- - Updated the View Cookie functionality to coincide with an update to a Firefox system chrome file
- - Changed code to hopefully reduce or eliminate the reported "Error: Components is not defined" errors
- - Updated the "Revoke All Temporarily" functionality to update the status icon and reload the page, if the option "Automatically Reload Affected Page When Cookie Permissions Change" is checked.
- - Fixed a couple of bugs
- - Performed initial testing with Firefox 4.0 Beta 6
- - Changed the maximum supported version to Firefox 4.0b8pre (the maximum currently defined)
diff --git a/debian/watch b/debian/watch
deleted file mode 100644
index a7e9d19..0000000
--- a/debian/watch
+++ /dev/null
@@ -1,2 +0,0 @@
-version=3
-ftp://ftp.mozilla.org/pub/mozilla.org/addons/4703/cookie_monster-([\d\.]+)-.*\.xpi debian xpi-repack
diff --git a/defaults/preferences/defaults.js b/defaults/preferences/defaults.js
deleted file mode 100644
index 11eda29..0000000
--- a/defaults/preferences/defaults.js
+++ /dev/null
@@ -1,9 +0,0 @@
-pref("extensions.cookiemonster.secondlevelurl", true);
-pref("extensions.cookiemonster.reloadonpermissionchange", true);
-pref("extensions.cookiemonster.enablecontextmenu", false);
-pref("extensions.cookiemonster.enableglobalcookieoverride", false);
-pref("extensions.cookiemonster.deletecookiesondeny", false);
-pref("extensions.cookiemonster.tempcookie", "");
-pref("extensions.cookiemonster.overrideglobal", "");
-pref("extensions.cookiemonster.disabledeletecookieconfirm", false);
-pref("extensions.cookiemonster.originaldefaulticon", false);
diff --git a/install.rdf b/install.rdf
deleted file mode 100644
index e197915..0000000
--- a/install.rdf
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0"?>
-
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:em="http://www.mozilla.org/2004/em-rdf#">
-
- <Description about="urn:mozilla:install-manifest">
- <em:id>{45d8ff86-d909-11db-9705-005056c00008}</em:id>
- <em:version>1.0.5</em:version>
- <em:type>2</em:type>
- <em:optionsURL>chrome://cookiemonster/content/options.xul</em:optionsURL>
- <!-- <em:iconURL>chrome://cookiemonster/skin/face-monkey.png</em:iconURL> -->
- <em:iconURL>chrome://cookiemonster/skin/cookie-monster-logo-bigger.png</em:iconURL>
-
- <!-- Target Application this extension can install into,
- with minimum and maximum supported versions. -->
- <em:targetApplication> <!-- Firefox -->
- <Description>
- <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
- <em:minVersion>3.5</em:minVersion>
- <em:maxVersion>4.0b8pre</em:maxVersion>
- </Description>
- </em:targetApplication>
-
- <em:targetApplication> <!-- Flock -->
- <Description>
- <em:id>{a463f10c-3994-11da-9945-000d60ca027b}</em:id>
- <em:minVersion>0.7.0</em:minVersion>
- <em:maxVersion>1.5</em:maxVersion>
- </Description>
- </em:targetApplication>
-
- <em:targetApplication> <!-- Netscape -->
- <Description>
- <em:id>{3db10fab-e461-4c80-8b97-957ad5f8ea47}</em:id>
- <em:minVersion>9.0b1</em:minVersion>
- <em:maxVersion>9.0</em:maxVersion>
- </Description>
- </em:targetApplication>
-
- <!-- Front End MetaData -->
- <em:name>Cookie Monster</em:name>
- <em:description>Help with Cookie Management, especially when you reject cookies by default</em:description>
- <em:creator>Tony Schilling</em:creator>
- <em:translator>Olivier Atton</em:translator>
- <em:translator>Alexander Krickl</em:translator>
- <em:translator>Cheng-Wei Chien</em:translator>
- <em:contributor>Jane Ocean</em:contributor>
- <em:homepageURL>http://forum.addonsmirror.net/index.php?showtopic=6599</em:homepageURL>
-
- <!-- Localizations -->
- <em:localized>
- <Description>
- <em:locale>de-DE</em:locale>
- <em:name>Cookie Monster</em:name>
- <em:description>Hilfe bei der Cookieverwaltung, besonders wenn Cookies standardmäßig abgelehnt werden</em:description>
- </Description>
- </em:localized>
- <em:localized>
- <Description>
- <em:locale>fr-FR</em:locale>
- <em:name>Cookie Monster</em:name>
- <em:description>Aide à la gestion des Cookies, notamment lorsque vous les rejetez par défaut</em:description>
- </Description>
- </em:localized>
- <em:localized>
- <Description>
- <em:locale>zh-TW</em:locale>
- <em:name>Cookie Monster</em:name>
- <em:description>管理 Cookie 的好幫手,尤其是您預設為拒絕 cookies 時</em:description>
- </Description>
- </em:localized>
- </Description>
-</RDF>
--
Cookie Monster extension for Iceweasel/Firefox
More information about the Pkg-mozext-commits
mailing list