Skip to content
Snippets Groups Projects
Commit b68ef3d9 authored by Thomas Rientjes's avatar Thomas Rientjes
Browse files

Update preference system

parent 58799cb5
No related branches found
No related tags found
No related merge requests found
pref('extensions.id1-BoFifL9Vbdl2zQ@jetpack.addNotice', true);
pref('extensions.id1-BoFifL9Vbdl2zQ@jetpack.blockMissing', false);
pref('extensions.id1-BoFifL9Vbdl2zQ@jetpack.domainWhitelist', '');
pref('extensions.id1-BoFifL9Vbdl2zQ@jetpack.amountInjected', 0);
......@@ -84,7 +84,7 @@ var Interceptor = new Class({
httpChannel.redirectTo(redirectionURI);
//noinspection JSUnresolvedVariable
require('sdk/simple-prefs').prefs.amountBlocked++;
require('sdk/simple-prefs').prefs.amountInjected++;
},
handleMissingCandidate: function (httpChannel) {
......@@ -94,9 +94,6 @@ var Interceptor = new Class({
if (blockMissing) {
httpChannel.cancel(Cr.NS_ERROR_NOT_AVAILABLE);
//noinspection JSUnresolvedVariable
require('sdk/simple-prefs').prefs.amountBlocked++;
}
}
});
......
<?xml version="1.0" ?>
<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<setting data-jetpack-id="id1-BoFifL9Vbdl2zQ@jetpack" pref="extensions.id1-BoFifL9Vbdl2zQ@jetpack.addNotice" pref-name="addNotice" title="Add comments to locally fetched files" type="bool">Automatically prepend a notice to retrieved documents to signal local delivery.</setting>
<setting data-jetpack-id="id1-BoFifL9Vbdl2zQ@jetpack" pref="extensions.id1-BoFifL9Vbdl2zQ@jetpack.blockMissing" pref-name="blockMissing" title="Block requests for missing resources" type="bool">Cancel intercepted request if the required resource is not locally available.</setting>
<setting data-jetpack-id="id1-BoFifL9Vbdl2zQ@jetpack" pref="extensions.id1-BoFifL9Vbdl2zQ@jetpack.domainWhitelist" pref-name="domainWhitelist" title="Exclude domains from inspections" type="string">Enter domains to whitelist them. Separate multipe entries with semi-colons (;).</setting>
<setting data-jetpack-id="id1-BoFifL9Vbdl2zQ@jetpack" pref="extensions.id1-BoFifL9Vbdl2zQ@jetpack.amountInjected" pref-name="amountInjected" title="Counter for locally injected resources" type="integer">Amount of local Content Delivery Network resource injections since installation.</setting>
</vbox>
......@@ -11,35 +11,5 @@
"engines": {
"firefox": ">=21.0",
"fennec": ">=21.0"
},
"preferences": [
{
"description": "Automatically prepend a notice to retrieved documents to signal local delivery.",
"type": "bool",
"name": "addNotice",
"value": true,
"title": "Add comments to locally fetched files"
},
{
"description": "Cancel intercepted request if the required resource is not locally available.",
"type": "bool",
"name": "blockMissing",
"value": false,
"title": "Block requests for missing resources"
},
{
"description": "Enter domains to whitelist them. Separate multipe entries with semi-colons (;).",
"type": "string",
"name": "domainWhitelist",
"value": "",
"title": "Exclude domains from inspections"
},
{
"description": "Amount of requests to Content Delivery Networks blocked since installation.",
"type": "integer",
"name": "amountBlocked",
"value": 0,
"title": "Counter for intercepted requests"
}
]
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment