Browse Source

fix #793

pull/2/head
gorhill 8 years ago
parent
commit
930b6dd820
  1. 1
      platform/chromium/manifest.json
  2. 37
      platform/chromium/vapi-background.js

1
platform/chromium/manifest.json

@ -69,7 +69,6 @@
"options_page": "dashboard.html", "options_page": "dashboard.html",
"permissions": [ "permissions": [
"browsingData", "browsingData",
"contentSettings",
"cookies", "cookies",
"privacy", "privacy",
"storage", "storage",

37
platform/chromium/vapi-background.js

@ -49,22 +49,6 @@ chrome.privacy.network.networkPredictionEnabled.set({
value: false value: false
}); });
// rhill 2013-12-07:
// Tell Chromium to allow all javascript: µMatrix will control whether
// javascript execute through `Content-Policy-Directive` and webRequest.
// https://github.com/gorhill/httpswitchboard/issues/74
// Firefox WebExtensions does not support contentSettings API, yet.
if ( chrome.contentSettings instanceof Object ) {
chrome.contentSettings.javascript.set({
primaryPattern: 'https://*/*',
setting: 'allow'
});
chrome.contentSettings.javascript.set({
primaryPattern: 'http://*/*',
setting: 'allow'
});
}
/******************************************************************************/ /******************************************************************************/
vAPI.app = { vAPI.app = {
@ -75,32 +59,11 @@ vAPI.app = {
/******************************************************************************/ /******************************************************************************/
vAPI.app.start = function() { vAPI.app.start = function() {
// rhill 2013-12-07:
// Relinquish control over javascript execution to the user.
// https://github.com/gorhill/httpswitchboard/issues/74
//chrome.contentSettings.javascript.clear({});
}; };
/******************************************************************************/ /******************************************************************************/
vAPI.app.stop = function() { vAPI.app.stop = function() {
// Firefox WebExtensions does not support contentSettings API, yet.
if ( chrome.contentSettings instanceof Object ) {
chrome.contentSettings.javascript.clear({});
}
// rhill 2013-12-07:
// Tell Chromium to allow all javascript: µMatrix will control whether
// javascript execute through `Content-Policy-Directive` and webRequest.
// https://github.com/gorhill/httpswitchboard/issues/74
//chrome.contentSettings.javascript.set({
// primaryPattern: 'https://*/*',
// setting: 'allow'
//});
//chrome.contentSettings.javascript.set({
// primaryPattern: 'http://*/*',
// setting: 'allow'
//});
}; };
/******************************************************************************/ /******************************************************************************/

Loading…
Cancel
Save