mirror of
https://github.com/oooo-ps/i2pdbrowser.git
synced 2026-04-01 14:15:29 +00:00
1.2.8 pre1
What is CCK2? Answer here: https://mike.kaply.com/cck2/ Updated configuration Add new old reseed certificate Update addressbook Now time to think about one problem - user agent. In FF 60+ removed ability to change it without addons. Former-commit-id: 6e9eeba2096bc36b3521ebc040f733ad8ba06a27
This commit is contained in:
parent
4eac450fc3
commit
9188271b06
70 changed files with 11927 additions and 2041 deletions
|
|
@ -0,0 +1,62 @@
|
|||
/* This file overrides about:support It does the following:
|
||||
* Remove the reset Firefox button if disableResetFirefox is set
|
||||
* Remove the safe mode Button if disableSafeMode is set
|
||||
* Remove the box if both are set
|
||||
*/
|
||||
|
||||
const EXPORTED_SYMBOLS = [];
|
||||
|
||||
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
|
||||
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://cck2/CCK2.jsm");
|
||||
|
||||
var configs = null;
|
||||
|
||||
var observer = {
|
||||
observe: function observe(subject, topic, data) {
|
||||
switch (topic) {
|
||||
case "chrome-document-global-created":
|
||||
var win = subject.QueryInterface(Components.interfaces.nsIDOMWindow);
|
||||
win.addEventListener("load", function onLoad(event) {
|
||||
win.removeEventListener("load", onLoad, false);
|
||||
var doc = event.target;
|
||||
var url = doc.location.href.split("?")[0].split("#")[0];
|
||||
switch (url) {
|
||||
case "about:support":
|
||||
case "chrome://global/content/aboutSupport.xhtml":
|
||||
if (!configs) {
|
||||
configs = CCK2.getConfigs();
|
||||
}
|
||||
for (let id in configs) {
|
||||
var config = configs[id];
|
||||
if (config.disableResetFirefox) {
|
||||
remove(E("reset-box", doc));
|
||||
}
|
||||
if (config.disableSafeMode) {
|
||||
remove(E("safe-mode-box", doc));
|
||||
}
|
||||
if (config.disableResetFirefox &&
|
||||
config.disableSafeMode) {
|
||||
remove(E("action-box", doc));
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}, false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Services.obs.addObserver(observer, "chrome-document-global-created", false);
|
||||
|
||||
function E(id, context) {
|
||||
var element = context.getElementById(id);
|
||||
return element;
|
||||
}
|
||||
|
||||
|
||||
function remove(element) {
|
||||
if (element && element.parentNode)
|
||||
element.parentNode.removeChild(element);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue