use buttons to make the new menu work

This commit is contained in:
idk
2019-11-22 17:49:27 -05:00
parent 2ea3bc169b
commit e9b5060203
6 changed files with 70 additions and 50 deletions

View File

@@ -131,6 +131,7 @@ libpolyfill:
wget -O chromium/browser-polyfill.js https://unpkg.com/webextension-polyfill/dist/browser-polyfill.js
fmt:
find . -path ./node_modules -prune -o -name '*.css' -exec cleancss -O1 --format beautify {} \;
find . -path ./node_modules -prune -o -name '*.js' -exec prettier --write {} \;
lint:
@@ -150,4 +151,4 @@ deborig:
deb: deborig
cd ../i2psetproxy.js-$(VERSION) && debuild -us -uc -rfakeroot
-include mirrors.mk
-include mirrors.mk

View File

@@ -5,7 +5,8 @@
html {
height: 100%
}
a {
a,
button {
color: #3b6bbf;
text-decoration: none;
font-weight: 700;
@@ -20,13 +21,23 @@ a {
outline: 0
}
.applicationDesc:hover,
a:hover {
a:hover,
button:hover {
color: #495057;
text-decoration: none;
font-weight: 700;
word-wrap: break-word;
outline: 0
}
button {
border: none;
cursor: pointer;
color: #3b6bbf;
text-decoration: none;
font-weight: 700;
word-wrap: break-word;
outline: 0
}
body {
display: flex;
flex-direction: column;
@@ -43,9 +54,6 @@ body {
word-wrap: break-word;
outline: 0
}
/*body:not([initialized]) {
display: none
}*/
.background {
background-color: #f8f8ff;
height: 100%
@@ -146,22 +154,11 @@ h4 {
#links .showhider {
font-size: 25px
}
#info-content {
/*display: none;*/
}
.section-header {
display: flex;
flex-direction: row;
margin-bottom: 80px
}
body:not([i2pconsoleon]) .hideIfI2PConsoleOff,
body:not([i2pon]) .hideIfI2POff,
body:not([i2pproxyon]) .hideIfI2PProxyOff,
body[i2pconsoleon] .hideIfI2PConsoleOn,
body[i2pon] .hideIfI2POn,
body[i2pproxyon] .hideIfI2PProxyOn {
/*display: none!important*/
}
ul {
margin-left: 2rem;
list-style: none
@@ -270,27 +267,17 @@ li {
background: #f7e59a;
box-shadow: inset 0 0 0 1px #fff,0 0 1px #ccc
}
#onboardingContentFour,
#onboardingContentOne,
#onboardingContentThree,
#onboardingContentTwo,
#onboardingContentZero {
/*display: none;*/
}
.onboardingContent {
font-size: .8rem!important;
text-align: left
}
#proxy-check {
visibility: hidden;
}
.consoleOn:hover #proxy-check {
visibility: visible;
opacity: 1;
visibility: hidden
}
.consoleOn:hover #proxy-check,
.proxyReady:hover #proxy-check {
visibility: visible;
opacity: 1;
opacity: 1
}
img.readyness {
height: 100%;

View File

@@ -57,4 +57,8 @@ img.readyness {
}
#consoleOn {
min-height: 2rem;
}
}
#window-visit-homepage {
max-width: 70%;
margin-left: 0rem;
}

36
info.js
View File

@@ -40,6 +40,18 @@ document.addEventListener("click", e => {
};
chrome.windows.update(currentWindow.id, updateInfo);
});
} else if (e.target.id === "window-visit-homepage") {
console.log("attempting to create homepage tab")
goHome()
} else if (e.target.id === "window-visit-i2ptunnel") {
console.log("attempting to create i2ptunnel tab")
goTunnel()
} else if (e.target.id === "window-visit-susimail") {
console.log("attempting to create susimail tab")
goMail()
} else if (e.target.id === "window-visit-snark") {
console.log("attempting to create snark tab")
goSnark()
} else if (e.target.id === "clear-browser-data") {
forgetBrowsingData();
} else if (e.target.id === "check-i2p-control") {
@@ -67,6 +79,30 @@ function goHome() {
console.log("visiting homepage");
let creating = browser.tabs.create(createData);
}
function goTunnel() {
let createData = {
url: "http://127.0.0.1:7657/i2ptunnel"
};
console.log("visiting homepage");
let creating = browser.tabs.create(createData);
}
function goMail() {
let createData = {
url: "http://127.0.0.1:7657/susimail"
};
console.log("visiting homepage");
let creating = browser.tabs.create(createData);
}
function goSnark() {
let createData = {
url: "http://127.0.0.1:7657/i2psnark"
};
console.log("visiting homepage");
let creating = browser.tabs.create(createData);
}
/*
//document.addEventListener("onpageshow", e => {
console.log("(Check) Checking Proxy Readiness");

View File

@@ -459,10 +459,10 @@ function routerHost(url) {
if (final === "i2ptunnelmgr" || final === "i2ptunnel") {
console.log("(urlcheck) application path", final);
return "i2ptunnelmgr";
} else if (final === "i2psnark" || final == "torrents") {
} else if (final === "i2psnark" || final === "torrents") {
console.log("(urlcheck) application path", final);
return "i2psnark";
} else if (final === "webmail") {
} else if (final === "webmail" || final === "susimail" ) {
console.log("(urlcheck) application path", final);
return "webmail";
} else if (final == "") {

View File

@@ -56,26 +56,18 @@
<h3>Applications</h3>
<p id="applicationExplain">These applications use I2P to provide them with security and privacy.</p>
<ul>
<a class="window-visit-homepage" target="_blank" onclick="goHome()" href="/home.html">
<li class="application">
<li class="application"><button id="window-visit-homepage" class="applicationName window-visit-homepage" href="#">
Home Page <span class="applicationDesc">For more information about this extension, go here:</span>
</li>
</a>
<a class="applicationName" target="_blank" href="http://127.0.0.1:7657/i2ptunnel">
<li class="application">
</button></li>
<li class="application"><button id="window-visit-i2ptunnel" class="applicationName">
Hidden Services Manager <span class="applicationDesc">I2P has a web-based interface for configuring .i2p services like web sites, to set up your own web sites, go here:</span>
</li>
</a>
<a class="applicationName" target="_blank" href="http://127.0.0.1:7657/susimail">
<li class="application">
</button></li>
<li class="application"><button id="window-visit-susimail" class="applicationName">
E-Mail <span class="applicationDesc">I2P also bundles a webmail client which can be used to access in-I2P e-mail. To use it, go here:</span>
</li>
</a>
<a class="applicationName" target="_blank" href="http://127.0.0.1:7657/i2psnark">
<li class="application">
BitTorrent <span class="applicationDesc">I2P is capable of anonymous Peer-to-Peer file sharing, to use the built-in bittorrent client go here:</span>
</li>
</a>
</button></li>
<li class="application"><button id="window-visit-snark" class="applicationName">
BitTorrent <span class="applicationDesc">I2P is capable of anonymous Peer-to-Peer file sharing, to use the built-in bittorrent client go here:</span>
</button></li>
</ul>
</p>
</p>