summaryrefslogtreecommitdiff
path: root/data/extensions/https-everywhere@eff.org/background-scripts/wasm.js
diff options
context:
space:
mode:
authorAmin Bandali <bandali@gnu.org>2020-04-08 21:52:58 -0400
committerAmin Bandali <bandali@gnu.org>2020-04-08 21:52:58 -0400
commit61dd7225c7b6a2bb9346c76926b5e96264f831b8 (patch)
tree871f406fd2e3dfbfde8645615426e1c4ee15db23 /data/extensions/https-everywhere@eff.org/background-scripts/wasm.js
parentf6e3adb6b2344ee2c7bb453a305fd2d6fb4c194c (diff)
Update HTTPS Everywhere to 2020.3.16.
Diffstat (limited to 'data/extensions/https-everywhere@eff.org/background-scripts/wasm.js')
-rw-r--r--data/extensions/https-everywhere@eff.org/background-scripts/wasm.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/data/extensions/https-everywhere@eff.org/background-scripts/wasm.js b/data/extensions/https-everywhere@eff.org/background-scripts/wasm.js
new file mode 100644
index 0000000..3385bb7
--- /dev/null
+++ b/data/extensions/https-everywhere@eff.org/background-scripts/wasm.js
@@ -0,0 +1,26 @@
+"use strict";
+
+(function(exports) {
+
+const util = require('./util'),
+ { RuleSets } = wasm_bindgen;
+
+async function initialize() {
+ try {
+ await wasm_bindgen(chrome.runtime.getURL('wasm/https_everywhere_lib_wasm_bg.wasm'));
+ } catch(e) {
+ util.log(util.WARN, 'The wasm library has not loaded correctly: ' + e);
+ }
+}
+
+function is_enabled() {
+ return true;
+}
+
+Object.assign(exports, {
+ initialize,
+ RuleSets,
+ is_enabled,
+});
+
+})(typeof exports == 'undefined' ? require.scopes.wasm = {} : exports);