diff --git a/mozilla/xpfe/components/directory/directory.html b/mozilla/xpfe/components/directory/directory.html deleted file mode 100644 index 2110713444e..00000000000 --- a/mozilla/xpfe/components/directory/directory.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - - -
- - diff --git a/mozilla/xpfe/components/directory/directory.js b/mozilla/xpfe/components/directory/directory.js deleted file mode 100644 index a5fc41ac7c8..00000000000 --- a/mozilla/xpfe/components/directory/directory.js +++ /dev/null @@ -1,323 +0,0 @@ -/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/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. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Bradley Baetz - * Joe Hewitt - * - * Alternatively, the contents of this file may be used under the terms of - * either of 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. - * - * ***** END LICENSE BLOCK ***** */ - -/* - Script for the directory window -*/ - -const RDFSERVICE_CONTRACTID = "@mozilla.org/rdf/rdf-service;1"; -const DRAGSERVICE_CONTRACTID = "@mozilla.org/widget/dragservice;1"; -const TRANSFERABLE_CONTRACTID = "@mozilla.org/widget/transferable;1"; -const XULSORTSERVICE_CONTRACTID = "@mozilla.org/xul/xul-sort-service;1"; -const ARRAY_CONTRACTID = "@mozilla.org/supports-array;1"; -const WSTRING_CONTRACTID = "@mozilla.org/supports-string;1"; - -const NC_NS = "http://home.netscape.com/NC-rdf#"; -const NC_NAME = NC_NS + "Name"; -const NC_URL = NC_NS + "URL"; -const NC_LOADING = NC_NS + "loading"; - -const nsIHTTPIndex = Components.interfaces.nsIHTTPIndex; -const nsIDragService = Components.interfaces.nsIDragService; -const nsITransferable = Components.interfaces.nsITransferable; -const nsIXULSortService = Components.interfaces.nsIXULSortService; -const nsIRDFService = Components.interfaces.nsIRDFService; -const nsIRDFLiteral = Components.interfaces.nsIRDFLiteral; -const nsISupportsArray = Components.interfaces.nsISupportsArray; -const nsISupportsString = Components.interfaces.nsISupportsString; - -// By the time this runs, The 'HTTPIndex' variable will have been -// magically set on the global object by the native code. - -function debug(msg) -{ - // Uncomment to print out debug info. - //dump(msg); -} - -var loadingArc = null; -var loadingLevel = 0; - -var RDF_observer = -{ - onAssert: function(ds, src, prop, target) - { - if (prop == loadingArc) { - if (loadingLevel++ == 0) - SetBusyCursor(window, true); - debug("Directory: assert: loading level is " + loadingLevel + " for " + src.Value + "\n"); - } - }, - - onUnassert: function(ds, src, prop, target) - { - if (prop == loadingArc) { - if (loadingLevel > 0) - if (--loadingLevel == 0) - SetBusyCursor(window, false); - debug("Directory: unassert: loading level is " + loadingLevel + " for " + src.Value + "\n"); - } - }, - - onChange: function(ds, src, prop, old_target, new_target) { }, - onMove: function(ds, old_src, new_src, prop, target) { }, - onBeginUpdateBatch: function(ds) { }, - onEndUpdateBatch: function(ds) { } -}; - -function -SetBusyCursor(window, enable) -{ - // Defensive check: setCursor() is only available for - // chrome windows. Since one of our frame might be a - // non-chrome window, make sure the window we treat has - // a setCursor method. - if("setCursor" in window) { - if(enable == true) { - window.setCursor("wait"); - debug("Directory: cursor=busy\n"); - } else { - window.setCursor("auto"); - debug("Directory: cursor=notbusy\n"); - } - } - - var numFrames = window.frames.length; - for (var i = 0; i < numFrames; i++) - SetBusyCursor(window.frames[i], enable); -} - -// We need this hack because we've completely circumvented the onload() logic. -function Boot() -{ - if (document.getElementById('tree')) - Init(); - else - setTimeout("Boot()", 500); -} - -setTimeout("Boot()", 0); - -function Init() -{ - debug("directory.js: Init()\n"); - - var tree = document.getElementById('tree'); - - // Initialize the tree's base URL to whatever the HTTPIndex is rooted at - var baseURI = HTTPIndex.BaseURL; - - if (baseURI && (baseURI.indexOf("ftp://") == 0)) { - // fix bug # 37102: if its a FTP directory - // ensure it ends with a trailing slash - if (baseURI.substr(baseURI.length - 1) != "/") { - debug("append traiing slash to FTP directory URL\n"); - baseURI += "/"; - } - - // Lets also enable the loggin window. - - var node = document.getElementById("main-splitter"); - node.setAttribute("hidden", false); - - node = document.getElementById("logbox"); - node.setAttribute("hidden", false); - } - - if (baseURI && (baseURI.indexOf("file://") != 0)) { - // Note: DON'T add the HTTPIndex datasource into the tree - // for file URLs, only do it for FTP/Gopher/etc URLs; the "rdf:files" - // datasources handles file URLs - tree.database.AddDataSource(HTTPIndex); - } - - // Note: set encoding BEFORE setting "ref" (important!) - var RDF = Components.classes[RDFSERVICE_CONTRACTID].getService(); - if (RDF) RDF = RDF.QueryInterface(nsIRDFService); - if (RDF) { - loadingArc = RDF.GetResource(NC_LOADING, true); - - var httpDS = HTTPIndex.DataSource; - if (httpDS) httpDS = httpDS.QueryInterface(nsIHTTPIndex); - if (httpDS) { - httpDS.encoding = "ISO-8859-1"; - - // Use a default character set. - if (window.content.defaultCharacterset) - httpDS.encoding = window.content.defaultCharacterset; - } - } - - // set window title - document.title = baseURI; - - tree.database.AddObserver(RDF_observer); - debug("Directory: added observer\n"); - - // root the tree (do this last) - tree.setAttribute("ref", baseURI); -} - -function DoUnload() -{ - var tree = document.getElementById("tree"); - if (tree) { - tree.database.RemoveDataSource(HTTPIndex); - tree.database.RemoveObserver(RDF_observer); - debug("Directory: removed observer\n"); - } -} - -function OnClick(event) -{ - if (event.target.localName != "treechildren") - return false; - if( event.type == "click" && (event.button != 0 || event.detail != 2)) - return false; - if( event.type == "keypress" && event.keyCode != 13) - return false; - - var tree = document.getElementById("tree"); - if (tree.currentIndex >= 0) { - var item = tree.contentView.getItemAtIndex(tree.currentIndex); - window.content.location.href = item.getAttributeNS(NC_NS, "url"); - } -} - -function doSort(aTarget) -{ - if (aTarget.localName != "treecol") - return; - - // determine column resource to sort on - var sortResource = aTarget.getAttribute('resource'); - - // switch between ascending & descending sort (no natural order support) - var sortDirection = aTarget.getAttribute("sortDirection") == "ascending" ? "descending" : "ascending"; - - try { - var sortService = Components.classes[XULSORTSERVICE_CONTRACTID].getService(nsIXULSortService); - sortService.sort(aTarget, sortResource, sortDirection); - } catch(ex) { } -} - -function BeginDragTree (event) -{ - if (event.target.localName != "treechildren") - return true; - - var dragStarted = false; - - try { - // determine which treeitem was dragged - var tree = document.getElementById("tree"); - var row = tree.treeBoxObject.getRowAt(event.clientX, event.clientY); - var item = tree.contentView.getItemAtIndex(row); - - // get information from treeitem for drag - var url = item.getAttributeNS(NC_NS, "url"); - var desc = item.getAttributeNS(NC_NS, "desc"); - - var RDF = Components.classes[RDFSERVICE_CONTRACTID].getService(nsIRDFService); - var transferable = - Components.classes[TRANSFERABLE_CONTRACTID].createInstance(nsITransferable); - var genDataURL = - Components.classes[WSTRING_CONTRACTID].createInstance(nsISupportsString); - var genDataHTML = - Components.classes[WSTRING_CONTRACTID].createInstance(nsISupportsString); - var genData = - Components.classes[WSTRING_CONTRACTID].createInstance(nsISupportsString); - var genDataURL = - Components.classes[WSTRING_CONTRACTID].createInstance(nsISupportsString); - - transferable.addDataFlavor("text/x-moz-url"); - transferable.addDataFlavor("text/html"); - transferable.addDataFlavor("text/unicode"); - - genDataURL.data = url + "\n" + desc; - genDataHTML.data = "" + desc + ""; - genData.data = url; - - transferable.setTransferData("text/x-moz-url", genDataURL, genDataURL.data.length * 2); - transferable.setTransferData("text/html", genDataHTML, genDataHTML.data.length * 2); - transferable.setTransferData("text/unicode", genData, genData.data.length * 2); - - var transArray = - Components.classes[ARRAY_CONTRACTID].createInstance(nsISupportsArray); - - // put it into the transferable as an |nsISupports| - var genTrans = transferable.QueryInterface(Components.interfaces.nsISupports); - transArray.AppendElement(genTrans); - - var dragService = - Components.classes[DRAGSERVICE_CONTRACTID].getService(nsIDragService); - - dragService.invokeDragSession(event.target, transArray, null, nsIDragService.DRAGDROP_ACTION_COPY + - nsIDragService.DRAGDROP_ACTION_MOVE); - - dragStarted = true; - } catch (ex) { } - - return !dragStarted; -} - -function scrollDown() -{ - window.frames[0].scrollTo(0, window.frames[0].document.height); -} - -function OnFTPControlLog( server, msg ) -{ - var logdoc = frames[0].document; - var logdocDiv = logdoc.getElementById("logboxDiv"); - var div = document.createElementNS("http://www.w3.org/1999/xhtml", - "html:div"); - - if (server) - div.setAttribute("class", "server"); - else - div.setAttribute("class", "client"); - - div.appendChild (document.createTextNode(msg)); - - logdocDiv.appendChild(div); - - scrollDown(); -} - diff --git a/mozilla/xpfe/components/directory/directory.xul b/mozilla/xpfe/components/directory/directory.xul deleted file mode 100644 index 02a54530b2a..00000000000 --- a/mozilla/xpfe/components/directory/directory.xul +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - &popupDesc.label; - &popupDescAlt.label; - - - - &popupNote1.label; - - &popupNote2.label; - diff --git a/mozilla/xpfe/components/permissions/content/cookieP3P.xul b/mozilla/xpfe/components/permissions/content/cookieP3P.xul deleted file mode 100644 index ce6c6a484ad..00000000000 --- a/mozilla/xpfe/components/permissions/content/cookieP3P.xul +++ /dev/null @@ -1,262 +0,0 @@ - - - - - - - - - - - - - - - - - &p3pDetails; - - &choose; - - - - - - - - - - - - - - - - - - - - - - &firstParty.label; - &thirdParty.label; - - - &noPolicy.label; - - - - - - - - - - - - - - - - - - - &noConsent.label; - - - - - - - - - - - - - - - - - - - &implicitConsent.label; - - - - - - - - - - - - - - - - - - - &explicitConsent.label; - - - - - - - - - - - - - - - - - - - - - - diff --git a/mozilla/xpfe/components/permissions/content/cookieP3PDialog.xul b/mozilla/xpfe/components/permissions/content/cookieP3PDialog.xul deleted file mode 100644 index a092f5874bd..00000000000 --- a/mozilla/xpfe/components/permissions/content/cookieP3PDialog.xul +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - &p3pDialogMessage1.label; - - - - - - - - - - &p3pDialogMessage2.label; - diff --git a/mozilla/xpfe/components/permissions/content/cookieTasksOverlay.xul b/mozilla/xpfe/components/permissions/content/cookieTasksOverlay.xul deleted file mode 100644 index 784e906e99f..00000000000 --- a/mozilla/xpfe/components/permissions/content/cookieTasksOverlay.xul +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/mozilla/xpfe/components/permissions/content/cookieViewer.js b/mozilla/xpfe/components/permissions/content/cookieViewer.js deleted file mode 100644 index d8bd00a6bdf..00000000000 --- a/mozilla/xpfe/components/permissions/content/cookieViewer.js +++ /dev/null @@ -1,722 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/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. - * - * 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 the Initial Developer are Copyright (C) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Ben Goodger - * - * 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. - * - * ***** END LICENSE BLOCK ***** */ - -var kObserverService; - -// interface variables -var cookiemanager = null; // cookiemanager interface -var permissionmanager = null; // permissionmanager interface -var promptservice = null; // promptservice interface -var popupmanager = null; // popup manager -var gDateService = null; - -// cookies and permissions list -var cookies = []; -var permissions = []; -var deletedCookies = []; -var deletedPermissions = []; - -// differentiate between cookies, images, and popups -const nsIPermissionManager = Components.interfaces.nsIPermissionManager; -const nsICookiePermission = Components.interfaces.nsICookiePermission; -const cookieType = "cookie"; -const imageType = "image"; -const popupType = "popup"; - - -var dialogType = cookieType; -if (window.arguments[0] == "imageManager") - dialogType = imageType; -else if (window.arguments[0] == "popupManager") - dialogType = popupType; - -var cookieBundle; -var gUpdatingBatch = ""; - -function Startup() { - - // arguments passed to this routine: - // cookieManager - // cookieManagerFromIcon - // imageManager - - // xpconnect to cookiemanager/permissionmanager/promptservice/popupmanager interfaces - cookiemanager = Components.classes["@mozilla.org/cookiemanager;1"].getService(); - cookiemanager = cookiemanager.QueryInterface(Components.interfaces.nsICookieManager); - permissionmanager = Components.classes["@mozilla.org/permissionmanager;1"].getService(); - permissionmanager = permissionmanager.QueryInterface(Components.interfaces.nsIPermissionManager); - promptservice = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(); - promptservice = promptservice.QueryInterface(Components.interfaces.nsIPromptService); - popupmanager = Components.classes["@mozilla.org/PopupWindowManager;1"].getService(); - popupmanager = popupmanager.QueryInterface(Components.interfaces.nsIPopupWindowManager); - - // intialize gDateService - if (!gDateService) { - const nsScriptableDateFormat_CONTRACTID = "@mozilla.org/intl/scriptabledateformat;1"; - const nsIScriptableDateFormat = Components.interfaces.nsIScriptableDateFormat; - gDateService = Components.classes[nsScriptableDateFormat_CONTRACTID] - .getService(nsIScriptableDateFormat); - } - - // intialize string bundle - cookieBundle = document.getElementById("cookieBundle"); - - // label the close button - document.documentElement.getButton("accept").label = cookieBundle.getString("close"); - - // determine if labelling is for cookies or images - try { - var tabBox = document.getElementById("tabbox"); - var element; - if (dialogType == cookieType) { - element = document.getElementById("cookiesTab"); - tabBox.selectedTab = element; - } else if (dialogType == imageType) { - document.title = cookieBundle.getString("imageTitle"); - - element = document.getElementById("permissionsTab"); - element.label = cookieBundle.getString("tabBannedImages"); - tabBox.selectedTab = element; - - element = document.getElementById("permissionsText"); - element.value = cookieBundle.getString("textBannedImages"); - - // Hide a dummy vbox inside the real box - // If the actual box is hidden, the tabbox gets confused. - // The first tab now controls the second panel. - // Hiding the first tab doesn't help. - document.getElementById("dummyContainer").hidden = "true"; - document.getElementById("cookiesTab").hidden = "true"; - - element = document.getElementById("btnSession"); - element.hidden = "true"; - } else { - document.title = cookieBundle.getString("popupTitle"); - - element = document.getElementById("permissionsTab"); - element.label = cookieBundle.getString("tabBannedPopups"); - tabBox.selectedTab = element; - - element = document.getElementById("permissionsText"); - element.value = cookieBundle.getString("textBannedPopups"); - - document.getElementById("dummyContainer").hidden = "true"; - document.getElementById("cookiesTab").hidden = "true"; - } - } catch(e) { - } - // load in the cookies and permissions - cookiesTree = document.getElementById("cookiesTree"); - permissionsTree = document.getElementById("permissionsTree"); - if (dialogType == cookieType) { - loadCookies(); - } - loadPermissions(); - - // be prepared to reload the display if anything changes - kObserverService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService); - kObserverService.addObserver(cookieReloadDisplay, "cookie-changed", false); - kObserverService.addObserver(cookieReloadDisplay, "perm-changed", false); -} - -function Shutdown() { - kObserverService.removeObserver(cookieReloadDisplay, "cookie-changed"); - kObserverService.removeObserver(cookieReloadDisplay, "perm-changed"); -} - -var cookieReloadDisplay = { - observe: function(subject, topic, state) { - if (topic == gUpdatingBatch) - return; - if (topic == "cookie-changed") { - cookies.length = 0; - if (lastCookieSortColumn == "rawHost") { - lastCookieSortAscending = !lastCookieSortAscending; // prevents sort from being reversed - } - loadCookies(); - } else if (topic == "perm-changed") { - permissions.length = 0; - if (lastPermissionSortColumn == "rawHost") { - lastPermissionSortAscending = !lastPermissionSortAscending; // prevents sort from being reversed - } - loadPermissions(); - } - } -} - -/*** =================== COOKIES CODE =================== ***/ - -const nsICookie = Components.interfaces.nsICookie; - -var cookiesTreeView = { - rowCount : 0, - setTree : function(tree){}, - getImageSrc : function(row,column) {}, - getProgressMode : function(row,column) {}, - getCellValue : function(row,column) {}, - getCellText : function(row,column){ - var rv=""; - switch (column.id) { - case "domainCol": - rv = cookies[row].rawHost; - break; - case "nameCol": - rv = cookies[row].name; - break; - case "statusCol": - rv = cookies[row].status; - break; - case "expiresCol": - rv = cookies[row].expires; - break; - } - return rv; - }, - isSeparator : function(index) {return false;}, - isSorted: function() { return false; }, - isContainer : function(index) {return false;}, - cycleHeader : function(aCol) {}, - getRowProperties : function(row,prop) {}, - getColumnProperties : function(column,prop) {}, - getCellProperties : function(row,column,prop) {} - }; -var cookiesTree; - -function Cookie(id,name,value,isDomain,host,rawHost,path,isSecure,expires, - status,policy) { - this.id = id; - this.name = name; - this.value = value; - this.isDomain = isDomain; - this.host = host; - this.rawHost = rawHost; - this.path = path; - this.isSecure = isSecure; - this.expires = GetExpiresString(expires); - this.expiresSortValue = expires; - this.status = GetStatusString(status); - this.policy = policy; -} - -function loadCookies() { - // load cookies into a table - var enumerator = cookiemanager.enumerator; - var count = 0; - var showPolicyField = false; - while (enumerator.hasMoreElements()) { - var nextCookie = enumerator.getNext(); - if (!nextCookie) break; - nextCookie = nextCookie.QueryInterface(Components.interfaces.nsICookie); - var host = nextCookie.host; - if (nextCookie.policy != nsICookie.POLICY_UNKNOWN) { - showPolicyField = true; - } - cookies[count] = - new Cookie(count++, nextCookie.name, nextCookie.value, nextCookie.isDomain, host, - (host.charAt(0)==".") ? host.substring(1,host.length) : host, - nextCookie.path, nextCookie.isSecure, nextCookie.expires, - nextCookie.status, nextCookie.policy); - } - cookiesTreeView.rowCount = cookies.length; - - // sort and display the table - cookiesTree.treeBoxObject.view = cookiesTreeView; - if (window.arguments[0] == "cookieManagerFromIcon") { // came here by clicking on cookie icon - - // turn off the icon - var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService); - observerService.notifyObservers(null, "cookieIcon", "off"); - - // unhide the status column and sort by reverse order on that column - // Note that the sort routine normally does an ascending sort. The only - // exception is if you sort on the same column more than once in a row. - // In that case, the subsequent sorts will be the reverse of the previous ones. - // So we are now going to force an initial reverse sort by fooling the sort routine - // into thinking that it previously sorted on the status column and in ascending - // order. - document.getElementById("statusCol").removeAttribute("hidden"); - lastCookieSortAscending = true; // force order to have blanks last instead of vice versa - lastCookieSortColumn = 'status'; - CookieColumnSort('status'); - - } else { - // sort by host column - CookieColumnSort('rawHost'); - } - - // disable "remove all cookies" button if there are no cookies - if (cookies.length == 0) { - document.getElementById("removeAllCookies").setAttribute("disabled","true"); - } else { - document.getElementById("removeAllCookies").removeAttribute("disabled"); - } - - // show policy field if at least one cookie has a policy - if (showPolicyField) { - document.getElementById("policyField").removeAttribute("hidden"); - } -} - -function GetExpiresString(expires) { - if (expires) { - var date = new Date(1000*expires); - - // if a server manages to set a really long-lived cookie, the dateservice - // can't cope with it properly, so we'll just return a blank string - // see bug 238045 for details - var expiry = ""; - try { - expiry = gDateService.FormatDateTime("", gDateService.dateFormatLong, - gDateService.timeFormatSeconds, - date.getFullYear(), date.getMonth()+1, - date.getDate(), date.getHours(), - date.getMinutes(), date.getSeconds()); - } catch(ex) { - // do nothing - } - return expiry; - } - return cookieBundle.getString("AtEndOfSession"); -} - -function GetStatusString(status) { - switch (status) { - case nsICookie.STATUS_ACCEPTED: - return cookieBundle.getString("accepted"); - case nsICookie.STATUS_FLAGGED: - return cookieBundle.getString("flagged"); - case nsICookie.STATUS_DOWNGRADED: - return cookieBundle.getString("downgraded"); - } - return ""; -} - -function GetPolicyString(policy) { - switch (policy) { - case nsICookie.POLICY_NONE: - return cookieBundle.getString("policyUnstated"); - case nsICookie.POLICY_NO_CONSENT: - return cookieBundle.getString("policyNoConsent"); - case nsICookie.POLICY_IMPLICIT_CONSENT: - return cookieBundle.getString("policyImplicitConsent"); - case nsICookie.POLICY_EXPLICIT_CONSENT: - return cookieBundle.getString("policyExplicitConsent"); - case nsICookie.POLICY_NO_II: - return cookieBundle.getString("policyNoIICollected"); - } - return ""; -} - -function CookieSelected() { - var selections = GetTreeSelections(cookiesTree); - if (selections.length) { - document.getElementById("removeCookie").removeAttribute("disabled"); - } else { - document.getElementById("removeCookie").setAttribute("disabled", "true"); - ClearCookieProperties(); - return true; - } - - var idx = selections[0]; - if (idx >= cookies.length) { - // Something got out of synch. See bug 119812 for details - dump("Tree and viewer state are out of sync! " + - "Help us figure out the problem in bug 119812"); - return false; - } - - var props = [ - {id: "ifl_name", value: cookies[idx].name}, - {id: "ifl_value", value: cookies[idx].value}, - {id: "ifl_isDomain", - value: cookies[idx].isDomain ? - cookieBundle.getString("domainColon") : cookieBundle.getString("hostColon")}, - {id: "ifl_host", value: cookies[idx].host}, - {id: "ifl_path", value: cookies[idx].path}, - {id: "ifl_isSecure", - value: cookies[idx].isSecure ? - cookieBundle.getString("forSecureOnly") : - cookieBundle.getString("forAnyConnection")}, - {id: "ifl_expires", value: cookies[idx].expires}, - {id: "ifl_policy", value: GetPolicyString(cookies[idx].policy)} - ]; - - var value; - var field; - for (var i = 0; i < props.length; i++) - { - field = document.getElementById(props[i].id); - if ((selections.length > 1) && (props[i].id != "ifl_isDomain")) { - value = ""; // clear field if multiple selections - } else { - value = props[i].value; - } - field.value = value; - } - return true; -} - -function ClearCookieProperties() { - var properties = - ["ifl_name","ifl_value","ifl_host","ifl_path","ifl_isSecure","ifl_expires","ifl_policy"]; - for (var prop=0; prop - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/mozilla/xpfe/components/permissions/content/permissionsManager.js b/mozilla/xpfe/components/permissions/content/permissionsManager.js deleted file mode 100644 index 81fe5622adc..00000000000 --- a/mozilla/xpfe/components/permissions/content/permissionsManager.js +++ /dev/null @@ -1,356 +0,0 @@ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/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. - * - * The Original Code is Mozilla Communicator client code. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 2002 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Ben Goodger - * Blake Ross - * Ian Neal (iann_bugzilla@arlen.demon.co.uk) - * - * Alternatively, the contents of this file may be used under the terms of - * either of 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. - * - * ***** END LICENSE BLOCK ***** */ - -const nsIPermissionManager = Components.interfaces.nsIPermissionManager; -const nsICookiePermission = Components.interfaces.nsICookiePermission; - -var permissionManager; - -var additions = []; -var removals = []; - -var sortColumn; -var sortAscending; - -var permissionsTreeView = { - rowCount: 0, - setTree: function(tree) {}, - getImageSrc: function(row, column) {}, - getProgressMode: function(row, column) {}, - getCellValue: function(row, column) {}, - getCellText: function(row, column) { - if (column.id == "siteCol") - return additions[row].rawHost; - else if (column.id == "statusCol") - return additions[row].capability; - return ""; - }, - isSeparator: function(index) { return false; }, - isSorted: function() { return false; }, - isContainer: function(index) { return false; }, - cycleHeader: function(column) {}, - getRowProperties: function(row, column, prop) {}, - getColumnProperties: function(column, prop) {}, - getCellProperties: function(row, column, prop) {} - }; - -var permissionsTree; -var permissionType = "popup"; - -var permissionsBundle; - -function Startup() { - permissionManager = Components.classes["@mozilla.org/permissionmanager;1"] - .getService(nsIPermissionManager); - - permissionsTree = document.getElementById("permissionsTree"); - - permissionsBundle = document.getElementById("permissionsBundle"); - - sortAscending = (permissionsTree.getAttribute("sortAscending") == "true"); - sortColumn = permissionsTree.getAttribute("sortColumn"); - - if (window.arguments && window.arguments[0]) { - document.getElementById("btnBlock").hidden = !window.arguments[0].blockVisible; - document.getElementById("btnSession").hidden = !window.arguments[0].sessionVisible; - document.getElementById("btnAllow").hidden = !window.arguments[0].allowVisible; - setHost(window.arguments[0].prefilledHost); - permissionType = window.arguments[0].permissionType; - } - - var introString = permissionsBundle.getString(permissionType + "permissionstext"); - document.getElementById("permissionsText").textContent = introString; - - document.title = permissionsBundle.getString(permissionType + "permissionstitle"); - - var dialogElement = document.getElementById("permissionsManager"); - dialogElement.setAttribute("windowtype", "permissions-" + permissionType); - - if (permissionManager) { - handleHostInput(document.getElementById("url")); - loadPermissions(); - } - else { - btnDisable(true); - document.getElementById("removeAllPermissions").disabled = true; - document.getElementById("url").disabled = true; - document.documentElement.getButton("accept").disabled = true; - } -} - -function onAccept() { - finalizeChanges(); - - permissionsTree.setAttribute("sortAscending", !sortAscending); - permissionsTree.setAttribute("sortColumn", sortColumn); - - if (permissionType != "popup") - return true; - - var unblocked = additions; - var windowMediator = Components.classes['@mozilla.org/appshell/window-mediator;1'] - .getService(Components.interfaces.nsIWindowMediator); - var enumerator = windowMediator.getEnumerator("navigator:browser"); - - //if a site that is currently open is unblocked, make icon go away - while (enumerator.hasMoreElements()) { - var win = enumerator.getNext(); - - var browsers = win.getBrowser().browsers; - for (var i in browsers) { - var nextLocation; - try { - nextLocation = browsers[i].currentURI.hostPort; - } - catch(ex) { - nextLocation = null; //blank window - } - - if (nextLocation) { - nextLocation = '.'+nextLocation; - for (var j in unblocked) { - var nextUnblocked = '.'+unblocked[j]; - - if (nextUnblocked.length > nextLocation.length) - continue; // can't be a match - - if (nextUnblocked == - nextLocation.substr(nextLocation.length - nextUnblocked.length)) { - browsers[i].popupDomain = null; - win.document.getElementById("popupIcon").hidden = true; - } - } - } - } - } - - return true; -} - -function setHost(aHost) { - document.getElementById("url").value = aHost; -} - -function Permission(id, host, rawHost, type, capability, perm) { - this.id = id; - this.host = host; - this.rawHost = rawHost; - this.type = type; - this.capability = capability; - this.perm = perm; -} - -function handleHostInput(aSiteField) { - // trim any leading and trailing spaces and scheme - // and set buttons appropiately - btnDisable(!trimSpacesAndScheme(aSiteField.value)); -} - -function trimSpacesAndScheme(aString) { - if (!aString) - return ""; - return aString.replace(/(^\s+)|(\s+$)/g, "") - .replace(/([-\w]*:\/+)?/, ""); -} - -function btnDisable(aDisabled) { - document.getElementById("btnSession").disabled = aDisabled; - document.getElementById("btnBlock").disabled = aDisabled; - document.getElementById("btnAllow").disabled = aDisabled; -} - -function loadPermissions() { - var enumerator = permissionManager.enumerator; - var count = 0; - var permission; - - try { - while (enumerator.hasMoreElements()) { - permission = enumerator.getNext().QueryInterface(Components.interfaces.nsIPermission); - if (permission.type == permissionType) - permissionPush(count++, permission.host, permission.type, - capabilityString(permission.capability), permission.capability); - } - } catch(ex) { - } - - permissionsTreeView.rowCount = additions.length; - - // sort and display the table - permissionsTree.treeBoxObject.view = permissionsTreeView; - permissionColumnSort(sortColumn, false); - - // disable "remove all" button if there are none - document.getElementById("removeAllPermissions").disabled = additions.length == 0; -} - -function capabilityString(aCapability) { - var capability = null; - switch (aCapability) { - case nsIPermissionManager.ALLOW_ACTION: - capability = "can"; - break; - case nsIPermissionManager.DENY_ACTION: - capability = "cannot"; - break; - // we should only ever hit this for cookies - case nsICookiePermission.ACCESS_SESSION: - capability = "canSession"; - break; - default: - break; - } - return permissionsBundle.getString(capability); -} - -function permissionPush(aId, aHost, aType, aString, aCapability) { - var rawHost = (aHost.charAt(0) == ".") ? aHost.substring(1, aHost.length) : aHost; - var p = new Permission(aId, aHost, rawHost, aType, aString, aCapability); - additions.push(p); -} - -function permissionColumnSort(aColumn, aUpdateSelection) { - sortAscending = - SortTree(permissionsTree, permissionsTreeView, additions, - aColumn, sortColumn, sortAscending, aUpdateSelection); - sortColumn = aColumn; -} - -function permissionSelected() { - if (permissionManager) { - var selections = GetTreeSelections(permissionsTree); - document.getElementById("removePermission").disabled = (selections.length < 1); - } -} - -function deletePermissions() { - DeleteSelectedItemFromTree(permissionsTree, permissionsTreeView, additions, removals, - "removePermission", "removeAllPermissions"); -} - -function deleteAllPermissions() { - DeleteAllFromTree(permissionsTree, permissionsTreeView, additions, removals, - "removePermission", "removeAllPermissions"); -} - -function finalizeChanges() { - var ioService = Components.classes["@mozilla.org/network/io-service;1"] - .getService(Components.interfaces.nsIIOService); - var i, p; - - for (i in removals) { - p = removals[i]; - try { - permissionManager.remove(p.host, p.type); - } catch(ex) { - } - } - - for (i in additions) { - p = additions[i]; - try { - var uri = ioService.newURI("http://" + p.host, null, null); - permissionManager.add(uri, p.type, p.perm); - } catch(ex) { - } - } -} - -function handlePermissionKeyPress(e) { - if (e.keyCode == 46) { - deletePermissions(); - } -} - -function addPermission(aPermission) { - var textbox = document.getElementById("url"); - // trim any leading and trailing spaces and scheme - var host = trimSpacesAndScheme(textbox.value); - try { - var ioService = Components.classes["@mozilla.org/network/io-service;1"] - .getService(Components.interfaces.nsIIOService); - var uri = ioService.newURI("http://" + host, null, null); - host = uri.host; - } catch(ex) { - var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] - .getService(Components.interfaces.nsIPromptService); - var message = permissionsBundle.getFormattedString("alertInvalid", [host]); - var title = permissionsBundle.getString("alertInvalidTitle"); - promptService.alert(window, title, message); - textbox.value = ""; - textbox.focus(); - handleHostInput(textbox); - return; - } - - // we need this whether the perm exists or not - var stringCapability = capabilityString(aPermission); - - // check whether the permission already exists, if not, add it - var exists = false; - for (var i in additions) { - if (additions[i].rawHost == host) { - exists = true; - additions[i].capability = stringCapability; - additions[i].perm = aPermission; - break; - } - } - - if (!exists) { - permissionPush(additions.length, host, permissionType, stringCapability, aPermission); - - permissionsTreeView.rowCount = additions.length; - permissionsTree.treeBoxObject.rowCountChanged(additions.length - 1, 1); - permissionsTree.treeBoxObject.ensureRowIsVisible(additions.length - 1); - } - textbox.value = ""; - textbox.focus(); - - // covers a case where the site exists already, so the buttons don't disable - handleHostInput(textbox); - - // enable "remove all" button as needed - document.getElementById("removeAllPermissions").disabled = additions.length == 0; -} - -function doHelpButton() { - openHelp(permissionsBundle.getString(permissionType + "permissionshelp")); - return true; -} diff --git a/mozilla/xpfe/components/permissions/content/permissionsManager.xul b/mozilla/xpfe/components/permissions/content/permissionsManager.xul deleted file mode 100644 index 28a963e50a5..00000000000 --- a/mozilla/xpfe/components/permissions/content/permissionsManager.xul +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/mozilla/xpfe/components/permissions/content/permissionsOverlay.js b/mozilla/xpfe/components/permissions/content/permissionsOverlay.js deleted file mode 100644 index 7363c6bdd74..00000000000 --- a/mozilla/xpfe/components/permissions/content/permissionsOverlay.js +++ /dev/null @@ -1,98 +0,0 @@ -/* -*- Mode: Java; tab-width: 4; c-basic-offset: 4; -*- - * - * ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/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. - * - * The Original Code is mozilla.org Code. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Neil Rashbrook - * - * 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. - * - * ***** END LICENSE BLOCK ***** */ - -function openCookieViewer(viewerType) -{ - const wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] - .getService(Components.interfaces.nsIWindowMediator); - var enumerator = wm.getEnumerator("mozilla:cookieviewer"); - while (enumerator.hasMoreElements()) { - var viewer = enumerator.getNext(); - if (viewer.arguments[0] == viewerType) { - viewer.focus(); - return; - } - } - window.openDialog("chrome://communicator/content/permissions/cookieViewer.xul", - "_blank", "chrome,resizable", viewerType); -} - -function showPermissionsManager(viewerType, host) { - var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] - .getService(Components.interfaces.nsIWindowMediator); - var existingWindow = wm.getMostRecentWindow("permissions-" + viewerType); - if (existingWindow) { - existingWindow.setHost(host); - existingWindow.focus(); - } - else { - var params = { blockVisible: (viewerType == "image"), - sessionVisible: false, - allowVisible: true, - prefilledHost: host, - permissionType: viewerType }; - window.openDialog("chrome://communicator/content/permissions/permissionsManager.xul", "_blank", - "chrome,resizable=yes", params); - } -} - -function viewPopups(host) { - showPermissionsManager("popup", host); -} - -function viewImages() { - showPermissionsManager("image", ""); -} - -function viewInstalls() { - showPermissionsManager("install", ""); -} - -function viewCookies() { - openCookieViewer("cookieManager"); -} - -function viewCookiesFromIcon() { - openCookieViewer("cookieManagerFromIcon"); -} - -function viewP3P() { - window.openDialog - ("chrome://communicator/content/permissions/cookieP3P.xul","_blank","chrome,resizable=no"); -} diff --git a/mozilla/xpfe/components/permissions/content/treeUtils.js b/mozilla/xpfe/components/permissions/content/treeUtils.js deleted file mode 100644 index 8f176f02845..00000000000 --- a/mozilla/xpfe/components/permissions/content/treeUtils.js +++ /dev/null @@ -1,178 +0,0 @@ -/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/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. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * 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. - * - * ***** END LICENSE BLOCK ***** */ - -function DeleteAllFromTree - (tree, view, table, deletedTable, removeButton, removeAllButton) { - - // remove all items from table and place in deleted table - for (var i=0; i= 0; s--) { - var i = selections[s]; - deletedTable[deletedTable.length] = table[i]; - table[i] = null; - } - - // collapse list by removing all the null entries - for (var j=0; j second.expiresSortValue) - return 1; - else if (first.expiresSortValue < second.expiresSortValue) - return -1; - else - return 0; - } - } else { - compareFunc = function compare(first, second) { - return first[column].toLowerCase().localeCompare(second[column].toLowerCase()); - } - } - table.sort(compareFunc); - if (!ascending) - table.reverse(); - - // restore the selection - var selectedRow = -1; - if (selectedNumber>=0 && updateSelection) { - for (var s=0; s= 0) { - tree.treeBoxObject.ensureRowIsVisible(selectedRow) - } - - return ascending; -} - diff --git a/mozilla/xpfe/components/permissions/locale/en-US/aboutPopups.dtd b/mozilla/xpfe/components/permissions/locale/en-US/aboutPopups.dtd deleted file mode 100644 index 17ec1c60c51..00000000000 --- a/mozilla/xpfe/components/permissions/locale/en-US/aboutPopups.dtd +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/mozilla/xpfe/components/permissions/locale/en-US/cookieP3P.dtd b/mozilla/xpfe/components/permissions/locale/en-US/cookieP3P.dtd deleted file mode 100644 index 4d48282ac34..00000000000 --- a/mozilla/xpfe/components/permissions/locale/en-US/cookieP3P.dtd +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/mozilla/xpfe/components/permissions/locale/en-US/cookieTasksOverlay.dtd b/mozilla/xpfe/components/permissions/locale/en-US/cookieTasksOverlay.dtd deleted file mode 100644 index 9674fc64d87..00000000000 --- a/mozilla/xpfe/components/permissions/locale/en-US/cookieTasksOverlay.dtd +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/mozilla/xpfe/components/permissions/locale/en-US/cookieViewer.dtd b/mozilla/xpfe/components/permissions/locale/en-US/cookieViewer.dtd deleted file mode 100644 index c33759cde01..00000000000 --- a/mozilla/xpfe/components/permissions/locale/en-US/cookieViewer.dtd +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/mozilla/xpfe/components/permissions/locale/en-US/cookieViewer.properties b/mozilla/xpfe/components/permissions/locale/en-US/cookieViewer.properties deleted file mode 100644 index f0ee4adcab1..00000000000 --- a/mozilla/xpfe/components/permissions/locale/en-US/cookieViewer.properties +++ /dev/null @@ -1,73 +0,0 @@ -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/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. -# -# The Original Code is mozilla.org code. -# -# The Initial Developer of the Original Code is -# Netscape Communications Corporation. -# Portions created by the Initial Developer are Copyright (C) 1998 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# Ben Goodger -# -# 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. -# -# ***** END LICENSE BLOCK ***** - -# note this section of the code may require some tinkering in other languages =( -# format in dialog: site [can/cannot] set cookies -can=site can set cookies -cannot=site cannot set cookies -canSession=site can set session cookies -canImages=site can load images -cannotImages=site cannot load images -canPopups=site can show popups -cannotPopups=site cannot show popups -domain=Domain for which this cookie applies: -host=Server which set the cookie: -imageTitle=Image Manager -popupTitle=Pop-up Manager -hostColon=Host: -domainColon=Domain: -forSecureOnly=Encrypted connections only -forAnyConnection=Any type of connection -AtEndOfSession = at end of session -tabBannedImages=Image Sites -tabBannedPopups=Pop-up Sites -textBannedImages=Sites from which images are or are not loaded. -textBannedPopups=Sites from which pop-up windows are or are not allowed. -accepted=accepted -downgraded=session -flagged=flagged -policyUnstated = no policy about storing identifiable information -policyNoConsent = stores identifiable information without any user consent -policyImplicitConsent = stores identifiable information unless user opts out -policyExplicitConsent = stores identifiable information if user opts in -policyNoIICollected = does not store identifiable information -close=Close -deleteAllCookies=Are you sure you want to delete all the cookies? -deleteAllCookiesTitle=Remove All Cookies -deleteAllCookiesSites=Are you sure you want to delete all of the cookie sites? -deleteAllImagesSites=Are you sure you want to delete all of the image sites? -deleteAllSitesTitle=Remove All Sites diff --git a/mozilla/xpfe/components/permissions/locale/en-US/imageContextOverlay.dtd b/mozilla/xpfe/components/permissions/locale/en-US/imageContextOverlay.dtd deleted file mode 100644 index 6655e1939c9..00000000000 --- a/mozilla/xpfe/components/permissions/locale/en-US/imageContextOverlay.dtd +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/mozilla/xpfe/components/permissions/locale/en-US/permissionsManager.dtd b/mozilla/xpfe/components/permissions/locale/en-US/permissionsManager.dtd deleted file mode 100644 index a18e85a80a5..00000000000 --- a/mozilla/xpfe/components/permissions/locale/en-US/permissionsManager.dtd +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/mozilla/xpfe/components/permissions/locale/en-US/permissionsManager.properties b/mozilla/xpfe/components/permissions/locale/en-US/permissionsManager.properties deleted file mode 100644 index e9351658039..00000000000 --- a/mozilla/xpfe/components/permissions/locale/en-US/permissionsManager.properties +++ /dev/null @@ -1,16 +0,0 @@ -installpermissionstext=You can specify which web sites are allowed to install extensions and updates. Type the exact address of the site you want to allow and then click Allow. -installpermissionstitle=Allowed Sites - Software Installation -installpermissionshelp=advanced_pref_installation -popuppermissionstext=You can specify which web sites are allowed to open popup windows. Type the exact address of the site you want to allow and then click Allow. -popuppermissionstitle=Allowed Sites - Popups -popuppermissionshelp=pop_up_blocking -imagepermissionstext=You can specify which web sites are allowed to load images. Type the exact address of the site you want to manage and then click Block or Allow. -imagepermissionstitle=Exceptions - Images -imagepermissionshelp=images-help-managing - -can=Allow -canSession=Allow for Session -cannot=Block - -alertInvalidTitle=Invalid Web Site Entered -alertInvalid=The web site %S is invalid. diff --git a/mozilla/xpfe/components/permissions/locale/en-US/permissionsNavigatorOverlay.dtd b/mozilla/xpfe/components/permissions/locale/en-US/permissionsNavigatorOverlay.dtd deleted file mode 100644 index b0acc45f764..00000000000 --- a/mozilla/xpfe/components/permissions/locale/en-US/permissionsNavigatorOverlay.dtd +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/mozilla/xpfe/components/related/resources/related-panel.js b/mozilla/xpfe/components/related/resources/related-panel.js deleted file mode 100644 index 48f30263d1f..00000000000 --- a/mozilla/xpfe/components/related/resources/related-panel.js +++ /dev/null @@ -1,245 +0,0 @@ -/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/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. - * - * The Original Code is from Alexa Internet (www.alexa.com). - * - * The Initial Developer of the Original Code is - * Alexa Internet. - * Portions created by the Initial Developer are Copyright (C) 2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either of 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. - * - * ***** END LICENSE BLOCK ***** */ - -/* - Code for the Related Links Sidebar Panel - */ - - -var kUnknownReasonUrl = 'about:blank'; -var kMAMIUrl = 'http://xslt.alexa.com/data?cli=17&dat=nsa'; - -var kNoHTTPReasonUrl = kMAMIUrl + 'req_type=secure_intranet'; -var kSkipDomainReasonUrl = kMAMIUrl + 'req_type=blocked_list'; -var kDataPrefixUrl = kMAMIUrl; - -var oNavObserver = null; - -// Our observer of Navigation Messages -function NavObserver(oDisplayFrame,oContentWindow) -{ - this.m_oDisplayFrame = oDisplayFrame; - this.m_oContentWindow = oContentWindow; - this.m_sWindowID = ''+parseInt(Math.random()*32767); - this.m_sLastDataUrl = 'about:blank'; // The last url that we drove our display to. -} - -NavObserver.prototype.observe = -function (oSubject, sMessage, sContextUrl) -{ - try { - if (oSubject != this.m_oContentWindow) { - // only pay attention to our client window. - return; - } - var bReferrer = (this.m_oContentWindow.document.referrer)?true:false; - if ((sMessage == 'EndDocumentLoad') - && (sContextUrl != this.m_oContentWindow.location)) { - // we were redirected... - sContextUrl = '' + this.m_oContentWindow.location; - bReferrer = true; - } - this.TrackContext(sContextUrl, bReferrer); - } catch(ex) { - } -} - -NavObserver.prototype.GetCDT = -function (bReferrer) -{ - var sCDT = ''; - sCDT += 't=' +(bReferrer?'1':'0'); - sCDT += '&pane=nswr6'; - sCDT += '&wid='+this.m_sWindowID; - - return encodeURIComponent(sCDT); -} - -NavObserver.prototype.TrackContext = -function (sContextUrl, bReferrer) -{ - if (sContextUrl != this.m_sLastContextUrl && this.m_oDisplayFrame) { - var sDataUrl = this.TranslateContext(sContextUrl,bReferrer); - this.m_oDisplayFrame.setAttribute('src', sDataUrl); - this.m_sLastContextUrl = sContextUrl; - } -} - -NavObserver.prototype.TranslateContext = -function (sUrl, bReferrer) -{ - if (!sUrl || ('string' != typeof(sUrl)) - || ('' == sUrl) || sUrl == 'about:blank') { - return kUnknownReasonUrl; - } - - // Strip off any query strings (Don't want to be too nosy). - var nQueryPart = sUrl.indexOf('?'); - if (nQueryPart != 1) { - sUrl = sUrl.slice(0, nQueryPart); - } - - // We can only get related links data on HTTP URLs - if (0 != sUrl.indexOf("http://")) { - return kNoHTTPReasonUrl; - } - - // ...and non-intranet sites(those that have a '.' in the domain) - var sUrlSuffix = sUrl.substr(7); // strip off "http://" prefix - - var nFirstSlash = sUrlSuffix.indexOf('/'); - var nFirstDot = sUrlSuffix.indexOf('.'); - - if (-1 == nFirstDot) - return kNoHTTPReasonUrl; - - if ((nFirstSlash < nFirstDot) && (-1 != nFirstSlash)) - return kNoHTTPReasonUrl; - - // url is http, non-intranet url: see if the domain is in their blocked list. - - var nPortOffset = sUrlSuffix.indexOf(":"); - var nDomainEnd = (((nPortOffset >=0) && (nPortOffset <= nFirstSlash)) - ? nPortOffset : nFirstSlash); - - var sDomain = sUrlSuffix; - if (-1 != nDomainEnd) { - sDomain = sUrlSuffix.substr(0,nDomainEnd); - } - - if (DomainInSkipList(sDomain)) { - return kSkipDomainReasonUrl; - } else { - // ok! it is a good url! - var sFinalUrl = kDataPrefixUrl; - sFinalUrl += 'cdt='+this.GetCDT(bReferrer); - sFinalUrl += '&url='+sUrl; - return sFinalUrl; - } -} - - -function DomainInSkipList(sDomain) -{ - var bSkipDomainFlag = false; - - if ('/' == sDomain[sDomain.length - 1]) { - sDomain = sDomain.substring(0, sDomain.length - 1); - } - - try { - var pref = Components.classes["@mozilla.org/preferences-service;1"] - .getService(Components.interfaces.nsIPrefBranch); - - var sDomainList = pref.getCharPref("browser.related.disabledForDomains"); - if ((sDomainList) && (sDomainList != "")) { - - var aDomains = sDomainList.split(","); - - // split on commas - for (var x=0; x < aDomains.length; x++) { - var sDomainCopy = sDomain; - - var sTestDomain = aDomains[x]; - - if ('*' == sTestDomain[0]) { // wildcard match - - // strip off the asterisk - sTestDomain = sTestDomain.substring(1); - if (sDomainCopy.length > sTestDomain.length) { - var sDomainIndex = sDomain.length - sTestDomain.length; - sDomainCopy = sDomainCopy.substring(sDomainIndex); - } - } - - if (0 == sDomainCopy.lastIndexOf(sTestDomain)) { - - bSkipDomainFlag = true; - break; - } - } - } - } catch(ex) { - } - return(bSkipDomainFlag); -} - -function Init() -{ - // Initialize the Related Links panel - - // Install our navigation observer so we can track the main client window. - - oContentWindow = window.content; - oFrame = document.getElementById('daFrame'); - - if (oContentWindow && oFrame) { - var oObserverService = Components.classes["@mozilla.org/observer-service;1"].getService(); - oObserverService = oObserverService.QueryInterface(Components.interfaces.nsIObserverService); - - oNavObserver = new NavObserver(oFrame,oContentWindow); - oNavObserver.TrackContext(''+oContentWindow.location); - - if (oObserverService && oNavObserver) { - oObserverService.addObserver(oNavObserver, "StartDocumentLoad", false); - oObserverService.addObserver(oNavObserver, "EndDocumentLoad", false); - oObserverService.addObserver(oNavObserver, "FailDocumentLoad", false); - } else { - oNavObserver = null; - dump("FAILURE to get observer service\n"); - } - } -} - -function Destruct() -{ - // remove our navigation observer. - var oObserverService = Components.classes["@mozilla.org/observer-service;1"].getService(); - oObserverService = oObserverService.QueryInterface(Components.interfaces.nsIObserverService); - if (oObserverService && oNavObserver) { - oObserverService.removeObserver(oNavObserver, "StartDocumentLoad"); - oObserverService.removeObserver(oNavObserver, "EndDocumentLoad"); - oObserverService.removeObserver(oNavObserver, "FailDocumentLoad"); - oNavObserver = null; - } else { - dump("FAILURE to get observer service\n"); - } -} - -addEventListener("load", Init, false); -addEventListener("unload", Destruct, false); diff --git a/mozilla/xpfe/components/related/resources/related-panel.xul b/mozilla/xpfe/components/related/resources/related-panel.xul deleted file mode 100644 index 4a9e7921cd3..00000000000 --- a/mozilla/xpfe/components/related/resources/related-panel.xul +++ /dev/null @@ -1,48 +0,0 @@ - - - - - -