make it so that onboarding slides show in one click the first time

This commit is contained in:
idk
2020-01-14 18:18:13 -05:00
parent 87edb2c448
commit 518e04a40b
18 changed files with 597 additions and 596 deletions

View File

@@ -242,6 +242,7 @@ fmt:
tidy --as-xhtml --drop-empty-elements no --input-xml --tidy-mark no -indent --indent-spaces 4 -wrap 0 --new-blocklevel-tags article,header,footer --new-inline-tags video,audio,canvas,ruby,rt,rp --break-before-br yes --sort-attributes alpha --vertical-space yes window.html > .window.html; mv .window.html window.html
tidy --as-xhtml --drop-empty-elements no --input-xml --tidy-mark no -indent --indent-spaces 4 -wrap 0 --new-blocklevel-tags article,header,footer --new-inline-tags video,audio,canvas,ruby,rt,rp --break-before-br yes --sort-attributes alpha --vertical-space yes home.html > .home.html; mv .home.html home.html
tidy --as-xhtml --drop-empty-elements no --input-xml --tidy-mark no -indent --indent-spaces 4 -wrap 0 --new-blocklevel-tags article,header,footer --new-inline-tags video,audio,canvas,ruby,rt,rp --break-before-br yes --sort-attributes alpha --vertical-space yes toopie.html > .toopie.html; mv .toopie.html toopie.html
tidy --as-xhtml --drop-empty-elements no --input-xml --tidy-mark no -indent --indent-spaces 4 -wrap 0 --new-blocklevel-tags article,header,footer --new-inline-tags video,audio,canvas,ruby,rt,rp --break-before-br yes --sort-attributes alpha --vertical-space yes options/options.html > options/.options.html; mv options/.options.html options/options.html
find . -path ./node_modules -prune -o -name '*.js' -exec prettier --write {} \;
find . -path ./node_modules -prune -o -name '*.json' -exec prettier --write {} \;

View File

