Start a webextension

This commit is contained in:
Arlo Breault 2019-04-30 15:08:37 -04:00
parent 5aca6028f9
commit 49dedf3a2f
11 changed files with 53 additions and 4 deletions

9
proxy/webext/README.md Normal file
View file

@ -0,0 +1,9 @@
Build it,
```
cd ..
npm install
npm run webext
```
and then load this directory as an unpacked extension.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
proxy/webext/icons/16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

BIN
proxy/webext/icons/32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -0,0 +1,16 @@
{
"manifest_version": 2,
"name": "Snowflake",
"version": "0.0.0",
"description": "Snowflake ...",
"background": {
"page": "snowflake.html",
"persistent": true
},
"browser_action": {
"default_icon": {
"16": "icons/16.png",
"32": "icons/32.png"
}
}
}

View file

@ -0,0 +1,16 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<!-- FIXME: Use a "script" instead of a "page" in the manifest.json -->
<script src="tmp.js"></script>
<script src="snowflake.js"></script>
</head>
<body>
<!-- FIXME: Refactor snowflake.js to eliminate the need for this -->
<div>
<div id="status"></div>
<textarea id="msglog" readonly></textarea>
</div>
</body>
</html>

2
proxy/webext/tmp.js Normal file
View file

@ -0,0 +1,2 @@
// FIXME: Refactor snowflake.js to eliminate the need for this
document.cookie = "snowflake-allow=1";