mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 12:36:37 +02:00
WebExtension: added embedded WebExtension to store the preferences for the transition
This commit is contained in:
parent
a9c7d97708
commit
a6e1b05045
6 changed files with 63 additions and 4 deletions
18
webextension/background.js
Normal file
18
webextension/background.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
/* jslint moz: true */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
(function(){
|
||||
"use strict";
|
||||
|
||||
browser.storage.local.set({
|
||||
storageVersion: 0.1
|
||||
});
|
||||
|
||||
var port = browser.runtime.connect();
|
||||
port.onMessage.addListener(function(data){
|
||||
if (data){
|
||||
browser.storage.local.set(data);
|
||||
}
|
||||
});
|
||||
}());
|
11
webextension/manifest.json
Normal file
11
webextension/manifest.json
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"manifest_version": 2,
|
||||
"name": "embeddedCanvasBlocker@kkapsner.de",
|
||||
"version": "0.1",
|
||||
"background": {
|
||||
"scripts": ["background.js"]
|
||||
},
|
||||
"permissions": [
|
||||
"storage"
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue