Well that was easy.
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
README.md.asc
|
||||
|
16
README.md
16
README.md
@@ -1,2 +1,14 @@
|
||||
# i2psetproxy.js
|
||||
WebExtension that automatically sets up a browser to use the proxy into i2p
|
||||
i2psetproxy.js
|
||||
==============
|
||||
|
||||
WebExtension that automatically sets up a browser to use the proxy into i2p.
|
||||
This extension shouldn't be used on it's own, and the extension it should be
|
||||
used with aren't quite done yet. In conjunction with a hardened user.js or
|
||||
installed in a TBB, it's probably pretty safe. It doesn't contain any
|
||||
fingerprintable resources.
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
* [done] **Set** the http proxy to use the local i2p proxy
|
||||
* [done] **Change** the color of the browser window to indicate that i2p is in use
|
||||
|
35
background.js
Normal file
35
background.js
Normal file
@@ -0,0 +1,35 @@
|
||||
browser.windows.onCreated.addListener(themeWindow);
|
||||
|
||||
// Theme all currently open windows
|
||||
browser.windows.getAll().then(wins => wins.forEach(themeWindow));
|
||||
|
||||
function themeWindow(window) {
|
||||
// Check if the window is in private browsing
|
||||
if (window.incognito) {
|
||||
browser.theme.update(window.id, {
|
||||
images: {
|
||||
headerURL: "",
|
||||
},
|
||||
colors: {
|
||||
accentcolor: "#A0A0DE",
|
||||
textcolor: "white",
|
||||
toolbar: "#A0A0DE",
|
||||
toolbar_text: "white"
|
||||
}
|
||||
});
|
||||
}
|
||||
// Reset to the default theme otherwise
|
||||
else {
|
||||
browser.theme.update(window.id, {
|
||||
images: {
|
||||
headerURL: "",
|
||||
},
|
||||
colors: {
|
||||
accentcolor: "#BFA0DE",
|
||||
textcolor: "white",
|
||||
toolbar: "#BFA0DE",
|
||||
toolbar_text: "white"
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
16
manifest.json
Normal file
16
manifest.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"manifest_version": 2,
|
||||
"name": "I2P Proxy",
|
||||
"version": "2.0",
|
||||
"description": "Set up a browser to use the i2p http proxy automatically",
|
||||
"background": {
|
||||
"scripts": ["background.js", "proxy.js"]
|
||||
},
|
||||
"permissions": ["theme", "proxy"],
|
||||
"applications": {
|
||||
"gecko": {
|
||||
"id": "i2psetproxy.js@eyedeekay.github.io",
|
||||
"strict_min_version": "60.0"
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user