Wait until after we confirm it's an I2P site to set pageAction

This commit is contained in:
idk
2021-07-08 22:19:22 -04:00
parent 5d260c5a3e
commit 02f3cc871d
3 changed files with 13 additions and 13 deletions

View File

@@ -168,7 +168,7 @@ moz-sign: version clean-artifacts
@echo "Using the 'sign' target to instantly sign an extension for self-distribution"
@echo "requires a JWT API Key and Secret from addons.mozilla.org to be made available"
@echo "to the Makefile under the variables WEB_EXT_API_KEY and WEB_EXT_API_SECRET."
$(HOME)/web-ext/bin/web-ext sign --channel unlisted --config-discovery false --api-key $(WEB_EXT_API_KEY) --api-secret $(WEB_EXT_API_SECRET) --timeout=3000000 --verbose
$(HOME)/web-ext/bin/web-ext sign --channel unlisted --config-discovery false --api-key $(WEB_EXT_API_KEY) --api-secret $(WEB_EXT_API_SECRET) --timeout 900000 #--api-url-prefix http://localhost:3000/api/v4
make copyss
sleep 5
@@ -182,7 +182,7 @@ moz-submit: moz-version
@echo "to the Makefile under the variables WEB_EXT_API_KEY and WEB_EXT_API_SECRET."
mv manifest.json .manifest.json
grep -v update_url .manifest.json > manifest.json
$(HOME)/web-ext/bin/web-ext sign --channel listed --config-discovery false --api-key $(WEB_EXT_API_KEY) --api-secret $(WEB_EXT_API_SECRET) --timeout=3000000 --verbose
$(HOME)/web-ext/bin/web-ext sign --channel listed --config-discovery false --api-key $(WEB_EXT_API_KEY) --api-secret $(WEB_EXT_API_SECRET) --timeout 900000 --verbose #--api-url-prefix http://localhost:3000/api/v4
sleep 5
mv .manifest.json manifest.json

View File

@@ -27,7 +27,7 @@
],
"manifest_version": 2,
"name": "__MSG_extensionName__",
"version": "0.111",
"version": "0.112",
"description": "__MSG_extensionDescription__",
"homepage_url": "https://github.com/eyedeekay/I2P-in-Private-Browsing-Mode-Firefox",
"icons": {

View File

@@ -442,7 +442,7 @@ var coolheadersSetup = function (e) {
var tab = browser.tabs.get(e.tabId);
tab.then(altSrc);
function altSrc(tab) {
console.log("(scrub) X-I2P-LOCATION");
console.log("(scrub) X-I2P-LOCATION", header.value);
let url = new URL(header.value);
browser.pageAction.setPopup({
tabId: e.tabId,
@@ -541,16 +541,16 @@ var coolheadersSetup = function (e) {
function getTabURL(tab) {
if (tab.url.startsWith("https")) {
browser.pageAction.setPopup({
tabId: tab.id,
popup: "security.html",
});
browser.pageAction.setIcon({
path: "icons/infotoopies.png",
tabId: tab.id,
});
console.log(tab.url);
if (tab.url.includes(".i2p")) {
browser.pageAction.setPopup({
tabId: tab.id,
popup: "security.html",
});
browser.pageAction.setIcon({
path: "icons/infotoopies.png",
tabId: tab.id,
});
console.log(tab.url);
//console.log("(background) tabinfo", tabInfo[0].id)
try {
browser.tabs