mirror of
https://github.com/oooo-ps/i2pdbrowser.git
synced 2026-04-01 06:05:27 +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
47
windows/build/preferences/cck2/modules/CCK2FileBlock.jsm
Normal file
47
windows/build/preferences/cck2/modules/CCK2FileBlock.jsm
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
|
||||
|
||||
var EXPORTED_SYMBOLS = [];
|
||||
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
let CCK2FileBlock = {
|
||||
chromeBlacklist: ["browser", "mozapps", "marionette", "specialpowers",
|
||||
"branding", "alerts"],
|
||||
shouldLoad: function(aContentType, aContentLocation, aRequestOrigin, aContext, aMimeTypeGuess, aExtra) {
|
||||
// Prevent the loading of chrome URLs into the main browser window
|
||||
if (aContentLocation.scheme == "chrome") {
|
||||
if (aRequestOrigin &&
|
||||
(aRequestOrigin.spec == "chrome://browser/content/browser.xul" ||
|
||||
aRequestOrigin.scheme == "moz-nullprincipal")) {
|
||||
for (var i=0; i < this.chromeBlacklist.length; i++) {
|
||||
if (aContentLocation.host == this.chromeBlacklist[i]) {
|
||||
if (aContentLocation.spec.includes(".xul")) {
|
||||
return Ci.nsIContentPolicy.REJECT_REQUEST;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return Ci.nsIContentPolicy.ACCEPT;
|
||||
},
|
||||
shouldProcess: function(aContentType, aContentLocation, aRequestOrigin, aContext, aMimeTypeGuess, aExtra) {
|
||||
return Ci.nsIContentPolicy.ACCEPT;
|
||||
},
|
||||
classDescription: "CCK2 FileBlock Service",
|
||||
contractID: "@kaply.com/cck2-fileblock-service;1",
|
||||
classID: Components.ID('{26e7afc9-e22d-4d12-bb57-c184fe24b828}'),
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIContentPolicy]),
|
||||
createInstance: function(outer, iid) {
|
||||
return this.QueryInterface(iid);
|
||||
},
|
||||
};
|
||||
|
||||
var registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
|
||||
registrar.registerFactory(CCK2FileBlock.classID,
|
||||
CCK2FileBlock.classDescription,
|
||||
CCK2FileBlock.contractID,
|
||||
CCK2FileBlock);
|
||||
|
||||
var cm = Cc["@mozilla.org/categorymanager;1"].getService(Ci.nsICategoryManager);
|
||||
cm.addCategoryEntry("content-policy", CCK2FileBlock.contractID,
|
||||
CCK2FileBlock.contractID, false, true);
|
||||
Loading…
Add table
Add a link
Reference in a new issue