This commit is contained in:
idk
2019-11-23 22:17:20 -05:00
parent ee0ca69195
commit fbaf1dca30
6 changed files with 29 additions and 10 deletions

View File

@@ -6,7 +6,6 @@ install: uninstall
mkdir -p $(PREFIX)/share/webext/i2ppb@eyedeekay.github.io \
$(PREFIX)/share/webext/i2ppb@eyedeekay.github.io/i2pcontrol \
$(PREFIX)/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}
cp -r ./chromium/ $(PREFIX)/share/webext/i2ppb@eyedeekay.github.io/
cp -r ./icons/ $(PREFIX)/share/webext/i2ppb@eyedeekay.github.io/
cp -r ./_locales/ $(PREFIX)/share/webext/i2ppb@eyedeekay.github.io/
cp -r ./options/ $(PREFIX)/share/webext/i2ppb@eyedeekay.github.io/
@@ -37,8 +36,8 @@ clean:
## EVEN RELEASES are AMO RELEASES
## ODD RELEASES are SELFHOSTED RELEASES
MOZ_VERSION=0.44
VERSION=0.45
MOZ_VERSION=0.46
VERSION=0.47
#VERSION=$(MOZ_VERSION)
#VERSION=1.27
@@ -123,10 +122,15 @@ moz-submit: moz-version
web-ext sign --channel listed --config-discovery false --api-key $(WEB_EXT_API_KEY) --api-secret $(WEB_EXT_API_SECRET); true
upload-xpi:
gothub upload -u eyedeekay -r i2psetproxy.js -t $(VERSION) -n "i2ppb@eyedeekay.github.io.xpi" -f "./i2ppb@eyedeekay.github.io.xpi"
gothub upload -R -u eyedeekay -r i2psetproxy.js -t $(VERSION) -n "i2ppb@eyedeekay.github.io.xpi" -f "./i2ppb@eyedeekay.github.io.xpi"
upload-deb:
gothub upload -u eyedeekay -r i2psetproxy.js -t $(VERSION) -n "i2psetproxy.js_$(VERSION)-1_amd64.deb" -f "../i2psetproxy.js_$(VERSION)-1_amd64.deb"
gothub upload -R -u eyedeekay -r i2psetproxy.js -t $(VERSION) -n "i2psetproxy.js_$(VERSION)-1_amd64.deb" -f "../i2psetproxy.js_$(VERSION)-1_amd64.deb"
gothub upload -R -u eyedeekay -r i2psetproxy.js -t $(VERSION) -n "i2psetproxy.js_$(VERSION).orig.tar.gz" -f "../i2psetproxy.js_$(VERSION).orig.tar.gz"
gothub upload -R -u eyedeekay -r i2psetproxy.js -t $(VERSION) -n "i2psetproxy.js_$(VERSION)-1.debian.tar.xz" -f "../i2psetproxy.js_$(VERSION)-1.debian.tar.xz"
gothub upload -R -u eyedeekay -r i2psetproxy.js -t $(VERSION) -n "i2psetproxy.js_$(VERSION)-1.dsc" -f "../i2psetproxy.js_$(VERSION)-1.dsc"
gothub upload -R -u eyedeekay -r i2psetproxy.js -t $(VERSION) -n "i2psetproxy.js_$(VERSION)-1_amd64.changes" -f "../i2psetproxy.js_$(VERSION)-1_amd64.changes"
gothub upload -R -u eyedeekay -r i2psetproxy.js -t $(VERSION) -n "i2psetproxy.js_$(VERSION)-1_amd64.buildinfo" -f "../i2psetproxy.js_$(VERSION)-1_amd64.buildinfo"
fmt:
cleancss -O1 all -O2 all --format beautify home.css -o .home.css && mv .home.css home.css

1
debian/copyright vendored
View File

@@ -28,6 +28,7 @@ Files: .gitignore
scrub.js
window.html
debian/*
*
Copyright: MIT
License: MIT
Permission is hereby granted, free of charge, to any person obtaining a copy

1
debian/rules vendored
View File

@@ -7,7 +7,6 @@ override_dh_auto_install:
mkdir -p $$(pwd)/debian/i2psetproxy.js/usr/share/webext/i2ppb@eyedeekay.github.io \
$$(pwd)/debian/i2psetproxy.js/usr/share/webext/i2ppb@eyedeekay.github.io/i2pcontrol \
$$(pwd)/debian/i2psetproxy.js/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}
cp -r ./chromium/ $$(pwd)/debian/i2psetproxy.js/usr/share/webext/i2ppb@eyedeekay.github.io/
cp -r ./icons/ $$(pwd)/debian/i2psetproxy.js/usr/share/webext/i2ppb@eyedeekay.github.io/
cp -r ./options/ $$(pwd)/debian/i2psetproxy.js/usr/share/webext/i2ppb@eyedeekay.github.io/
cp -r ./_locales/ $$(pwd)/debian/i2psetproxy.js/usr/share/webext/i2ppb@eyedeekay.github.io/

View File

@@ -12,13 +12,28 @@ function identifyProtocolHandler(url) {
return false;
}
function trimHost(url) {
let hostname = "";
let prefix = "";
if (url.indexOf("://") > -1) {
prefix = url.substr(0, url.indexOf("://") + 3);
hostname = url.split("/")[2];
} else {
hostname = url.split("/")[0];
}
let path = url.replace(prefix+hostname, "")
console.log("(handler) path", prefix+hostname, path)
return path
}
var handlerSetup = async function(requestDetails) {
//console.log("checking protocol handler listener")
var rwurl = identifyProtocolHandler(requestDetails.url);
if (rwurl != false) {
console.log("handler rewrite URL requested", rwurl);
console.log("(handler) rewrite URL requested", rwurl);
requestDetails.redirectUrl = rwurl;
requestDetails.url = rwurl;
requestDetails.url = trimHost(rwurl);
requestDetails.originUrl = trimHost(rwurl);
}
return requestDetails;
};

View File

@@ -24,7 +24,7 @@
],
"manifest_version": 2,
"name": "__MSG_extensionName__",
"version": "0.47",
"version": "0.46",
"description": "__MSG_extensionDescription__",
"homepage_url": "https://github.com/eyedeekay/i2psetproxy.js",
"icons": {

View File

@@ -393,7 +393,7 @@ var contextSetup = async function(requestDetails) {
}
} else {
var tab = tabGet(requestDetails.tabId);
var mtab = tab.then(routerTabFind);
var mtab = tab.then(anyTabFind);
return requestDetails;
}
}