Affix apptabs to front of tab order

This commit is contained in:
idk
2020-09-25 23:20:30 -04:00
parent 4012bdea45
commit 566f987483
7 changed files with 130 additions and 107 deletions

View File

@@ -37,11 +37,11 @@ clean: rc clean-artifacts
## EVEN RELEASES are AMO RELEASES
## ODD RELEASES are SELFHOSTED RELEASES
MOZ_VERSION=0.78
VERSION=0.77
MOZ_VERSION=0.80
VERSION=0.79
## INCREMENT THIS EVERY TIME YOU DO A RELEASE
LAST_VERSION=0.75
LAST_VERSION=0.77
YELLOW=F7E59A
ORANGE=FFC56D
@@ -97,20 +97,20 @@ xpi: getxpi
version:
sed -i 's|7647|7657|g' *.js* torrent/*.js*
sed -i 's|$(shell grep "\"version\": " manifest.json)| \"version\": \"$(VERSION)\",|g' manifest.json
sed -i 's|$(shell grep "\"version_name\": " manifest.json)| \"version_name\": \"$(VERSION)\",|g' manifest.json
# sed -i 's|$(shell grep "\"version_name\": " manifest.json)| \"version_name\": \"$(VERSION)\",|g' manifest.json
sed -si 's|$(shell grep $(LAST_VERSION) _locales/en/messages.json)| "message": "$(VERSION)",|g' _locales/en/messages.json; true
sed -si 's|$(shell grep $(MOZ_VERSION) _locales/en/messages.json)| "message": "$(VERSION)",|g' _locales/en/messages.json; true
moz-version:
sed -i 's|7647|7657|g' *.js* torrent/*.js*
sed -i 's|$(shell grep "\"version\": " manifest.json)| \"version\": \"$(MOZ_VERSION)\",|g' manifest.json
sed -i 's|$(shell grep "\"version_name\": " manifest.json)| \"version_name\": \"$(MOZ_VERSION)\",|g' manifest.json
# sed -i 's|$(shell grep "\"version_name\": " manifest.json)| \"version_name\": \"$(MOZ_VERSION)\",|g' manifest.json
sed -si 's|$(shell grep $(LAST_VERSION) _locales/en/messages.json)| "message": "$(MOZ_VERSION)",|g' _locales/en/messages.json; true
sed -si 's|$(shell grep $(VERSION) _locales/en/messages.json)| "message": "$(MOZ_VERSION)",|g' _locales/en/messages.json; true
rhz-version:
sed -i 's|$(shell grep "\"version\": " manifest.json)| \"version\": \"$(VERSION)1\",|g' manifest.json
sed -i 's|$(shell grep "\"version_name\": " manifest.json)| \"version_name\": \"$(VERSION)1-rhizome\",|g' manifest.json
# sed -i 's|$(shell grep "\"version_name\": " manifest.json)| \"version_name\": \"$(VERSION)1-rhizome\",|g' manifest.json
sed -i 's|7657|7647|g' *.js* torrent/*.js*
zip: version
@@ -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/node_modules/web-ext-submit/extender.sh --channel unlisted --config-discovery false --api-key $(WEB_EXT_API_KEY) --api-secret $(WEB_EXT_API_SECRET)
$(HOME)/node_modules/web-ext-submit/extender.sh --channel unlisted --config-discovery false --api-key $(WEB_EXT_API_KEY) --api-secret $(WEB_EXT_API_SECRET)
make copyss
sleep 5

7
debian/changelog vendored
View File

@@ -1,3 +1,10 @@
i2psetproxy.js (0.79-1) UNRELEASED; urgency=low
* Pin application tabs to the front of the tab order
* Refine pageaction behavior
-- idk <hankhill19580@gmail.com> Mon, 24 SEP 2020 20:18:03 -0400
i2psetproxy.js (0.77-1) UNRELEASED; urgency=low
* Implement x-i2p-location header

View File

@@ -30,7 +30,7 @@
<ul>
<li>
<a href="">Magnet Link</a>
<a href="magnet:?xt=urn:btih:5f45673bc107ec42a8b4d02aa4d5d7487949fc66">Magnet Link</a>
</li>
<li>

View File

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

View File

@@ -4,13 +4,65 @@
<link type="text/html" rel="alternate" href="https://github.com/eyedeekay/I2P-in-Private-Browsing-Mode-Firefox/releases"/>
<link type="application/atom+xml" rel="self" href="https://github.com/eyedeekay/I2P-in-Private-Browsing-Mode-Firefox/releases.atom"/>
<title>Release notes from I2P-in-Private-Browsing-Mode-Firefox</title>
<updated>2020-03-24T04:22:27Z</updated>
<updated>2020-06-23T03:21:35Z</updated>
<entry>
<id>tag:github.com,2008:Repository/169256012/0.77</id>
<updated>2020-09-25T00:19:45Z</updated>
<link rel="alternate" type="text/html" href="https://github.com/eyedeekay/I2P-in-Private-Browsing-Mode-Firefox/releases/tag/0.77"/>
<title>0.77</title>
<enclosure url="magnet:?xt=urn:btih:5f45673bc107ec42a8b4d02aa4d5d7487949fc66" type="application/x-bittorrent" />
<content type="html">&lt;p&gt;Merge pull request &lt;a class=&quot;issue-link js-issue-link&quot; href=&quot;https://github.com/eyedeekay/I2P-in-Private-Browsing-Mode-Firefox/pull/100&quot;&gt;#100&lt;/a&gt; from eyedeekay/bookmarks&lt;/p&gt;
&lt;p&gt;make the bookmarks part of a subdirectory&lt;/p&gt;</content>
<author>
<name>eyedeekay</name>
</author>
<media:thumbnail height="30" width="30" url="https://avatars3.githubusercontent.com/u/8733713?s=60&amp;v=4"/>
</entry>
<entry>
<id>tag:github.com,2008:Repository/169256012/0.75</id>
<updated>2020-06-23T03:22:59Z</updated>
<link rel="alternate" type="text/html" href="https://github.com/eyedeekay/I2P-in-Private-Browsing-Mode-Firefox/releases/tag/0.75"/>
<title>0.75</title>
<content type="html">&lt;p&gt;A simple plugin for configuring a Firefox based web browser to isolate I2P&lt;br&gt;
Browsing to a single contextual identity, thus creating an I2P in Private&lt;br&gt;
Browsing mode. It requires the use of a pre-installed I2P Router.&lt;br&gt;
i2psetproxy.js (0.75-1) UNRELEASED; urgency=low&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Update bookmarks format&lt;/li&gt;
&lt;li&gt;Deprecate WebRTC State Management&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;-- idk &lt;a href=&quot;mailto:hankhill19580@gmail.com&quot;&gt;hankhill19580@gmail.com&lt;/a&gt; Mon, 22 JUN 2020 11:22:37 -0400&lt;/p&gt;
&lt;p&gt;i2psetproxy.js (0.73-1) UNRELEASED; urgency=low&lt;/p&gt;</content>
<author>
<name>eyedeekay</name>
</author>
<media:thumbnail height="30" width="30" url="https://avatars3.githubusercontent.com/u/8733713?s=60&amp;v=4"/>
</entry>
<entry>
<id>tag:github.com,2008:Repository/169256012/0.73</id>
<updated>2020-03-24T23:49:45Z</updated>
<link rel="alternate" type="text/html" href="https://github.com/eyedeekay/I2P-in-Private-Browsing-Mode-Firefox/releases/tag/0.73"/>
<title>0.73</title>
<content type="html">&lt;p&gt;A simple plugin for configuring a Firefox based web browser to isolate I2P&lt;br&gt;
Browsing to a single contextual identity, thus creating an I2P in Private&lt;br&gt;
Browsing mode. It requires the use of a pre-installed I2P Router.&lt;br&gt;
i2psetproxy.js (0.73-1) UNRELEASED; urgency=low&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Fix incomplete bugfix from 0.69 again&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;-- idk &lt;a href=&quot;mailto:hankhill19580@gmail.com&quot;&gt;hankhill19580@gmail.com&lt;/a&gt; Tue, 24 MAR 2020 19:48:14 -0400&lt;/p&gt;
&lt;p&gt;i2psetproxy.js (0.71-1) UNRELEASED; urgency=low&lt;/p&gt;</content>
<author>
<name>eyedeekay</name>
</author>
<media:thumbnail height="30" width="30" url="https://avatars3.githubusercontent.com/u/8733713?s=60&amp;v=4"/>
</entry>
<entry>
<id>tag:github.com,2008:Repository/169256012/0.71</id>
<updated>2020-03-24T23:01:20Z</updated>
<link rel="alternate" type="text/html" href="https://github.com/eyedeekay/I2P-in-Private-Browsing-Mode-Firefox/releases/tag/0.71"/>
<title>0.71</title>
<enclosure url="magnet:?xt=urn:btih:337ece11e8d9318c0e11d9320e3426fe9ff15556" type="application/x-bittorrent" />
<content type="html">&lt;h1&gt;I2P in Private Browsing Mode&lt;/h1&gt;
&lt;p&gt;A simple plugin for configuring a Firefox based web browser to isolate I2P&lt;br&gt;
Browsing to a single contextual identity, thus creating an I2P in Private&lt;br&gt;
@@ -143,60 +195,4 @@ i2psetproxy.js (0.59-1) UNRELEASED; urgency=low&lt;/p&gt;
</author>
<media:thumbnail height="30" width="30" url="https://avatars3.githubusercontent.com/u/8733713?s=60&amp;v=4"/>
</entry>
<entry>
<id>tag:github.com,2008:Repository/169256012/0.57</id>
<updated>2020-01-06T17:16:33Z</updated>
<link rel="alternate" type="text/html" href="https://github.com/eyedeekay/I2P-in-Private-Browsing-Mode-Firefox/releases/tag/0.57"/>
<title>0.57</title>
<content type="html">&lt;h1&gt;I2P in Private Browsing Mode&lt;/h1&gt;
&lt;p&gt;A simple plugin for configuring a Firefox based web browser to isolate I2P&lt;br&gt;
Browsing to a single contextual identity, thus creating an I2P in Private&lt;br&gt;
Browsing mode. It requires the use of a pre-installed I2P Router.&lt;br&gt;
i2psetproxy.js (0.57-1) UNRELEASED; urgency=low&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Snowflake compatibility&lt;/li&gt;
&lt;li&gt;Lots of small compatibility fixes&lt;/li&gt;
&lt;li&gt;More linter errors&lt;/li&gt;
&lt;li&gt;Make it multilingual again&lt;/li&gt;
&lt;li&gt;Distribute a torrent and a magnet link with the plugin of the plugin&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;-- idk &lt;a href=&quot;mailto:hankhill19580@gmail.com&quot;&gt;hankhill19580@gmail.com&lt;/a&gt; Thu, 4 JAN 2019 16:43:58 -0400&lt;/p&gt;</content>
<author>
<name>eyedeekay</name>
</author>
<media:thumbnail height="30" width="30" url="https://avatars3.githubusercontent.com/u/8733713?s=60&amp;v=4"/>
</entry>
<entry>
<id>tag:github.com,2008:Repository/169256012/docs</id>
<updated>2020-01-03T18:01:49Z</updated>
<link rel="alternate" type="text/html" href="https://github.com/eyedeekay/I2P-in-Private-Browsing-Mode-Firefox/releases/tag/docs"/>
<title>Documentation</title>
<content type="html">&lt;p&gt;PDF&#39;s and text about the extension&lt;/p&gt;</content>
<author>
<name>eyedeekay</name>
</author>
<media:thumbnail height="30" width="30" url="https://avatars3.githubusercontent.com/u/8733713?s=60&amp;v=4"/>
</entry>
<entry>
<id>tag:github.com,2008:Repository/169256012/0.55</id>
<updated>2020-01-06T17:17:01Z</updated>
<link rel="alternate" type="text/html" href="https://github.com/eyedeekay/I2P-in-Private-Browsing-Mode-Firefox/releases/tag/0.55"/>
<title>0.55</title>
<content type="html">&lt;h1&gt;I2P in Private Browsing Mode&lt;/h1&gt;
&lt;p&gt;A simple plugin for configuring a Firefox based web browser to isolate I2P&lt;br&gt;
Browsing to a single contextual identity, thus creating an I2P in Private&lt;br&gt;
Browsing mode. It requires the use of a pre-installed I2P Router.&lt;br&gt;
i2psetproxy.js (0.55-1) UNRELEASED; urgency=low&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Get rid of Web Browsing context launcher&lt;/li&gt;
&lt;li&gt;Fix linter errors&lt;/li&gt;
&lt;li&gt;Tolerate themes&lt;/li&gt;
&lt;li&gt;Tolerate other containerizers&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;-- idk &lt;a href=&quot;mailto:hankhill19580@gmail.com&quot;&gt;hankhill19580@gmail.com&lt;/a&gt; Thu, 2 JAN 2019 16:47:33 -0400&lt;/p&gt;</content>
<author>
<name>eyedeekay</name>
</author>
<media:thumbnail height="30" width="30" url="https://avatars3.githubusercontent.com/u/8733713?s=60&amp;v=4"/>
</entry>
</feed>

View File

@@ -17,5 +17,21 @@ browser.runtime.onMessage.addListener(request => {
};
}
}
if (request.req === 'i2p-torrentlocation') {
response = 'no-alt-location';
const metas = document.getElementsByTagName('meta');
for (let i = 0; i < metas.length; i++) {
try {
tag = metas[i].getAttribute('http-equiv');
if (tag.toUpperCase() === 'I2P-TORRENTLOCATION') {
response = metas[i].getAttribute('content');
}
if (tag.toUpperCase() === 'X-I2P-TORRENTLOCATION') {
response = metas[i].getAttribute('content');
}
}catch{
};
}
}
return Promise.resolve({content: response});
});

View File

@@ -593,31 +593,33 @@ var coolheadersSetup = function(e) {
window.setTimeout(() => {
for (i = 0; i < e.responseHeaders.length; i++) {
let header = e.responseHeaders[i];
if (header.name.toUpperCase() === 'I2P-LOCATION' || header.name.toUpperCase() === 'X-I2P-LOCATION') {
browser.pageAction.setPopup({
tabId: e.tabId,
popup: 'location.html'
});
browser.pageAction.setIcon({path: 'icons/i2plogo.png', tabId: e.tabId});
browser.pageAction.setTitle({
tabId: e.tabId,
title: header.value
});
browser.pageAction.show(e.tabId);
break;
}
if (header.name.toUpperCase() === 'I2P-TORRENTLOCATION' || header.name.toUpperCase() === 'X-I2P-TORRENTLOCATION') {
browser.pageAction.setPopup({
tabId: tabId.id,
popup: 'torrent.html'
});
browser.pageAction.setIcon({path: 'icons/i2plogo.png', tabId: e.tabId});
browser.pageAction.show(e.tabId);
browser.pageAction.setTitle({
tabId: e.tabId,
title: header.value
});
break;
if (e.url.startsWith('https')) {
if (header.name.toUpperCase() === 'I2P-LOCATION' || header.name.toUpperCase() === 'X-I2P-LOCATION') {
browser.pageAction.setPopup({
tabId: e.tabId,
popup: 'location.html'
});
browser.pageAction.setIcon({path: 'icons/i2plogo.png', tabId: e.tabId});
browser.pageAction.setTitle({
tabId: e.tabId,
title: header.value
});
browser.pageAction.show(e.tabId);
break;
}
if (header.name.toUpperCase() === 'I2P-TORRENTLOCATION' || header.name.toUpperCase() === 'X-I2P-TORRENTLOCATION') {
browser.pageAction.setPopup({
tabId: tabId.id,
popup: 'torrent.html'
});
browser.pageAction.setIcon({path: 'icons/i2plogo.png', tabId: e.tabId});
browser.pageAction.show(e.tabId);
browser.pageAction.setTitle({
tabId: e.tabId,
title: header.value
});
break;
}
}
}
resolve({responseHeaders: e.responseHeaders});
@@ -628,21 +630,23 @@ var coolheadersSetup = function(e) {
function getClearTab(tobj) {
function getTabURL(tab) {
browser.tabs.sendMessage( tab.id, {'req':'i2p-location'}).then( response => {
if (response.content.toUpperCase() != "no-alt-location"){
browser.pageAction.setPopup({
tabId: tab.id,
popup: 'location.html'
});
browser.pageAction.setIcon({path: 'icons/i2plogo.png', tabId: tab.id});
browser.pageAction.setTitle({
tabId: tab.id,
title: response.content
});
browser.pageAction.show(tab.id);
}
});
console.log("(pageaction)", tab.id, tab.url)
if (tab.url.startsWith("https")){
browser.tabs.sendMessage( tab.id, {'req':'i2p-location'}).then( response => {
if (response.content.toUpperCase() != "NO-ALT-LOCATION"){
browser.pageAction.setPopup({
tabId: tab.id,
popup: 'location.html'
});
browser.pageAction.setIcon({path: 'icons/i2plogo.png', tabId: tab.id});
browser.pageAction.setTitle({
tabId: tab.id,
title: response.content
});
browser.pageAction.show(tab.id);
}
});
console.log("(pageaction)", tab.id, tab.url)
}
}
browser.tabs.get(tobj.tabId).then(getTabURL, onError)
}