@@ -1,18 +1,18 @@
var titlepref = chrome.i18n.getMessage('titlePreface');
var titleprefpriv = chrome.i18n.getMessage('titlePrefacePrivate');
var webpref = chrome.i18n.getMessage('webPreface');
var webprefpriv = chrome.i18n.getMessage('webPrefacePrivate');
var routerpref = chrome.i18n.getMessage('routerPreface');
var routerprefpriv = chrome.i18n.getMessage('routerPrefacePrivate');
var mailpref = chrome.i18n.getMessage('mailPreface');
var mailprefpriv = chrome.i18n.getMessage('mailPrefacePrivate');
var torrentpref = chrome.i18n.getMessage('torrentPreface');
var torrentprefpriv = chrome.i18n.getMessage('torrentPrefacePrivate');
var tunnelpref = chrome.i18n.getMessage('i2ptunnelPreface');
var tunnelprefpriv = chrome.i18n.getMessage('i2ptunnelPrefacePrivate');
var localpref = chrome.i18n.getMessage('localPreface');
var localprefpriv = chrome.i18n.getMessage('localPrefacePrivate');
var extensionpref = chrome.i18n.getMessage('extensionPreface');
var titlepref = chrome.i18n.getMessage("titlePreface");
var titleprefpriv = chrome.i18n.getMessage("titlePrefacePrivate");
var webpref = chrome.i18n.getMessage("webPreface");
var webprefpriv = chrome.i18n.getMessage("webPrefacePrivate");
var routerpref = chrome.i18n.getMessage("routerPreface");
var routerprefpriv = chrome.i18n.getMessage("routerPrefacePrivate");
var mailpref = chrome.i18n.getMessage("mailPreface");
var mailprefpriv = chrome.i18n.getMessage("mailPrefacePrivate");
var torrentpref = chrome.i18n.getMessage("torrentPreface");
var torrentprefpriv = chrome.i18n.getMessage("torrentPrefacePrivate");
var tunnelpref = chrome.i18n.getMessage("i2ptunnelPreface");
var tunnelprefpriv = chrome.i18n.getMessage("i2ptunnelPrefacePrivate");
var localpref = chrome.i18n.getMessage("localPreface");
var localprefpriv = chrome.i18n.getMessage("localPrefacePrivate");
var extensionpref = chrome.i18n.getMessage("extensionPreface");
function onContextsGot(contexts) {
var ids = [];
@@ -20,13 +20,13 @@ function onContextsGot(contexts) {
console.log(`Name : ${context.name}`);
ids.push(context.name);
}
console.log('Checking new contexts');
console.log("Checking new contexts");
if (ids.indexOf(titlepref) == -1) {
browser.contextualIdentities
.create({
name: titlepref,
color: 'orange',
icon: 'fingerprint'
color: "orange",
icon: "fingerprint"
})
.then(onCreated, onNotCreated);
}
@@ -34,8 +34,8 @@ function onContextsGot(contexts) {
browser.contextualIdentities
.create({
name: webpref,
color: 'red',
icon: 'circle'
color: "red",
icon: "circle"
})
.then(onCreated, onNotCreated);
}
@@ -43,8 +43,8 @@ function onContextsGot(contexts) {
browser.contextualIdentities
.create({
name: routerpref,
color: 'blue',
icon: 'briefcase'
color: "blue",
icon: "briefcase"
})
.then(onCreated, onNotCreated);
}
@@ -52,8 +52,8 @@ function onContextsGot(contexts) {
browser.contextualIdentities
.create({
name: tunnelpref,
color: 'green',
icon: 'tree'
color: "green",
icon: "tree"
})
.then(onCreated, onNotCreated);
}
@@ -61,8 +61,8 @@ function onContextsGot(contexts) {
browser.contextualIdentities
.create({
name: mailpref,
color: 'yellow',
icon: 'briefcase'
color: "yellow",
icon: "briefcase"
})
.then(onCreated, onNotCreated);
}
@@ -70,8 +70,8 @@ function onContextsGot(contexts) {
browser.contextualIdentities
.create({
name: torrentpref,
color: 'purple',
icon: 'chill'
color: "purple",
icon: "chill"
})
.then(onCreated, onNotCreated);
}
@@ -79,30 +79,30 @@ function onContextsGot(contexts) {
browser.contextualIdentities
.create({
name: localpref,
color: 'red',
icon: 'fence'
color: "red",
icon: "fence"
})
.then(onCreated, onNotCreated);
}
}
function onContextsError() {
console.log('Error finding contextual identities, is the API enabled?');
console.log("Error finding contextual identities, is the API enabled?");
}
function onCreated(context) {
console.log(' ID:', context.cookieStoreId, 'created.');
console.log(" ID:", context.cookieStoreId, "created.");
}
function onNotCreated(context) {
console.log('ID:', context.cookieStoreId, 'not created.');
console.log("ID:", context.cookieStoreId, "not created.");
}
browser.contextualIdentities.query({}).then(onContextsGot, onContextsError);
var gettingInfo = browser.runtime.getPlatformInfo();
gettingInfo.then(got => {
if (got.os != 'android') {
if (got.os != "android") {
browser.windows.onCreated.addListener(themeWindow);
browser.windows.onFocusChanged.addListener(themeWindow);
browser.windows.onRemoved.addListener(themeWindow);
@@ -115,7 +115,7 @@ function themeWindowByTab(tabId) {
function tabWindow(tab) {
var gettingPlatformInfo = browser.runtime.getPlatformInfo();
gettingPlatformInfo.then(got => {
if (got.os == 'android') {
if (got.os == "android") {
let getwindow = browser.tabs.get(tab.tabId);
getwindow.then(themeWindow);
} else {
@@ -124,7 +124,7 @@ function themeWindowByTab(tabId) {
}
});
}
if (typeof tabId === 'number') {
if (typeof tabId === "number") {
let tab = browser.tabs.get(tabId);
tab.then(tabWindow);
} else {
@@ -150,108 +150,108 @@ var getOldTheme = async function getOldTheme() {
let foundtheme = await browser.theme.getCurrent();
if (!isEmpty(foundtheme)) {
oldtheme = foundtheme;
console.log('Found old theme', oldtheme);
console.log("Found old theme", oldtheme);
}
return oldtheme;
}
};
getOldTheme();
function themeWindow(window) {
// Check if the window is in private browsing
function onThemeError() {
console.log('got theme', oldtheme);
console.log("got theme", oldtheme);
browser.theme.update(oldtheme);
}
function logTabs(tabInfo) {
function onContextGotTheme(context) {
if (context.name == titlepref) {
console.log('Active in I2P window');
console.log("Active in I2P window");
if (window.incognito) {
browser.theme.update(window.id, {
colors: {
frame: '#FFC56D',
toolbar: '#FFC56D'
frame: "#FFC56D",
toolbar: "#FFC56D"
}
});
} else {
browser.theme.update(window.id, {
colors: {
frame: '#FFC56D',
toolbar: '#FFC56D'
frame: "#FFC56D",
toolbar: "#FFC56D"
}
});
}
} else if (context.name == routerpref) {
console.log('Active in Router Console window');
console.log("Active in Router Console window");
if (window.incognito) {
browser.theme.update(window.id, {
colors: {
frame: '#A4C8E1',
toolbar: '#A4C8E1'
frame: "#A4C8E1",
toolbar: "#A4C8E1"
}
});
} else {
browser.theme.update(window.id, {
colors: {
frame: '#A4C8E1',
toolbar: '#A4C8E1'
frame: "#A4C8E1",
toolbar: "#A4C8E1"
}
});
}
} else if (context.name == tunnelpref) {
console.log('Active in Hidden Services Manager window');
console.log("Active in Hidden Services Manager window");
if (window.incognito) {
browser.theme.update(window.id, {
colors: {
frame: '#D9D9D6',
toolbar: '#D9D9D6'
frame: "#D9D9D6",
toolbar: "#D9D9D6"
}
});
} else {
browser.theme.update(window.id, {
colors: {
frame: '#D9D9D6',
toolbar: '#D9D9D6'
frame: "#D9D9D6",
toolbar: "#D9D9D6"
}
});
}
} else if (context.name == mailpref) {
console.log('Active in Web Mail window');
console.log("Active in Web Mail window");
if (window.incognito) {
browser.theme.update(window.id, {
colors: {
frame: '#F7E59A',
toolbar: '#F7E59A'
frame: "#F7E59A",
toolbar: "#F7E59A"
}
});
} else {
browser.theme.update(window.id, {
colors: {
frame: '#F7E59A',
toolbar: '#F7E59A'
frame: "#F7E59A",
toolbar: "#F7E59A"
}
});
}
} else if (context.name == torrentpref) {
console.log('Active in Bittorrent window');
console.log("Active in Bittorrent window");
if (window.incognito) {
browser.theme.update(window.id, {
colors: {
frame: '#A48FE1',
toolbar: '#A48FE1'
frame: "#A48FE1",
toolbar: "#A48FE1"
}
});
} else {
browser.theme.update(window.id, {
colors: {
frame: '#A48FE1',
toolbar: '#A48FE1'
frame: "#A48FE1",
toolbar: "#A48FE1"
}
});
}
} else {
console.log('Not active in I2P window');
console.log("Not active in I2P window");
if (isEmpty(oldtheme)) {
browser.theme.reset();
} else {
@@ -260,8 +260,8 @@ function themeWindow(window) {
}
}
if (
tabInfo[0].cookieStoreId != 'firefox-default' &&
tabInfo[0].cookieStoreId != 'firefox-private'
tabInfo[0].cookieStoreId != "firefox-default" &&
tabInfo[0].cookieStoreId != "firefox-private"
) {
browser.contextualIdentities
.get(tabInfo[0].cookieStoreId)
@@ -283,109 +283,109 @@ function themeWindow(window) {
function setTitle(window) {
// Check if the window is in private browsing
function onContextError() {
console.log('Context Error');
console.log("Context Error");
}
function logTabs(tabInfo) {
function onContextGotTitle(context) {
if (context.name == titlepref) {
console.log('Active in I2P window');
console.log("Active in I2P window");
if (window.incognito) {
browser.windows.update(window.id, {
titlePreface: titleprefpriv + ': '
titlePreface: titleprefpriv + ": "
});
} else {
browser.windows.update(window.id, {
titlePreface: titlepref + ': '
titlePreface: titlepref + ": "
});
}
} else if (context.name == webpref) {
console.log('Active in Web window');
console.log("Active in Web window");
if (window.incognito) {
browser.windows.update(window.id, {
titlePreface: webprefpriv + ' - '
titlePreface: webprefpriv + " - "
});
} else {
browser.windows.update(window.id, {
titlePreface: webpref + ' - '
titlePreface: webpref + " - "
});
}
} else if (context.name == routerpref) {
console.log('Active in Router Console window');
console.log("Active in Router Console window");
if (window.incognito) {
browser.windows.update(window.id, {
titlePreface: titleprefpriv + ' - ' + routerprefpriv + ': '
titlePreface: titleprefpriv + " - " + routerprefpriv + ": "
});
} else {
browser.windows.update(window.id, {
titlePreface: titlepref + ' - ' + routerpref + ': '
titlePreface: titlepref + " - " + routerpref + ": "
});
}
} else if (context.name == tunnelpref) {
console.log('Active in Hidden Services Manager window');
console.log("Active in Hidden Services Manager window");
if (window.incognito) {
browser.windows.update(window.id, {
titlePreface: titleprefpriv + ' - ' + tunnelprefpriv + ': '
titlePreface: titleprefpriv + " - " + tunnelprefpriv + ": "
});
} else {
browser.windows.update(window.id, {
titlePreface: titlepref + ' - ' + tunnelpref + ': '
titlePreface: titlepref + " - " + tunnelpref + ": "
});
}
} else if (context.name == mailpref) {
console.log('Active in I2P Web Mail window');
console.log("Active in I2P Web Mail window");
if (window.incognito) {
browser.windows.update(window.id, {
titlePreface: titleprefpriv + ' - ' + mailprefpriv + ': '
titlePreface: titleprefpriv + " - " + mailprefpriv + ": "
});
} else {
browser.windows.update(window.id, {
titlePreface: titlepref + ' - ' + mailpref + ': '
titlePreface: titlepref + " - " + mailpref + ": "
});
}
} else if (context.name == torrentpref) {
console.log('Active in I2P Torrent window');
console.log("Active in I2P Torrent window");
if (window.incognito) {
browser.windows.update(window.id, {
titlePreface: titleprefpriv + ' - ' + torrentprefpriv + ': '
titlePreface: titleprefpriv + " - " + torrentprefpriv + ": "
});
} else {
browser.windows.update(window.id, {
titlePreface: titlepref + ' - ' + torrentpref + ': '
titlePreface: titlepref + " - " + torrentpref + ": "
});
}
} else if (context.name == localpref) {
console.log('Active in Localhost window');
console.log("Active in Localhost window");
if (window.incognito) {
browser.windows.update(window.id, {
titlePreface: localprefpriv + ' - ' + localprefpriv + ': '
titlePreface: localprefpriv + " - " + localprefpriv + ": "
});
} else {
browser.windows.update(window.id, {
titlePreface: localpref + ' - ' + localpref + ': '
titlePreface: localpref + " - " + localpref + ": "
});
}
}
}
if (
tabInfo[0].cookieStoreId != 'firefox-default' &&
tabInfo[0].cookieStoreId != 'firefox-private'
tabInfo[0].cookieStoreId != "firefox-default" &&
tabInfo[0].cookieStoreId != "firefox-private"
) {
browser.contextualIdentities
.get(tabInfo[0].cookieStoreId)
.then(onContextGotTitle, onContextError);
} else if (window.incognito) {
browser.windows.update(window.id, {
titlePreface: ''
titlePreface: ""
});
} else {
browser.windows.update(window.id, {
titlePreface: ''
titlePreface: ""
});
}
}
@@ -400,9 +400,9 @@ function setTitle(window) {
var gettingListenerInfo = browser.runtime.getPlatformInfo();
gettingListenerInfo.then(got => {
function onPlatformError() {
console.log('Error finding platform info');
console.log("Error finding platform info");
}
if (got.os != 'android') {
if (got.os != "android") {
browser.tabs.onCreated.addListener(() => {
var getting = browser.windows.getCurrent({
populate: true

View File

@@ -1,28 +1,28 @@
var gettingInfo = browser.runtime.getPlatformInfo();
gettingInfo.then(got => {
if (got.os != 'android') {
if (got.os != "android") {
function bookmarks(bookmarkToolbar) {
console.log('Setting up bookmark toolbar', bookmarkToolbar);
console.log("Setting up bookmark toolbar", bookmarkToolbar);
function bookHome(bookmarkItems) {
if (!bookmarkItems.length) {
function gotProxyInfo(info) {
let port = info.value.http.split(':')[1];
if (port == '7644') {
let port = info.value.http.split(":")[1];
if (port == "7644") {
let createRhizomeBookmark = browser.bookmarks.create({
url: 'about:I2p',
title: 'I2P Home Page',
url: "about:I2p",
title: "I2P Home Page",
parentId: bookmarkToolbar[0].id
});
createRhizomeBookmark.then(onCreated);
} else {
let createBookmark = browser.bookmarks.create({
url: browser.runtime.getURL('home.html'),
title: 'I2P Home Page',
url: browser.runtime.getURL("home.html"),
title: "I2P Home Page",
parentId: bookmarkToolbar[0].id
});
createBookmark.then(onCreated);
}
console.log('(bookmarks) adding home page bookmark');
console.log("(bookmarks) adding home page bookmark");
}
console.log(
"(bookmarks) checking if we're running in an I2P Browser"
@@ -34,19 +34,19 @@ gettingInfo.then(got => {
function bookTorrent(bookmarkItems) {
if (!bookmarkItems.length) {
function gotProxyInfo(info) {
let port = info.value.http.split(':')[1];
if (port == '7644') {
let port = info.value.http.split(":")[1];
if (port == "7644") {
let createBookmark = browser.bookmarks.create({
url: 'http://localhost:7647/i2psnark',
title: 'Bittorrent',
url: "http://localhost:7647/i2psnark",
title: "Bittorrent",
parentId: bookmarkToolbar[0].id
});
createBookmark.then(onCreated);
} else {
let createRhizomeBookmark = browser.bookmarks.create({
url:
'http://' + control_host + ':' + control_port + '/i2psnark',
title: 'Bittorrent',
"http://" + control_host + ":" + control_port + "/i2psnark",
title: "Bittorrent",
parentId: bookmarkToolbar[0].id
});
createRhizomeBookmark.then(onCreated);
@@ -62,23 +62,23 @@ gettingInfo.then(got => {
function bookMail(bookmarkItems) {
if (!bookmarkItems.length) {
function gotProxyInfo(info) {
let port = info.value.http.split(':')[1];
if (port == '7644') {
let port = info.value.http.split(":")[1];
if (port == "7644") {
let createBookmark = browser.bookmarks.create({
url: 'http://localhost:7647/webmail',
title: 'Web Mail',
url: "http://localhost:7647/webmail",
title: "Web Mail",
parentId: bookmarkToolbar[0].id
});
createBookmark.then(onCreated);
} else {
let createRhizomeBookmark = browser.bookmarks.create({
url: 'http://' + control_host + ':' + control_port + '/webmail',
title: 'Web Mail',
url: "http://" + control_host + ":" + control_port + "/webmail",
title: "Web Mail",
parentId: bookmarkToolbar[0].id
});
createRhizomeBookmark.then(onCreated);
}
console.log('(bookmarks) adding webmail bookmark');
console.log("(bookmarks) adding webmail bookmark");
}
console.log(
"(bookmarks) checking if we're running in an I2P Browser"
@@ -90,28 +90,28 @@ gettingInfo.then(got => {
function bookI2PTunnel(bookmarkItems) {
if (!bookmarkItems.length) {
function gotProxyInfo(info) {
let port = info.value.http.split(':')[1];
if (port == '7644') {
let port = info.value.http.split(":")[1];
if (port == "7644") {
var createBookmark = browser.bookmarks.create({
url: 'http://localhost:7647/i2ptunnelmgr',
title: 'Hidden Services Manager',
url: "http://localhost:7647/i2ptunnelmgr",
title: "Hidden Services Manager",
parentId: bookmarkToolbar[0].id
});
createBookmark.then(onCreated);
} else {
var createRhizomeBookmark = browser.bookmarks.create({
url:
'http://' +
"http://" +
control_host +
':' +
":" +
control_port +
'/i2ptunnelmgr',
title: 'Hidden Services Manager',
"/i2ptunnelmgr",
title: "Hidden Services Manager",
parentId: bookmarkToolbar[0].id
});
createRhizomeBookmark.then(onCreated);
}
console.log('(bookmarks) adding i2ptunnel bookmark');
console.log("(bookmarks) adding i2ptunnel bookmark");
}
console.log(
"(bookmarks) checking if we're running in an I2P Browser"
@@ -125,32 +125,32 @@ gettingInfo.then(got => {
console.log(`An error : ${error}`);
}
function onCreated(node) {
console.log('Bookmarked', node);
console.log("Bookmarked", node);
}
var b0 = browser.bookmarks.search({
title: 'I2P Home Page'
title: "I2P Home Page"
});
b0.then(bookHome, onRejected);
var b1 = browser.bookmarks.search({
title: 'Bittorrent'
title: "Bittorrent"
});
b1.then(bookTorrent, onRejected);
var b2 = browser.bookmarks.search({
title: 'Hidden Services Manager'
title: "Hidden Services Manager"
});
b2.then(bookI2PTunnel, onRejected);
var b3 = browser.bookmarks.search({
title: 'Web Mail'
title: "Web Mail"
});
b3.then(bookMail, onRejected);
}
var bt = browser.bookmarks.search({
query: 'Toolbar'
query: "Toolbar"
});
bt.then(bookmarks);

View File

@@ -1,6 +1,6 @@
var proxy_scheme = 'HTTP';
var proxy_host = '127.0.0.1';
var proxy_port = '4444';
var control_host = '127.0.0.1';
var control_port = '7657';
var proxy_scheme = "HTTP";
var proxy_host = "127.0.0.1";
var proxy_port = "4444";
var control_host = "127.0.0.1";
var control_port = "7657";
var disable_history = false;

View File

@@ -2,51 +2,51 @@ function contentUpdateById(id, message) {
let infoTitle = document.getElementById(id);
let messageContent = chrome.i18n.getMessage(message);
if (infoTitle === null) {
console.log('content error', id, messageContent);
console.log("content error", id, messageContent);
return;
}
infoTitle.textContent = messageContent;
}
// Information Section
contentUpdateById('text-section-header', 'extensionName');
contentUpdateById('description', 'extensionDescription');
contentUpdateById('beta', 'extensionStatus');
contentUpdateById('proxy-check', 'proxyFailedStatus');
contentUpdateById("text-section-header", "extensionName");
contentUpdateById("description", "extensionDescription");
contentUpdateById("beta", "extensionStatus");
contentUpdateById("proxy-check", "proxyFailedStatus");
// Control Section
contentUpdateById('controlHeader', 'controlHeader');
contentUpdateById('controlExplain', 'controlExplain');
contentUpdateById('clear-browser-data', 'clearData');
contentUpdateById('clear-desc', 'clearDesc');
contentUpdateById('enable-web-rtc', 'enableWebRTC');
contentUpdateById('rtcDesc', 'rtcDesc');
contentUpdateById('disable-history', 'disableHistory');
contentUpdateById('histDesc', 'histDesc');
contentUpdateById("controlHeader", "controlHeader");
contentUpdateById("controlExplain", "controlExplain");
contentUpdateById("clear-browser-data", "clearData");
contentUpdateById("clear-desc", "clearDesc");
contentUpdateById("enable-web-rtc", "enableWebRTC");
contentUpdateById("rtcDesc", "rtcDesc");
contentUpdateById("disable-history", "disableHistory");
contentUpdateById("histDesc", "histDesc");
// Application Section
contentUpdateById('applicationHeader', 'applicationHeader');
contentUpdateById('applicationExplain', 'applicationExplain');
contentUpdateById('window-visit-index', 'windowVisitHelppage');
contentUpdateById('help', 'help');
contentUpdateById('window-visit-homepage', 'windowVisitHomepage');
contentUpdateById('abouthome', 'abouthome');
contentUpdateById('window-visit-i2ptunnel', 'windowVisitI2ptunnel');
contentUpdateById('i2ptunnel', 'i2ptunnel');
contentUpdateById('window-visit-susimail', 'windowVisitSusiMail');
contentUpdateById('susimail', 'susimail');
contentUpdateById('window-visit-snark', 'windowVisitSnark');
contentUpdateById('snark', 'snark');
contentUpdateById("applicationHeader", "applicationHeader");
contentUpdateById("applicationExplain", "applicationExplain");
contentUpdateById("window-visit-index", "windowVisitHelppage");
contentUpdateById("help", "help");
contentUpdateById("window-visit-homepage", "windowVisitHomepage");
contentUpdateById("abouthome", "abouthome");
contentUpdateById("window-visit-i2ptunnel", "windowVisitI2ptunnel");
contentUpdateById("i2ptunnel", "i2ptunnel");
contentUpdateById("window-visit-susimail", "windowVisitSusiMail");
contentUpdateById("susimail", "susimail");
contentUpdateById("window-visit-snark", "windowVisitSnark");
contentUpdateById("snark", "snark");
// Homepage Section
contentUpdateById('window-visit-webpage', 'windowVisitWebPage');
contentUpdateById('webpage', 'help');
contentUpdateById('window-visit-sources', 'windowVisitSources');
contentUpdateById('sources', 'sources');
contentUpdateById('window-visit-releases', 'windowVisitReleases');
contentUpdateById('releases', 'releases');
contentUpdateById("window-visit-webpage", "windowVisitWebPage");
contentUpdateById("webpage", "help");
contentUpdateById("window-visit-sources", "windowVisitSources");
contentUpdateById("sources", "sources");
contentUpdateById("window-visit-releases", "windowVisitReleases");
contentUpdateById("releases", "releases");
fetch('http://proxy.i2p').then(myJson => {
console.log('FETCH RESULT', myJson);
contentUpdateById('proxy-check', 'proxySuccessStatus');
fetch("http://proxy.i2p").then(myJson => {
console.log("FETCH RESULT", myJson);
contentUpdateById("proxy-check", "proxySuccessStatus");
});

View File

@@ -1,5 +1,5 @@
//var windowIds = []
var titlepref = chrome.i18n.getMessage('titlePreface');
var titlepref = chrome.i18n.getMessage("titlePreface");
function onError(error) {
console.log(`Error : ${error}`);
@@ -10,17 +10,17 @@ function eventHandler(event) {
console.log(`Created window : ${windowInfo.id}`);
browser.tabs.create({
windowId: windowInfo.id,
url: 'about:blank',
url: "about:blank",
cookieStoreId: event.target.dataset.identity
});
}
if (event.target.dataset.action == 'create') {
if (event.target.dataset.action == "create") {
var creating = browser.tabs.create({
cookieStoreId: event.target.dataset.identity
});
creating.then(onCreated, onError);
}
if (event.target.dataset.action == 'close-all') {
if (event.target.dataset.action == "close-all") {
browser.tabs
.query({
cookieStoreId: event.target.dataset.identity

View File

@@ -1,43 +1,43 @@
function routerHost(url) {
let hostname = '';
let path = '';
let hostname = "";
let path = "";
function pathcheck(str) {
if (str != undefined) {
let final = str.split('/')[0];
if (final === 'i2ptunnelmgr' || final === 'i2ptunnel') {
console.log('(urlcheck) application path', final);
return 'i2ptunnelmgr';
} else if (final === 'i2psnark' || final === 'torrents') {
console.log('(urlcheck) application path', final);
return 'i2psnark';
} else if (final === 'webmail' || final === 'susimail') {
console.log('(urlcheck) application path', final);
return 'webmail';
let final = str.split("/")[0];
if (final === "i2ptunnelmgr" || final === "i2ptunnel") {
console.log("(urlcheck) application path", final);
return "i2ptunnelmgr";
} else if (final === "i2psnark" || final === "torrents") {
console.log("(urlcheck) application path", final);
return "i2psnark";
} else if (final === "webmail" || final === "susimail") {
console.log("(urlcheck) application path", final);
return "webmail";
} else if (
final === 'home' ||
final === 'console' ||
final === 'dns' ||
final.startsWith('config')
final === "home" ||
final === "console" ||
final === "dns" ||
final.startsWith("config")
) {
console.log('(urlcheck) application path', final);
return 'routerconsole';
console.log("(urlcheck) application path", final);
return "routerconsole";
}
}
return true;
}
if (url.indexOf('://') > -1) {
hostname = url.split('/')[2];
let prefix = url.substr(0, url.indexOf('://') + 3);
path = url.replace(prefix + hostname + '/', '');
if (url.indexOf("://") > -1) {
hostname = url.split("/")[2];
let prefix = url.substr(0, url.indexOf("://") + 3);
path = url.replace(prefix + hostname + "/", "");
} else if (identifyProtocolHandler(url)) {
let newurl = identifyProtocolHandler(url);
return routerHost(newurl);
} else {
hostname = url.split('/')[0];
path = url.replace(hostname + '/', '');
hostname = url.split("/")[0];
path = url.replace(hostname + "/", "");
}
if (hostname === control_host + ':' + control_port) {
console.log('(hostcheck) router console found on configured ports');
if (hostname === control_host + ":" + control_port) {
console.log("(hostcheck) router console found on configured ports");
return pathcheck(path);
}
@@ -47,28 +47,28 @@ function routerHost(url) {
function identifyProtocolHandler(url) {
//console.log("looking for handler-able requests")
if (routerHost(url)) {
if (url.includes(encodeURIComponent('ext+rc:'))) {
return url.replace(encodeURIComponent('ext+rc:'), '');
} else if (url.includes('ext+rc:')) {
return url.replace('ext+rc:', '');
if (url.includes(encodeURIComponent("ext+rc:"))) {
return url.replace(encodeURIComponent("ext+rc:"), "");
} else if (url.includes("ext+rc:")) {
return url.replace("ext+rc:", "");
}
} else if (url.includes('ext+rc:')) {
} else if (url.includes("ext+rc:")) {
return 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];
let hostname = "";
let prefix = "";
if (url.indexOf("://") > -1) {
prefix = url.substr(0, url.indexOf("://") + 3);
hostname = url.split("/")[2];
} else {
hostname = url.split('/')[0];
hostname = url.split("/")[0];
}
let path = url.replace(prefix + hostname, '');
console.log('(handler) path', prefix + hostname, path);
let path = url.replace(prefix + hostname, "");
console.log("(handler) path", prefix + hostname, path);
return path;
}
@@ -76,7 +76,7 @@ var handlerSetup = function(requestDetails) {
//console.log("checking protocol handler listener")
let 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 = trimHost(rwurl);
requestDetails.originUrl = trimHost(rwurl);
@@ -86,6 +86,6 @@ var handlerSetup = function(requestDetails) {
browser.webRequest.onBeforeRequest.addListener(
handlerSetup,
{ urls: ['<all_urls>'] },
['blocking']
{ urls: ["<all_urls>"] },
["blocking"]
);

View File

@@ -9,7 +9,7 @@
</head>
<body>
<!--<div>-->
<script src="home.js" type="text/javascript"></script>
<script src="home.js" type="text/javascript"></script>
<script src="content.js" type="text/javascript"></script>
<div class='background'>
<div class='content'>
@@ -41,7 +41,7 @@
<div class="hideIfI2PConsoleOff" id="onboarding">
<h3 id="onboardingTitle">New to I2P? Learn more here.</h3>
<h4 id="onboardingZero"><button class="showhider" id="onboardingButtonZero")">Protect your Privacy</button>
<h4 id="onboardingZero"><button class="showhider" id="onboardingButtonZero">Protect your Privacy</button>
</h4>
<p class="onboardingContent" id="onboardingContentZero">I2P Browser allows you to surf the internet using the private and secure I2P network. When using it, you are protected against tracking, surveillance, and censorship as a first-class participant in the I2P network. I2P Browser isolates cookies and deletes your browser history after your session. These modifications ensure your privacy and security are protected in the browser.</p>

34
home.js
View File

@@ -1,25 +1,25 @@
document.addEventListener('click', clickEvent => {
if (clickEvent.target.id === 'onboardingButtonZero') {
flipVisibility('onboardingContentZero');
} else if (clickEvent.target.id === 'onboardingButtonOne') {
flipVisibility('onboardingContentOne');
} else if (clickEvent.target.id === 'onboardingButtonTwo') {
flipVisibility('onboardingContentTwo');
} else if (clickEvent.target.id === 'onboardingButtonThree') {
flipVisibility('onboardingContentThree');
} else if (clickEvent.target.id === 'onboardingButtonFour') {
flipVisibility('onboardingContentFour');
} else if (clickEvent.target.id === 'fliplinks') {
flipVisibility('info-content');
document.addEventListener("click", clickEvent => {
if (clickEvent.target.id === "onboardingButtonZero") {
flipVisibility("onboardingContentZero");
} else if (clickEvent.target.id === "onboardingButtonOne") {
flipVisibility("onboardingContentOne");
} else if (clickEvent.target.id === "onboardingButtonTwo") {
flipVisibility("onboardingContentTwo");
} else if (clickEvent.target.id === "onboardingButtonThree") {
flipVisibility("onboardingContentThree");
} else if (clickEvent.target.id === "onboardingButtonFour") {
flipVisibility("onboardingContentFour");
} else if (clickEvent.target.id === "fliplinks") {
flipVisibility("info-content");
}
});
function flipVisibility(div) {
console.log("(home) seeking flippable", div)
console.log("(home) seeking flippable", div);
let flippable = document.getElementById(div);
if (flippable.style.display === 'none') {
flippable.style.display = 'block';
if (flippable.style.display !== "block") {
flippable.style.display = "block";
} else {
flippable.style.display = 'none';
flippable.style.display = "none";
}
}

94
host.js
View File

@@ -1,27 +1,27 @@
function proxyHost(url) {
let hostname = '';
if (url.indexOf('://') > -1) {
hostname = url.split('/')[2];
let hostname = "";
if (url.indexOf("://") > -1) {
hostname = url.split("/")[2];
} else {
hostname = url.split('/')[0];
hostname = url.split("/")[0];
}
if (hostname == 'proxy.i2p') {
if (hostname == "proxy.i2p") {
return true;
}
return false;
}
function localHost(url) {
let hostname = '';
if (url.indexOf('://') > -1) {
hostname = url.split('/')[2];
let hostname = "";
if (url.indexOf("://") > -1) {
hostname = url.split("/")[2];
} else {
hostname = url.split('/')[0];
hostname = url.split("/")[0];
}
hostname = hostname.split(':')[0];
if (hostname === '127.0.0.1') {
hostname = hostname.split(":")[0];
if (hostname === "127.0.0.1") {
return true;
} else if (hostname === 'localhost') {
} else if (hostname === "localhost") {
return true;
}
@@ -30,74 +30,74 @@ function localHost(url) {
function extensionHost(url) {
if (url.originUrl !== undefined) {
var res = url.originUrl.startsWith(browser.runtime.getURL(''));
var res = url.originUrl.startsWith(browser.runtime.getURL(""));
if (res) return res;
}
if (url.url !== undefined) {
var res = url.url.startsWith(browser.runtime.getURL(''));
var res = url.url.startsWith(browser.runtime.getURL(""));
if (res) return res;
}
}
function i2pHostName(url) {
let hostname = '';
if (url.indexOf('://') > -1) {
hostname = url.split('/')[2];
let hostname = "";
if (url.indexOf("://") > -1) {
hostname = url.split("/")[2];
} else {
hostname = url.split('/')[0];
hostname = url.split("/")[0];
}
return hostname;
}
function i2pHost(url) {
let hostname = i2pHostName(url);
return hostname.endsWith('.i2p');
return hostname.endsWith(".i2p");
}
function routerHost(url) {
let hostname = '';
let path = '';
let hostname = "";
let path = "";
function pathcheck(str) {
if (str != undefined) {
let final = str.split('/')[0];
if (final === 'i2ptunnelmgr' || final === 'i2ptunnel') {
console.log('(urlcheck) application path', final);
return 'i2ptunnelmgr';
let final = str.split("/")[0];
if (final === "i2ptunnelmgr" || final === "i2ptunnel") {
console.log("(urlcheck) application path", final);
return "i2ptunnelmgr";
} else if (
final === 'i2psnark' ||
final === 'torrents' ||
final.startsWith('transmission')
final === "i2psnark" ||
final === "torrents" ||
final.startsWith("transmission")
) {
console.log('(urlcheck) application path', final);
return 'i2psnark';
} else if (final === 'webmail' || final === 'susimail') {
console.log('(urlcheck) application path', final);
return 'webmail';
console.log("(urlcheck) application path", final);
return "i2psnark";
} else if (final === "webmail" || final === "susimail") {
console.log("(urlcheck) application path", final);
return "webmail";
} else if (
final === 'home' ||
final === 'console' ||
final === 'dns' ||
final.startsWith('config')
final === "home" ||
final === "console" ||
final === "dns" ||
final.startsWith("config")
) {
console.log('(urlcheck) application path', final);
return 'routerconsole';
console.log("(urlcheck) application path", final);
return "routerconsole";
}
}
return true;
}
if (url.indexOf('://') > -1) {
hostname = url.split('/')[2];
let prefix = url.substr(0, url.indexOf('://') + 3);
path = url.replace(prefix + hostname + '/', '');
if (url.indexOf("://") > -1) {
hostname = url.split("/")[2];
let prefix = url.substr(0, url.indexOf("://") + 3);
path = url.replace(prefix + hostname + "/", "");
} else if (identifyProtocolHandler(url)) {
let newurl = identifyProtocolHandler(url);
return routerHost(newurl);
} else {
hostname = url.split('/')[0];
path = url.replace(hostname + '/', '');
hostname = url.split("/")[0];
path = url.replace(hostname + "/", "");
}
if (hostname === control_host + ':' + control_port) {
console.log('(hostcheck) router console found on configured ports');
if (hostname === control_host + ":" + control_port) {
console.log("(hostcheck) router console found on configured ports");
return pathcheck(path);
}

View File

@@ -51,4 +51,7 @@ img.readyness {
}
#consoleOn {
min-height: 2rem
}
#torrentpanel {
display: none
}

24
info.js
View File

@@ -2,8 +2,8 @@ function checkPeerConnection() {
let getting = browser.privacy.network.peerConnectionEnabled.get({});
getting.then(got => {
let webrtc = got.value;
console.log('checking webrtc', webrtc);
document.getElementById('enable-web-rtc').checked = webrtc;
console.log("checking webrtc", webrtc);
document.getElementById("enable-web-rtc").checked = webrtc;
});
}
@@ -142,18 +142,18 @@ gettingInfo.then(got => {
}
});
function showBrowsing(){
var x = document.getElementById("browserpanel");
x.style.display = "block";
var y = document.getElementById("torrentpanel");
y.style.display = "none";
function showBrowsing() {
var x = document.getElementById("browserpanel");
x.style.display = "block";
var y = document.getElementById("torrentpanel");
y.style.display = "none";
}
function showTorrents(){
var x = document.getElementById("browserpanel");
x.style.display = "none";
var y = document.getElementById("torrentpanel");
y.style.display = "block";
function showTorrents() {
var x = document.getElementById("browserpanel");
x.style.display = "none";
var y = document.getElementById("torrentpanel");
y.style.display = "block";
}
function goHome() {

View File

@@ -1,31 +1,35 @@
<!DOCTYPE html>
<html>
<head>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="/home.css"/>
<link rel="stylesheet" href="options.css"/>
</head>
<body>
<link href="/home.css" rel="stylesheet">
<link href="options.css" rel="stylesheet">
<title>
</title>
</head>
<body>
<section class="scheme-options">
<span class="title">Proxy Scheme:</span>
<select id="proxy_scheme">
<option value="http" selected>HTTP</option>
<option value="socks5">SOCKS5</option>
</select>
<span class="title">Proxy Scheme:</span> <select id="proxy_scheme">
<option selected value="http">
HTTP
</option>
<option value="socks5">
SOCKS5
</option>
</select>
</section>
<section class="scheme-options proxy-options">
<div class="title" >Proxy Options</div>
<p id="proxyHelpText"> </p>
<label id="portText">Host: </label>
<input type="text" data="host" id="host" value="127.0.0.1"/>
<br>
<label id="hostText">Port: </label>
<input type="text" data="port" id="port" value="4444"/>
</section>
<div class="title">
Proxy Options
</div>
<p id="proxyHelpText">
</p>
<label id="portText">Host:</label> <input data="host" id="host" type="text" value="127.0.0.1">
<br>
<label id="hostText">Port:</label> <input data="port" id="port" type="text" value="4444">
</section>
<!--<section class="scheme-options identity-options">
<div class="panel">
<div id="identity-list">Identity list?</div>
@@ -33,48 +37,44 @@
</section>-->
<section class="scheme-options control-options">
<div class="title">
Router Console Options
</div>
<div class="title" >Router Console Options</div>
<p id="controlHelpText"> Configure your router console options here. </p>
<label id="controlPortText">Console Host: </label>
<input type="text" data="controlhost" id="controlhost" value="127.0.0.1"/>
<br>
<label id="controlHostText">Console Port: </label>
<input type="text" data="controlport" id="controlport" value="7657"/>
<p id="controlHelpText">Configure your router console options here.</p>
<label id="controlPortText">Console Host:</label> <input data="controlhost" id="controlhost" type="text" value="127.0.0.1">
<br>
<label id="controlHostText">Console Port:</label> <input data="controlport" id="controlport" type="text" value="7657">
</section>
<section class="scheme-options control-options">
<div class="title" >I2PControl RPC Client Options</div>
<p id="rpcHelpText"> Configure your I2PControl options here. </p>
<label id="rpcPortText">Control Host: </label>
<input type="text" data="rpchost" id="rpchost" value="127.0.0.1"/>
<br>
<label id="rpcHostText">Control Port: </label>
<input type="text" data="rpcport" id="rpcport" value="7657"/>
<br>
<label id="rpcPathText">Control Path: </label>
<input type="text" data="rpcport" id="rpcport" value="jsonrpc"/>
</div>
<div class="title">
I2PControl RPC Client Options
</div>
<p id="rpcHelpText">Configure your I2PControl options here.</p>
<label id="rpcPortText">Control Host:</label> <input data="rpchost" id="rpchost" type="text" value="127.0.0.1">
<br>
<label id="rpcHostText">Control Port:</label> <input data="rpcport" id="rpcport" type="text" value="7657">
<br>
<label id="rpcPathText">Control Path:</label> <input data="rpcport" id="rpcport" type="text" value="jsonrpc">
</section>
<section class="scheme-options control-options">
<div>
<div class="title" >Bittorrent RPC Client Options</div>
<p id="rpcHelpText"> Configure your Bittorrent options here. </p>
<label id="rpcPortText">Torrent RPC Host: </label>
<input type="text" data="rpchost" id="rpchost" value="127.0.0.1"/>
<br>
<label id="rpcHostText">Torrent RPC Port: </label>
<input type="text" data="rpcport" id="rpcport" value="7657"/>
<br>
<label id="rpcPathText">Torrent RPC Path: </label>
<input type="text" data="rpcport" id="rpcport" value="transmission/rpc"/>
</div>
<div>
<div class="title">
Bittorrent RPC Client Options
</div>
<p id="rpcHelpText">Configure your Bittorrent options here.</p>
<label id="rpcPortText">Torrent RPC Host:</label> <input data="rpchost" id="rpchost" type="text" value="127.0.0.1">
<br>
<label id="rpcHostText">Torrent RPC Port:</label> <input data="rpcport" id="rpcport" type="text" value="7657">
<br>
<label id="rpcPathText">Torrent RPC Path:</label> <input data="rpcport" id="rpcport" type="text" value="transmission/rpc">
</div>
</section>
<input type="button" value="Save preferences" id="save-button"/>
<input id="save-button" type="button" value="Save preferences">
<script src="options.js"></script>
</body>
</body>
</html>

View File

@@ -2,19 +2,19 @@ var android = false;
var gettingInfo = browser.runtime.getPlatformInfo();
gettingInfo.then(got => {
if (got.os == 'android') {
console.log('Running in Android detected');
if (got.os == "android") {
console.log("Running in Android detected");
android = true;
return true;
} else {
console.log('Running in Desktop detected');
console.log("Running in Desktop detected");
android = false;
return false;
}
});
function isDroid() {
console.log('android?', android);
console.log("android?", android);
if (android == undefined) {
return false;
}

View File

@@ -1,10 +1,10 @@
var titlepref = chrome.i18n.getMessage('titlePreface');
var titlepref = chrome.i18n.getMessage("titlePreface");
function onSet(result) {
if (result) {
console.log('->: Value was updated');
console.log("->: Value was updated");
} else {
console.log('-X: Value was not updated');
console.log("-X: Value was not updated");
}
}
@@ -14,7 +14,7 @@ function disableHyperlinkAuditing() {
var setting = browser.privacy.websites.hyperlinkAuditingEnabled.set({
value: false
});
console.log('Disabling hyperlink auditing/val=', {
console.log("Disabling hyperlink auditing/val=", {
value: false
});
setting.then(onSet);
@@ -25,7 +25,7 @@ function enableFirstPartyIsolation() {
var setting = browser.privacy.websites.firstPartyIsolate.set({
value: true
});
console.log('Enabling first party isolation/val=', {
console.log("Enabling first party isolation/val=", {
value: true
});
setting.then(onSet);
@@ -39,13 +39,13 @@ function disableEvilCookies() {
getting.then(got => {
var setting = browser.privacy.websites.cookieConfig.set({
value: {
behavior: 'reject_third_party',
behavior: "reject_third_party",
nonPersistentCookies: got.value.nonPersistentCookies
}
});
console.log('Setting cookie behavior/val=', {
console.log("Setting cookie behavior/val=", {
value: {
behavior: 'reject_third_party',
behavior: "reject_third_party",
nonPersistentCookies: got.value.nonPersistentCookies
}
});

122
proxy.js
View File

@@ -1,18 +1,18 @@
var titlepref = chrome.i18n.getMessage('titlePreface');
var webpref = chrome.i18n.getMessage('webPreface');
var routerpref = chrome.i18n.getMessage('routerPreface');
var routerprefpriv = chrome.i18n.getMessage('routerPrefacePrivate');
var titlepref = chrome.i18n.getMessage("titlePreface");
var webpref = chrome.i18n.getMessage("webPreface");
var routerpref = chrome.i18n.getMessage("routerPreface");
var routerprefpriv = chrome.i18n.getMessage("routerPrefacePrivate");
browser.privacy.network.peerConnectionEnabled.set({
value: false
});
console.log('Preliminarily disabled WebRTC.');
console.log("Preliminarily disabled WebRTC.");
chrome.privacy.network.networkPredictionEnabled.set({
value: false
});
chrome.privacy.network.webRTCIPHandlingPolicy.set({
value: 'disable_non_proxied_udp'
value: "disable_non_proxied_udp"
});
function shouldProxyRequest(requestInfo) {
@@ -20,14 +20,14 @@ function shouldProxyRequest(requestInfo) {
}
var handleContextProxyRequest = async function(requestDetails) {
console.log('(proxy)Searching for proxy by context');
console.log("(proxy)Searching for proxy by context");
try {
var handleProxyRequest = function(context) {
proxy = {
failoverTimeout: 0,
proxyDns: false
};
if (context == 'firefox-default' || context == 'firefox-private') {
if (context == "firefox-default" || context == "firefox-private") {
proxy = null;
return proxy;
}
@@ -47,9 +47,9 @@ var handleContextProxyRequest = async function(requestDetails) {
return proxy;
} else if (!routerHost(requestDetails.url)) {
proxy = {
type: 'http',
host: 'localhost',
port: '65535'
type: "http",
host: "localhost",
port: "65535"
};
}
proxy = {
@@ -65,22 +65,22 @@ var handleContextProxyRequest = async function(requestDetails) {
if (localHost(requestDetails.url)) {
if (!routerHost(requestDetails.url)) {
proxy = {
type: 'http',
host: 'localhost',
port: '65535'
type: "http",
host: "localhost",
port: "65535"
};
}
}
console.log('(proxy)', context.name);
console.log('Using', proxy.type);
console.log('proxy ', proxy.host + ':' + proxy.port);
console.log("(proxy)", context.name);
console.log("Using", proxy.type);
console.log("proxy ", proxy.host + ":" + proxy.port);
return proxy;
}
}
if (!routerHost(requestDetails.url)) {
if (localHost(requestDetails.url)) {
console.log(
'(proxy) non-routerconsole localhost url, will not interfere',
"(proxy) non-routerconsole localhost url, will not interfere",
requestDetails.url
);
/*proxy = {
@@ -114,7 +114,7 @@ var handleContextProxyRequest = async function(requestDetails) {
let tabInfo = await browser.tabs.get(tabId);
return tabInfo;
} catch (error) {
console.log('(proxy)Tab error', error);
console.log("(proxy)Tab error", error);
}
};
if (proxyHost(requestDetails.url)) {
@@ -126,8 +126,8 @@ var handleContextProxyRequest = async function(requestDetails) {
return proxy;
}
if (
requestDetails.cookieStoreId == 'firefox-default' ||
requestDetails.cookieStoreId == 'firefox-private'
requestDetails.cookieStoreId == "firefox-default" ||
requestDetails.cookieStoreId == "firefox-private"
) {
return browser.proxy.settings.get({});
}
@@ -146,7 +146,7 @@ var handleContextProxyRequest = async function(requestDetails) {
requestDetails.tabId = tab;
var context = tab.then(contextGet);
var proxy = await context.then(handleProxyRequest);
console.log('(proxy)Returning I2P Proxy', proxy);
console.log("(proxy)Returning I2P Proxy", proxy);
return proxy;
} else {
var tab = tabGet(requestDetails.tabId);
@@ -160,62 +160,62 @@ var handleContextProxyRequest = async function(requestDetails) {
return proxy;*/
}
} catch (error) {
console.log('(proxy)Not using I2P Proxy.', error);
console.log("(proxy)Not using I2P Proxy.", error);
}
}
};
function SetupSettings() {
console.log('Initialising Settings');
console.log("Initialising Settings");
function onSetupError() {
console.log('Settings initialization error');
console.log("Settings initialization error");
}
//
function checkSchemeStoredSettings(storedSettings) {
if (storedSettings.proxy_scheme == undefined)
storedSettings.proxy_scheme = 'http';
storedSettings.proxy_scheme = "http";
else proxy_scheme = storedSettings.proxy_scheme;
console.log('Initialising Proxy Scheme', storedSettings.proxy_scheme);
console.log("Initialising Proxy Scheme", storedSettings.proxy_scheme);
setupProxy();
}
var gettingSchemeStoredSettings = browser.storage.local.get('proxy_scheme');
var gettingSchemeStoredSettings = browser.storage.local.get("proxy_scheme");
gettingSchemeStoredSettings.then(checkSchemeStoredSettings, onSetupError);
//
function checkHostStoredSettings(storedSettings) {
if (storedSettings.proxy_host == undefined)
storedSettings.proxy_host = '127.0.0.1';
storedSettings.proxy_host = "127.0.0.1";
else proxy_host = storedSettings.proxy_host;
console.log('Initialising Host', storedSettings.proxy_host);
console.log("Initialising Host", storedSettings.proxy_host);
setupProxy();
}
var gettingHostStoredSettings = browser.storage.local.get('proxy_host');
var gettingHostStoredSettings = browser.storage.local.get("proxy_host");
gettingHostStoredSettings.then(checkHostStoredSettings, onSetupError);
//
function checkPortStoredSettings(storedSettings) {
if (storedSettings.proxy_port == undefined)
storedSettings.proxy_port = '4444';
storedSettings.proxy_port = "4444";
else proxy_port = storedSettings.proxy_port;
console.log('Initialising Port', storedSettings.proxy_port);
console.log("Initialising Port", storedSettings.proxy_port);
setupProxy();
}
var gettingPortStoredSettings = browser.storage.local.get('proxy_port');
var gettingPortStoredSettings = browser.storage.local.get("proxy_port");
gettingPortStoredSettings.then(checkPortStoredSettings, onSetupError);
//
function checkControlHostStoredSettings(storedSettings) {
if (storedSettings.control_host == undefined)
storedSettings.control_host = '127.0.0.1';
storedSettings.control_host = "127.0.0.1";
else control_host = storedSettings.control_host;
console.log('Initialising Control Host', storedSettings.control_host);
console.log("Initialising Control Host", storedSettings.control_host);
setupProxy();
}
var gettingControlHostStoredSettings = browser.storage.local.get(
'control_host'
"control_host"
);
gettingControlHostStoredSettings.then(
checkControlHostStoredSettings,
@@ -225,14 +225,14 @@ function SetupSettings() {
//
function checkControlPortStoredSettings(storedSettings) {
if (storedSettings.control_port == undefined)
storedSettings.control_port = '7657';
storedSettings.control_port = "7657";
else control_port = storedSettings.control_port;
console.log('Initialising Control Port', storedSettings.control_port);
console.log("Initialising Control Port", storedSettings.control_port);
setupProxy();
}
var gettingControlPortStoredSettings = browser.storage.local.get(
'control_port'
"control_port"
);
gettingControlPortStoredSettings.then(
checkControlPortStoredSettings,
@@ -246,28 +246,28 @@ function SetupSettings() {
else disable_history = storedSettings.disable_history;
console.log(
'Initialising Disabled History',
"Initialising Disabled History",
storedSettings.disable_history
);
setupProxy();
}
var gettingHistoryStoredSettings = browser.storage.local.get(
'disable_history'
"disable_history"
);
gettingHistoryStoredSettings.then(checkHistoryStoredSettings, onSetupError);
}
function getScheme() {
if (proxy_scheme == 'HTTP') return 'http';
if (proxy_scheme == 'SOCKS') return 'socks';
if (proxy_scheme == 'http') return 'http';
if (proxy_scheme == 'socks') return 'socks';
else return 'http';
if (proxy_scheme == "HTTP") return "http";
if (proxy_scheme == "SOCKS") return "socks";
if (proxy_scheme == "http") return "http";
if (proxy_scheme == "socks") return "socks";
else return "http";
}
function getHost() {
if (proxy_host == undefined) {
proxy_host = '127.0.0.1';
proxy_host = "127.0.0.1";
}
return proxy_host;
}
@@ -275,30 +275,30 @@ function getHost() {
function getPort() {
if (proxy_port == undefined) {
var scheme = getScheme();
if (scheme == 'socks') proxy_port = '4446';
else proxy_port = '4444';
if (scheme == "socks") proxy_port = "4446";
else proxy_port = "4444";
}
return proxy_port;
}
function setupProxy() {
console.log('Setting up Firefox WebExtension proxy');
console.log("Setting up Firefox WebExtension proxy");
browser.proxy.onRequest.addListener(handleContextProxyRequest, {
urls: ['<all_urls>']
urls: ["<all_urls>"]
});
console.log('i2p settings created for WebExtension Proxy');
console.log("i2p settings created for WebExtension Proxy");
}
function update() {
console.log('restoring proxy scheme:', proxy_scheme);
console.log('restoring proxy host:', proxy_host);
console.log('restoring proxy port:', proxy_port);
console.log('restoring control host:', control_host);
console.log('restoring control port:', control_port);
console.log("restoring proxy scheme:", proxy_scheme);
console.log("restoring proxy host:", proxy_host);
console.log("restoring proxy port:", proxy_port);
console.log("restoring control host:", control_host);
console.log("restoring control port:", control_port);
}
function updateFromStorage() {
console.log('updating settings from storage');
console.log("updating settings from storage");
chrome.storage.local.get(function() {
SetupSettings();
update();
@@ -306,7 +306,7 @@ function updateFromStorage() {
});
var gettingInfo = browser.runtime.getPlatformInfo();
gettingInfo.then(got => {
if (got.os != 'android') {
if (got.os != "android") {
browser.windows.getAll().then(wins => wins.forEach(themeWindow));
}
});

162
scrub.js
View File

@@ -1,28 +1,28 @@
var titlepref = chrome.i18n.getMessage('titlePreface');
var webpref = chrome.i18n.getMessage('webPreface');
var routerpref = chrome.i18n.getMessage('routerPreface');
var mailpref = chrome.i18n.getMessage('mailPreface');
var torrentpref = chrome.i18n.getMessage('torrentPreface');
var tunnelpref = chrome.i18n.getMessage('i2ptunnelPreface');
var localpref = chrome.i18n.getMessage('localPreface');
var extensionpref = chrome.i18n.getMessage('extensionPreface');
var titlepref = chrome.i18n.getMessage("titlePreface");
var webpref = chrome.i18n.getMessage("webPreface");
var routerpref = chrome.i18n.getMessage("routerPreface");
var mailpref = chrome.i18n.getMessage("mailPreface");
var torrentpref = chrome.i18n.getMessage("torrentPreface");
var tunnelpref = chrome.i18n.getMessage("i2ptunnelPreface");
var localpref = chrome.i18n.getMessage("localPreface");
var extensionpref = chrome.i18n.getMessage("extensionPreface");
var contextScrub = async function(requestDetails) {
function onHeaderError() {
console.log('Header scrub error');
console.log("Header scrub error");
}
console.log('(scrub)Scrubbing info from contextualized request');
console.log("(scrub)Scrubbing info from contextualized request");
try {
var headerScrub = function(context) {
var ua = 'MYOB/6.66 (AN/ON)';
var ua = "MYOB/6.66 (AN/ON)";
if (!context) {
console.log('Context not found', context);
console.log("Context not found", context);
} else if (context.name == titlepref) {
if (i2pHost(requestDetails.url)) {
for (var header of requestDetails.requestHeaders) {
if (header.name.toLowerCase() === 'user-agent') {
if (header.name.toLowerCase() === "user-agent") {
header.value = ua;
console.log('(scrub)User-Agent header modified', header.value);
console.log("(scrub)User-Agent header modified", header.value);
}
}
}
@@ -32,9 +32,9 @@ var contextScrub = async function(requestDetails) {
} else if (context.name == routerpref) {
if (i2pHost(requestDetails.url)) {
for (var header of requestDetails.requestHeaders) {
if (header.name.toLowerCase() === 'user-agent') {
if (header.name.toLowerCase() === "user-agent") {
header.value = ua;
console.log('(scrub)User-Agent header modified', header.value);
console.log("(scrub)User-Agent header modified", header.value);
}
}
}
@@ -45,7 +45,7 @@ var contextScrub = async function(requestDetails) {
};
var contextGet = async function(tabInfo) {
try {
console.log('(scrub)Tab info from Function', tabInfo);
console.log("(scrub)Tab info from Function", tabInfo);
let context = await browser.contextualIdentities.get(
tabInfo.cookieStoreId
);
@@ -56,7 +56,7 @@ var contextScrub = async function(requestDetails) {
};
var tabGet = async function(tabId) {
try {
console.log('(scrub)Tab ID from Request', tabId);
console.log("(scrub)Tab ID from Request", tabId);
let tabInfo = await browser.tabs.get(tabId);
return tabInfo;
} catch (error) {
@@ -68,31 +68,31 @@ var contextScrub = async function(requestDetails) {
var context = {};
var req = {};
if (i2pHost(requestDetails.url)) {
console.log('(scrub)I2P URL detected, ');
console.log("(scrub)I2P URL detected, ");
tab = tabGet(requestDetails.tabId);
context = tab.then(contextGet, onHeaderError);
req = await context.then(headerScrub, onHeaderError);
console.log('(scrub)Scrubbing I2P Request', req);
console.log("(scrub)Scrubbing I2P Request", req);
return req;
} else if (routerHost(requestDetails.url)) {
tab = tabGet(requestDetails.tabId);
context = tab.then(contextGet, onHeaderError);
req = await context.then(headerScrub, onHeaderError);
console.log('(scrub)Scrubbing non-I2P Request', req);
console.log("(scrub)Scrubbing non-I2P Request", req);
return req;
}
return req;
}
} catch (error) {
console.log('(scrub)Not scrubbing non-I2P request.', error);
console.log("(scrub)Not scrubbing non-I2P request.", error);
}
}
};
var contextSetup = function(requestDetails) {
function onContextError() {
console.log('Context launcher error');
console.log("Context launcher error");
}
console.log('(isolate)Forcing I2P requests into context');
console.log("(isolate)Forcing I2P requests into context");
try {
var i2pTabFind = async function(tabId) {
try {
@@ -100,15 +100,15 @@ var contextSetup = function(requestDetails) {
name: titlepref
});
if (tabId.cookieStoreId != context[0].cookieStoreId) {
console.log('(isolate) I2P context', context[0].cookieStoreId);
console.log('tab context', tabId.cookieStoreId);
console.log("(isolate) I2P context", context[0].cookieStoreId);
console.log("tab context", tabId.cookieStoreId);
function Create() {
function onCreated(tab) {
function closeOldTab() {
if (tabId.id != tab.id) {
console.log('(isolate) Closing un-isolated tab', tabId.id);
console.log('in favor of', tab.id);
console.log('with context', tab.cookieStoreId);
console.log("(isolate) Closing un-isolated tab", tabId.id);
console.log("in favor of", tab.id);
console.log("with context", tab.cookieStoreId);
browser.tabs.remove(tabId.id);
}
}
@@ -126,7 +126,7 @@ var contextSetup = function(requestDetails) {
return tabId;
}
} catch (error) {
console.log('(isolate)Context Error', error);
console.log("(isolate)Context Error", error);
}
};
var routerTabFind = async function(tabId) {
@@ -135,15 +135,15 @@ var contextSetup = function(requestDetails) {
name: routerpref
});
if (tabId.cookieStoreId != context[0].cookieStoreId) {
console.log('(isolate) I2P context', context[0].cookieStoreId);
console.log('tab context', tabId.cookieStoreId);
console.log("(isolate) I2P context", context[0].cookieStoreId);
console.log("tab context", tabId.cookieStoreId);
function Create() {
function onCreated(tab) {
function closeOldTab() {
if (tabId.id != tab.id) {
console.log('(isolate) Closing un-isolated tab', tabId.id);
console.log('in favor of', tab.id);
console.log('with context', tab.cookieStoreId);
console.log("(isolate) Closing un-isolated tab", tabId.id);
console.log("in favor of", tab.id);
console.log("with context", tab.cookieStoreId);
browser.tabs.remove(tabId.id);
}
}
@@ -161,7 +161,7 @@ var contextSetup = function(requestDetails) {
return tabId;
}
} catch (error) {
console.log('(isolate)Context Error', error);
console.log("(isolate)Context Error", error);
}
};
var i2ptunnelTabFind = async function(tabId) {
@@ -170,15 +170,15 @@ var contextSetup = function(requestDetails) {
name: tunnelpref
});
if (tabId.cookieStoreId != context[0].cookieStoreId) {
console.log('(isolate) I2P context', context[0].cookieStoreId);
console.log('tab context', tabId.cookieStoreId);
console.log("(isolate) I2P context", context[0].cookieStoreId);
console.log("tab context", tabId.cookieStoreId);
function Create() {
function onCreated(tab) {
function closeOldTab() {
if (tabId.id != tab.id) {
console.log('(isolate) Closing un-isolated tab', tabId.id);
console.log('in favor of', tab.id);
console.log('with context', tab.cookieStoreId);
console.log("(isolate) Closing un-isolated tab", tabId.id);
console.log("in favor of", tab.id);
console.log("with context", tab.cookieStoreId);
browser.tabs.remove(tabId.id);
}
}
@@ -196,7 +196,7 @@ var contextSetup = function(requestDetails) {
return tabId;
}
} catch (error) {
console.log('(isolate)Context Error', error);
console.log("(isolate)Context Error", error);
}
};
var snarkTabFind = async function(tabId) {
@@ -205,15 +205,15 @@ var contextSetup = function(requestDetails) {
name: torrentpref
});
if (tabId.cookieStoreId != context[0].cookieStoreId) {
console.log('(isolate) I2P context', context[0].cookieStoreId);
console.log('tab context', tabId.cookieStoreId);
console.log("(isolate) I2P context", context[0].cookieStoreId);
console.log("tab context", tabId.cookieStoreId);
function Create() {
function onCreated(tab) {
function closeOldTab() {
if (tabId.id != tab.id) {
console.log('(isolate) Closing un-isolated tab', tabId.id);
console.log('in favor of', tab.id);
console.log('with context', tab.cookieStoreId);
console.log("(isolate) Closing un-isolated tab", tabId.id);
console.log("in favor of", tab.id);
console.log("with context", tab.cookieStoreId);
browser.tabs.remove(tabId.id);
}
}
@@ -231,7 +231,7 @@ var contextSetup = function(requestDetails) {
return tabId;
}
} catch (error) {
console.log('(isolate)Context Error', error);
console.log("(isolate)Context Error", error);
}
};
var mailTabFind = async function(tabId) {
@@ -240,15 +240,15 @@ var contextSetup = function(requestDetails) {
name: mailpref
});
if (tabId.cookieStoreId != context[0].cookieStoreId) {
console.log('(isolate) I2P context', context[0].cookieStoreId);
console.log('tab context', tabId.cookieStoreId);
console.log("(isolate) I2P context", context[0].cookieStoreId);
console.log("tab context", tabId.cookieStoreId);
function Create() {
function onCreated(tab) {
function closeOldTab() {
if (tabId.id != tab.id) {
console.log('(isolate) Closing un-isolated tab', tabId.id);
console.log('in favor of', tab.id);
console.log('with context', tab.cookieStoreId);
console.log("(isolate) Closing un-isolated tab", tabId.id);
console.log("in favor of", tab.id);
console.log("with context", tab.cookieStoreId);
browser.tabs.remove(tabId.id);
}
}
@@ -266,7 +266,7 @@ var contextSetup = function(requestDetails) {
return tabId;
}
} catch (error) {
console.log('(isolate)Context Error', error);
console.log("(isolate)Context Error", error);
}
};
var localTabFind = async function(tabId) {
@@ -275,15 +275,15 @@ var contextSetup = function(requestDetails) {
name: localpref
});
if (tabId.cookieStoreId != context[0].cookieStoreId) {
console.log('(isolate) I2P context', context[0].cookieStoreId);
console.log('tab context', tabId.cookieStoreId);
console.log("(isolate) I2P context", context[0].cookieStoreId);
console.log("tab context", tabId.cookieStoreId);
function Create() {
function onCreated(tab) {
function closeOldTab() {
if (tabId.id != tab.id) {
console.log('(isolate) Closing un-isolated tab', tabId.id);
console.log('in favor of', tab.id);
console.log('with context', tab.cookieStoreId);
console.log("(isolate) Closing un-isolated tab", tabId.id);
console.log("in favor of", tab.id);
console.log("with context", tab.cookieStoreId);
browser.tabs.remove(tabId.id);
}
}
@@ -301,7 +301,7 @@ var contextSetup = function(requestDetails) {
return tabId;
}
} catch (error) {
console.log('(isolate)Context Error', error);
console.log("(isolate)Context Error", error);
}
};
var anyTabFind = async function(tabId) {
@@ -309,21 +309,21 @@ var contextSetup = function(requestDetails) {
var context = await browser.contextualIdentities.query({
name: webpref
});
console.log('(ISOLATE)', tabId.cookieStoreId);
console.log("(ISOLATE)", tabId.cookieStoreId);
if (
tabId.cookieStoreId == 'firefox-default' ||
tabId.cookieStoreId == 'firefox-private'
tabId.cookieStoreId == "firefox-default" ||
tabId.cookieStoreId == "firefox-private"
) {
if (tabId.cookieStoreId != context[0].cookieStoreId) {
console.log('(isolate) I2P context', context[0].cookieStoreId);
console.log('tab context', tabId.cookieStoreId);
console.log("(isolate) I2P context", context[0].cookieStoreId);
console.log("tab context", tabId.cookieStoreId);
function Create() {
function onCreated(tab) {
function closeOldTab() {
if (tabId.id != tab.id) {
console.log('(isolate) Closing un-isolated tab', tabId.id);
console.log('in favor of', tab.id);
console.log('with context', tab.cookieStoreId);
console.log("(isolate) Closing un-isolated tab", tabId.id);
console.log("in favor of", tab.id);
console.log("with context", tab.cookieStoreId);
browser.tabs.remove(tabId.id);
}
}
@@ -342,16 +342,16 @@ var contextSetup = function(requestDetails) {
}
}
} catch (error) {
console.log('(isolate)Context Error', error);
console.log("(isolate)Context Error", error);
}
};
var tabGet = async function(tabId) {
try {
console.log('(isolate)Tab ID from Request', tabId);
console.log("(isolate)Tab ID from Request", tabId);
let tabInfo = await browser.tabs.get(tabId);
return tabInfo;
} catch (error) {
console.log('(isolate)Tab error', error);
console.log("(isolate)Tab error", error);
}
};
if (requestDetails == undefined) {
@@ -391,16 +391,16 @@ var contextSetup = function(requestDetails) {
}
}
if (routerhost) {
if (routerhost === 'i2ptunnelmgr') {
if (routerhost === "i2ptunnelmgr") {
var tunneltab = tab.then(i2ptunnelTabFind, onContextError);
return requestDetails;
} else if (routerhost === 'i2psnark') {
} else if (routerhost === "i2psnark") {
var snarktab = tab.then(snarkTabFind, onContextError);
return requestDetails;
} else if (routerhost === 'webmail') {
} else if (routerhost === "webmail") {
var mailtab = tab.then(mailTabFind, onContextError);
return requestDetails;
} else if (routerhost === 'routerconsole') {
} else if (routerhost === "routerconsole") {
var routertab = tab.then(routerTabFind, onContextError);
return requestDetails;
}
@@ -409,18 +409,18 @@ var contextSetup = function(requestDetails) {
}
}
} catch (error) {
console.log('(isolate)Not an I2P request, blackholing', error);
console.log("(isolate)Not an I2P request, blackholing", error);
}
};
browser.webRequest.onBeforeRequest.addListener(
contextSetup,
{ urls: ['<all_urls>'] },
['blocking']
{ urls: ["<all_urls>"] },
["blocking"]
);
browser.webRequest.onBeforeSendHeaders.addListener(
contextScrub,
{ urls: ['<all_urls>'] },
['blocking', 'requestHeaders']
{ urls: ["<all_urls>"] },
["blocking", "requestHeaders"]
);

View File

@@ -11,120 +11,117 @@
<body>
<div class="section-header panel-section panel-section-header" id="topbar">
<!--<div class="text-section-header" id="text-section-header">-->
<img width="32px" height="32px" src="icons/toopie.png">
<a href="#" id="browser-action">Browse</a>
<img width="32px" height="32px" src="icons/torrents.png">
<a href="#" id="torrent-action">Download</a>
<!--</div>-->
<img height="32px" src="icons/toopie.png" width="32px"> <a href="#" id="browser-action">Browse</a> <img height="32px" src="icons/torrents.png" width="32px"> <a href="#" id="torrent-action">Download</a> <!--</div>-->
</div>
<div id="browserpanel">
<div class="panel">
<div class="section-header panel-section panel-section-header">
<div class="text-section-header" id="text-section-header">
<h1>The Invisible Internet Browser</h1>
<div class="panel">
<div class="section-header panel-section panel-section-header">
<div class="text-section-header" id="text-section-header">
<h1>The Invisible Internet Browser</h1>
</div>
</div>
</div>
<div class="topnav">
<a class="applicationName window-visit-homepage" href="#" id="window-visit-homepage" target="_blank">Home Page</a>
<form action="http://legwork.i2p/yacysearch.html?" method="get">
<input id="search-query" name="query" placeholder="Search on legwork.i2p(Opens a new tab)" type="search"> <input id="search-submit" text="Submit" type="submit">
</form>
<div class="topnav">
<a class="applicationName window-visit-homepage" href="#" id="window-visit-homepage" target="_blank">Home Page</a>
<form action="http://legwork.i2p/yacysearch.html?" method="get">
<input id="search-query" name="query" placeholder="Search on legwork.i2p(Opens a new tab)" type="search"> <input id="search-submit" text="Submit" type="submit">
</form>
</div>
<div class="panel-section-separator">
</div>
<div id="i2pbrowser-version">
</div>
<div id="i2pbrowser-description">
<p id="description">You are now able to use I2P in this browser.</p>
<p id="beta">It is experimental.</p>
</div>
<div class="hideIfI2PProxyOff" id="readyness">
<img class="readyness" src="http://proxy.i2p/themes/console/images/local_up.png"> <span id="proxy-check">Proxy is ready.</span>
</div>
</div>
<div class="panel-section-separator">
</div>
<div id="i2pbrowser-version">
</div>
<div class="browser-info">
<p class="hideIfI2PConsoleOff">
</p>
<div id="i2pbrowser-description">
<p id="description">You are now able to use I2P in this browser.</p>
<h3 id="controlHeader">Controls</h3>
<p id="beta">It is experimental.</p>
</div>
<p id="controlExplain">These controls are used to tailor your I2P Browsing Experience</p>
<div class="hideIfI2PProxyOff" id="readyness">
<img class="readyness" src="http://proxy.i2p/themes/console/images/local_up.png"> <span id="proxy-check">Proxy is ready.</span>
</div>
</div>
<ul>
<li class="application">
<a href="#" id="clear-browser-data">Clear Browsing Data:</a> <span class="applicationDesc" id="clear-desc">Use this to erase your browsing data.</span>
</li>
<div class="panel-section-separator">
</div>
<li class="application"><input id="enable-web-rtc" name="enablewebrtc" type="checkbox" value="webrtc"> <label for="enable-web-rtc">Enable WebRTC <strong>with Proxy?</strong></label> <span class="applicationDesc" id="rtcDesc">WebRTC is disabled by default, but can be enabled by checking this box.</span></li>
<div class="browser-info">
<p class="hideIfI2PConsoleOff">
</p>
<h3 id="controlHeader">Controls</h3>
<p id="controlExplain">These controls are used to tailor your I2P Browsing Experience</p>
<ul>
<li class="application">
<a href="#" id="clear-browser-data">Clear Browsing Data:</a> <span class="applicationDesc" id="clear-desc">Use this to erase your browsing data.</span>
</li>
<li class="application"><input id="enable-web-rtc" name="enablewebrtc" type="checkbox" value="webrtc"> <label for="enable-web-rtc">Enable WebRTC <strong>with Proxy?</strong></label> <span class="applicationDesc" id="rtcDesc">WebRTC is disabled by default, but can be enabled by checking this box.</span></li>
<li class="application">
<div class="panel-section-separator">
</div>
<div class="panel-section-identity">
<div id="identity-list">
<li class="application">
<div class="panel-section-separator">
</div>
</div>
</li>
<li class="application"><input id="disable-history" name="disablehistory" type="checkbox" value="history"> <label for="disable-history">Disable History in I2P Tabs</label> <span class="applicationDesc" id="histDesc">History is automatically cleared when your I2P tabs are closed. If you want to clear history as you go, check this box.</span></li>
</ul>
<div class="panel-section-identity">
<div id="identity-list">
</div>
</div>
</li>
<p>
</p>
<li class="application"><input id="disable-history" name="disablehistory" type="checkbox" value="history"> <label for="disable-history">Disable History in I2P Tabs</label> <span class="applicationDesc" id="histDesc">History is automatically cleared when your I2P tabs are closed. If you want to clear history as you go, check this box.</span></li>
</ul>
<p>
</p>
<p>
</p>
<p>
</p>
</div>
<div class="panel-section-separator">
</div>
<div class="application-info">
<p class="hideIfI2PConsoleOff">
</p>
<h3 id="applicationHeader">Applications</h3>
<p id="applicationExplain">These applications use I2P to provide them with security and privacy.</p>
<ul>
<li class="application"><button class="applicationName window-visit-homepage" href="#" id="window-visit-index" target="_blank">Help Page</button> <span class="applicationDesc" id="abouthome">For more information about this extension, go here:</span></li>
<li class="application"><button class="applicationName window-visit-toopie" href="#" id="window-visit-toopie" target="_blank">Toopie</button> <span class="applicationDesc" id="toopie">For information about your I2P router status, go here:</span></li>
<li class="application"><button class="applicationName" id="window-visit-i2ptunnel" target="_blank">Hidden Services Manager</button> <span class="applicationDesc" id="i2ptunnel">I2P has a web-based interface for configuring .i2p services like web sites, to set up your own web sites, go here:</span></li>
<li class="application"><button class="applicationName" id="window-visit-susimail" target="_blank">E-Mail</button> <span class="applicationDesc" id="susimail">I2P also bundles a webmail client which can be used to access in-I2P e-mail. To use it, go here:</span></li>
<li class="application"><button class="applicationName" id="window-visit-snark" target="_blank">BitTorrent</button> <span class="applicationDesc" id="snark">I2P is capable of anonymous Peer-to-Peer file sharing, to use the built-in bittorrent client go here:</span></li>
</ul>
<p>
</p>
<p>
</p>
</div>
</div>
<div class="panel-section-separator">
</div>
<div class="application-info">
<p class="hideIfI2PConsoleOff">
</p>
<h3 id="applicationHeader">Applications</h3>
<p id="applicationExplain">These applications use I2P to provide them with security and privacy.</p>
<ul>
<li class="application"><button class="applicationName window-visit-homepage" href="#" id="window-visit-index" target="_blank">Help Page</button> <span class="applicationDesc" id="abouthome">For more information about this extension, go here:</span></li>
<li class="application"><button class="applicationName window-visit-toopie" href="#" id="window-visit-toopie" target="_blank">Toopie</button> <span class="applicationDesc" id="toopie">For information about your I2P router status, go here:</span></li>
<li class="application"><button class="applicationName" id="window-visit-i2ptunnel" target="_blank">Hidden Services Manager</button> <span class="applicationDesc" id="i2ptunnel">I2P has a web-based interface for configuring .i2p services like web sites, to set up your own web sites, go here:</span></li>
<li class="application"><button class="applicationName" id="window-visit-susimail" target="_blank">E-Mail</button> <span class="applicationDesc" id="susimail">I2P also bundles a webmail client which can be used to access in-I2P e-mail. To use it, go here:</span></li>
<li class="application"><button class="applicationName" id="window-visit-snark" target="_blank">BitTorrent</button> <span class="applicationDesc" id="snark">I2P is capable of anonymous Peer-to-Peer file sharing, to use the built-in bittorrent client go here:</span></li>
</ul>
<p>
</p>
<p>
</p>
</div>
</div>
<div id="torrentpanel">
Torrents go here.
Torrents go here.
</div>
<script src="context.js"></script>
<script src="privacy.js"></script>
<script src="info.js"></script>
<script crossorigin="anonymous" src="content.js"></script>
<script src="context.js"></script>
<script src="privacy.js"></script>
<script src="info.js"></script>
<script crossorigin="anonymous" src="content.js"></script>
<script src="i2pcontrol/i2pcontrol.js"></script>
</body>
</html>