From 767ecf0f2e125358946990d98224cd85d02b2939 Mon Sep 17 00:00:00 2001 From: harthur Date: Thu, 28 Oct 2010 11:39:19 -0700 Subject: [PATCH] remove extension compatiblity fixing --- chrome.manifest | 1 - chrome/content/configwarning.js | 101 ---- chrome/content/configwarning.xul | 67 --- chrome/content/extensions/addons.xul | 64 --- chrome/content/extensions/extensions.js | 143 ----- chrome/content/extensions/incompatible.css | 40 -- chrome/content/extensions/incompatible.js | 64 --- chrome/content/extensions/incompatible.xml | 65 --- chrome/content/extensions/incompatible.xul | 65 --- chrome/locale/en-US/configwarning.dtd | 8 - chrome/locale/en-US/incompatible.dtd | 11 - chrome/skin/configwarning.css | 46 -- chrome/skin/extensions/extensions.css | 40 -- chrome/skin/extensions/incompatible.css | 57 -- components/nttAddonCompatibilityService.js | 545 ------------------- components/nttIAddonCompatibilityService.idl | 62 --- 16 files changed, 1379 deletions(-) delete mode 100644 chrome/content/configwarning.js delete mode 100644 chrome/content/configwarning.xul delete mode 100644 chrome/content/extensions/addons.xul delete mode 100644 chrome/content/extensions/extensions.js delete mode 100644 chrome/content/extensions/incompatible.css delete mode 100644 chrome/content/extensions/incompatible.js delete mode 100644 chrome/content/extensions/incompatible.xml delete mode 100644 chrome/content/extensions/incompatible.xul delete mode 100644 chrome/locale/en-US/configwarning.dtd delete mode 100644 chrome/locale/en-US/incompatible.dtd delete mode 100644 chrome/skin/configwarning.css delete mode 100644 chrome/skin/extensions/extensions.css delete mode 100644 chrome/skin/extensions/incompatible.css delete mode 100644 components/nttAddonCompatibilityService.js delete mode 100644 components/nttIAddonCompatibilityService.idl diff --git a/chrome.manifest b/chrome.manifest index 5147454..a5bd765 100644 --- a/chrome.manifest +++ b/chrome.manifest @@ -6,7 +6,6 @@ locale nightly en-US chrome/loc resource nightly modules/ # Shared chrome -overlay chrome://mozapps/content/extensions/extensions.xul chrome://nightly/content/extensions/addons.xul override chrome://nightly/content/platform.js chrome://nightly/content/winPlatform.js os=winnt style chrome://browser/content/browser.xul chrome://nightly/skin/browser.css diff --git a/chrome/content/configwarning.js b/chrome/content/configwarning.js deleted file mode 100644 index 127287d..0000000 --- a/chrome/content/configwarning.js +++ /dev/null @@ -1,101 +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 Nightly Tester Tools. - * - * The Initial Developer of the Original Code is - * Dave Townsend . - * - * Portions created by the Initial Developer are Copyright (C) 2007 - * 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 ***** */ - -const Cc = Components.classes; -const Ci = Components.interfaces; - -var gOS = null; - -var observer = { - observe: function(subject, topic, data) { - window.focus(); - } -} - -function init() { - var bundle = document.getElementById("bundle"); - setLabelForButton(document.documentElement.getButton("accept"), bundle.getString("Yes")); - setLabelForButton(document.documentElement.getButton("cancel"), bundle.getString("No")); - - gOS = Cc["@mozilla.org/observer-service;1"]. - getService(Ci.nsIObserverService); - gOS.addObserver(observer, "xul-window-visible", false); -} - -function unload() { - gOS.removeObserver(observer, "xul-window-visible"); - gOS = null; -} - -function setLabelForButton(button, label) -{ - var accessKey = null; - if (/ *\(\&([^&])\)(:)?$/.test(label)) { - label = RegExp.leftContext + RegExp.$2; - accessKey = RegExp.$1; - } else if (/^(.*[^&])?\&(([^&]).*$)/.test(label)) { - label = RegExp.$1 + RegExp.$2; - accessKey = RegExp.$3; - } - // && is the magic sequence to embed an & in your label. - label = label.replace(/\&\&/g, "&"); - button.label = label; - if (accessKey) - button.accessKey = accessKey; -} - -function accept() { - var cs = Cc["@oxymoronical.com/nightly/addoncompatibility;1"]. - createInstance(Ci.nttIAddonCompatibilityService); - var em = Cc["@mozilla.org/extensions/manager;1"]. - getService(Ci.nsIExtensionManager); - var items = em.getItemList(Ci.nsIUpdateItem.TYPE_ADDON, {}); - for (var i = 0; i < items.length; i++) { - var addon = cs.getAddonForID(items[i].id); - if (!addon.isValid()) - continue; - if (!addon.needsOverride(false) && addon.needsOverride(true)) - addon.overrideCompatibility(true); - } - - var prefs = Cc["@mozilla.org/preferences-service;1"]. - getService(Ci.nsIPrefBranch); - if (prefs.prefHasUserValue("extensions.checkCompatibility")) - prefs.clearUserPref("extensions.checkCompatibility"); - if (prefs.prefHasUserValue("extensions.checkUpdateSecurity")) - prefs.clearUserPref("extensions.checkUpdateSecurity"); -} diff --git a/chrome/content/configwarning.xul b/chrome/content/configwarning.xul deleted file mode 100644 index b34b6c0..0000000 --- a/chrome/content/configwarning.xul +++ /dev/null @@ -1,67 +0,0 @@ - - - - -%brandDTD; - -%firstrunDTD; -]> - - - - - - -