Refresh identity needs to be in both options and background

This commit is contained in:
idk
2019-03-03 23:26:18 -05:00
parent 37c8361c43
commit a53fd94701
3 changed files with 18 additions and 4 deletions

View File

@@ -21,15 +21,15 @@ clobber:
rm -f ../i2psetproxy.js.zip ../i2p_proxy*.xpi
xpi:
mv ../i2p_proxy*.xpi ../i2psetproxy.js@eyedeekay.github.io.xpi
mv ~/Downloads/i2p_proxy*.xpi ../i2psetproxy.js@eyedeekay.github.io.xpi
cp:
cp ../i2psetproxy.js@eyedeekay.github.io.xpi ./i2psetproxy.js@eyedeekay.github.io.xpi
VERSION=1.14
VERSION=1.15
version:
sed 's|$(shell grep "\"version\": " manifest.json)| \"version\": $(VERSION)|g' manifest.json
sed -i 's|$(shell grep "\"version\": " manifest.json)| \"version\": $(VERSION)|g' manifest.json
zip: version
zip --exclude="./i2psetproxy.js@eyedeekay.github.io.xpi" \

View File

@@ -8,7 +8,7 @@
"permissions": ["theme", "proxy", "privacy", "storage"],
"manifest_version": 2,
"name": "__MSG_extensionName__",
"version": "1.14",
"version": 1.15
"description": "__MSG_extensionDescription__",
"icons": {
"48": "icons/toopie.png"

View File

@@ -61,3 +61,17 @@ function setupProxy() {
}
}
function RefreshIdentity(){
console.log("Generating new identity")
const controlhost = getControlHost();
const controlport = getControlPort();
const Http = new XMLHttpRequest();
const url='http://' + controlhost + ":" + controlport
Http.open("GET", url);
Http.send();
Http.onreadystatechange=(e)=>{
console.log(Http.responseText)
}
}
browser.browserAction.onClicked.addListener(RefreshIdentity);