1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-19 21:57:59 +01:00

Remove disable-acr module.

This commit is contained in:
Kris Maglione
2014-02-19 00:59:33 -08:00
parent b63e3128fa
commit 7af27cd15b
2 changed files with 0 additions and 92 deletions

16
common/bootstrap.js vendored
View File

@@ -252,22 +252,13 @@ function init() {
}
bootstrap.require = JSMLoader.load("base").require;
// Flush the cache if necessary, just to be paranoid
let pref = "extensions.dactyl.cacheFlushCheck";
let val = addon.version;
if (!Services.prefs.prefHasUserValue(pref) || Services.prefs.getCharPref(pref) != val) {
var cacheFlush = true;
Services.obs.notifyObservers(null, "startupcache-invalidate", "");
Services.prefs.setCharPref(pref, val);
}
try {
//JSMLoader.load("disable-acr").init(addon.id);
}
catch (e) {
reportError(e);
}
Services.obs.notifyObservers(null, "dactyl-rehash", null);
JSMLoader.bootstrap = global;
@@ -408,13 +399,6 @@ function shutdown(data, reason) {
debug("bootstrap: shutdown " + strReason);
if (reason != APP_SHUTDOWN) {
try {
//JSMLoader.load("disable-acr").cleanup(addon.id);
}
catch (e) {
reportError(e);
}
if (~[ADDON_UPGRADE, ADDON_DOWNGRADE, ADDON_UNINSTALL].indexOf(reason))
Services.obs.notifyObservers(null, "dactyl-purge", null);

View File

@@ -1,76 +0,0 @@
// By Kris Maglione. Public Domain.
// Please feel free to copy and use at will.
var ADDON_ID;
const OVERLAY_URLS = [
"about:addons",
"chrome://mozapps/content/extensions/extensions.xul"
];
let { interfaces: Ci, utils: Cu } = Components;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
const TOPIC = "chrome-document-global-created";
function observe(window, topic, url) {
if (topic === TOPIC)
checkDocument(window.document);
}
function init(id) {
if (id)
ADDON_ID = id;
Services.obs[id ? "addObserver" : "removeObserver"](observe, TOPIC, false);
for (let doc in chromeDocuments())
checkDocument(doc, !id);
}
function cleanup() { init(null); }
function checkPopup(event) {
let doc = event.originalTarget.ownerDocument;
let binding = doc.getBindingParent(event.originalTarget);
if (binding && binding.addon && binding.addon.guid == ADDON_ID && !binding.addon.compatible) {
let elem = doc.getAnonymousElementByAttribute(binding, "anonid", "stillworks");
if (elem && elem.nextSibling) {
elem.nextSibling.disabled = true;
elem.nextSibling.setAttribute("tooltiptext", "Developer has opted out of incompatibility reports\n"+
"Development versions are available with updated support");
}
}
}
function checkDocument(doc, disable, force) {
if (["interactive", "complete"].indexOf(doc.readyState) >= 0 || force && doc.readyState === "uninitialized") {
if (OVERLAY_URLS.indexOf(doc.documentURI) >= 0)
doc[disable ? "removeEventListener" : "addEventListener"]("popupshowing", checkPopup, false);
}
else {
doc.addEventListener("DOMContentLoaded", function listener() {
doc.removeEventListener("DOMContentLoaded", listener, false);
checkDocument(doc, disable, true);
}, false);
}
}
function chromeDocuments() {
let windows = Services.wm.getXULWindowEnumerator(null);
while (windows.hasMoreElements()) {
let window = windows.getNext().QueryInterface(Ci.nsIXULWindow);
for each (let type in ["typeChrome", "typeContent"]) {
let docShells = window.docShell.getDocShellEnumerator(Ci.nsIDocShellTreeItem[type],
Ci.nsIDocShell.ENUMERATE_FORWARDS);
while (docShells.hasMoreElements())
try {
yield docShells.getNext().QueryInterface(Ci.nsIDocShell).contentViewer.DOMDocument;
}
catch (e) {}
}
}
}
var EXPORTED_SYMBOLS = ["cleanup", "init"];
// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: