From bababff89685f0013a5683a5b2ec5cb8658ba12e Mon Sep 17 00:00:00 2001 From: idk Date: Wed, 13 Mar 2019 17:50:34 -0400 Subject: [PATCH] get ready to add help pages --- Makefile | 9 ++++++--- README.md | 12 +++++++----- _locales/en/messages.json | 13 ++++++++++++- manifest.json | 7 +++++-- options/options.html | 4 ++-- options/options.js | 11 +++++------ proxy.js | 2 +- 7 files changed, 38 insertions(+), 20 deletions(-) diff --git a/Makefile b/Makefile index a1d41d8..272c202 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,9 @@ install: uninstall cp -rv _locales /usr/share/webext/i2psetproxy.js@eyedeekay.github.io/_locales cp background.js /usr/share/webext/i2psetproxy.js@eyedeekay.github.io cp proxy.js /usr/share/webext/i2psetproxy.js@eyedeekay.github.io + cp info.js /usr/share/webext/i2psetproxy.js@eyedeekay.github.io + cp info.css /usr/share/webext/i2psetproxy.js@eyedeekay.github.io + cp window.html /usr/share/webext/i2psetproxy.js@eyedeekay.github.io cp manifest.json /usr/share/webext/i2psetproxy.js@eyedeekay.github.io/ cp README.md /usr/share/webext/i2psetproxy.js@eyedeekay.github.io cp LICENSE /usr/share/webext/i2psetproxy.js@eyedeekay.github.io @@ -20,7 +23,7 @@ uninstall: clobber: rm -f ../i2psetproxy.js.zip ../i2p_proxy*.xpi -VERSION=1.17 +VERSION=1.18 xpi: mv ~/Downloads/i2p_proxy-$(VERSION)-an+fx.xpi ../i2psetproxy.js@eyedeekay.github.io.xpi @@ -30,7 +33,7 @@ cp: version: sed -i 's|$(shell grep "\"version\": " manifest.json)| \"version\": \"$(VERSION)\",|g' manifest.json - + zip: version zip --exclude="./i2psetproxy.js@eyedeekay.github.io.xpi" \ --exclude="i2psetproxy.js.png" -r -FS ../i2psetproxy.js.zip * @@ -40,4 +43,4 @@ profile-install: cp ./i2psetproxy.js@eyedeekay.github.io.xpi $(HOME)/.mozilla/firefox/.firefox.profile.i2p.default/extensions sudo cp ./i2psetproxy.js@eyedeekay.github.io.xpi /usr/local/lib/firefox.profile.i2p/firefox.profile.i2p/extensions/ -pi: profile-install \ No newline at end of file +pi: profile-install diff --git a/README.md b/README.md index c6eb8b4..b817cbf 100644 --- a/README.md +++ b/README.md @@ -12,13 +12,15 @@ Features * [done] **Set** the http proxy to use the local i2p proxy * [done] **Disable** risky webRTC features * [done] **Change** the color of the browser window to indicate that i2p is in use - * [done] **Reset** the HTTP Proxy tunnel to generate a new destination on-demand - * it does this by working in conjunction with this [standalone HTTP proxy](https://github.com/eyedeekay/httptunnel)* - * [started] **Provide** help in a variety of languages. + * [done-ish] **Reset** the HTTP Proxy tunnel to generate a new destination on-demand + * it does this by working in conjunction with this [standalone HTTP proxy](https://github.com/eyedeekay/httptunnel), currently disabled* + * [soon] **Provide** help in a variety of languages. Usage with standalone HTTP Proxy -------------------------------- +This functionality is currently disabled. + I developed a simple HTTP proxy that can be used with this extension to enable the user to initiate a re-start of the HTTP proxy tunnel, with a new set of keys and a new destination. This, combined with re-setting the browser settings back to the @@ -46,9 +48,9 @@ to Host: 127.0.0.1 Port: 7950 - + and change the "Control" configuration from: - + Host: 127.0.0.1 Port: 4444 diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 6493957..1fbdf04 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -3,7 +3,6 @@ "message": "i2psetproxy.js", "description": "Name of the extension." }, - "extensionDescription": { "message": "Set up a browser to use the i2p http proxy automatically", "description": "Description of the extension." @@ -20,6 +19,18 @@ "message": "Reset Tunnel", "description": "Message for the Reset Tunnel button" }, + "infoTitle": { + "message": "I2P Help", + "description": "Title for the help menu" + }, + "infoMessage": { + "message": "You are now free to browse the eepWeb! Your browser is now configured to browse anonymously on the I2P network. As you browse, your traffic will be routed through other network nodes to disguise it's origin, both from the server and from the nodes themselves.", + "description": "Help Message" + }, + "newsMessage": { + "message": "Visit the I2P News to learn the latest about i2p.", + "description": "Help Message" + }, "hostText": { "message": "Host: ", "description": "Host for the HTTP or SOCKS5 Proxy" diff --git a/manifest.json b/manifest.json index 08ddff4..c321a3b 100644 --- a/manifest.json +++ b/manifest.json @@ -10,18 +10,21 @@ "name": "__MSG_extensionName__", "version": "1.17", "description": "__MSG_extensionDescription__", + "homepage_url": "https://github.com/eyedeekay/i2psetproxy.js", "icons": { "48": "icons/toopie.png" }, "browser_action": { + "browser_style": true, "default_icon": "icons/toopie.png", - "default_title": "__MSG_resetMessage__" + "default_title": "__MSG_extensionName__", + "default_popup": "window.html" }, "options_ui": { "page": "options/options.html" }, "background": { - "scripts": ["background.js", "proxy.js"] + "scripts": ["background.js", "proxy.js", "info.js" ] }, "default_locale": "en" } diff --git a/options/options.html b/options/options.html index 5f5d504..137f922 100644 --- a/options/options.html +++ b/options/options.html @@ -25,7 +25,7 @@ - + diff --git a/options/options.js b/options/options.js index 3031f37..c37441f 100644 --- a/options/options.js +++ b/options/options.js @@ -175,6 +175,11 @@ function updateUI(restoredSettings) { const controlportitem = document.getElementById("controlport") controlportitem.value = restoredSettings.control_port console.log("showing control port:", controlportitem.value) + SetHostText() + SetPortText() + SetControlHostText() + SetControlPortText() + SetControlHelpText() setupProxy() } @@ -216,12 +221,6 @@ gettingStoredSettings.then(updateUI, onError); const saveButton = document.querySelector("#save-button"); saveButton.addEventListener("click", storeSettings); -SetHostText() -SetPortText() -SetControlHostText() -SetControlPortText() -SetControlHelpText() - function RefreshIdentity(){ console.log("Generating new identity") const Http = new XMLHttpRequest(); diff --git a/proxy.js b/proxy.js index cfab8de..7341f59 100644 --- a/proxy.js +++ b/proxy.js @@ -20,7 +20,7 @@ var controlHost = "127.0.0.1" //getControlHost() var controlPort = "7951" //getControlPort(); function setupProxy() { - var controlHost = getControlHost() + var controlHost = getControlHost(); var controlPort = getControlPort(); if (isFirefox()) { if (getScheme() == "http") {