check in new CSS, proxy-error page rules
This commit is contained in:
120
home.css
120
home.css
@@ -8,7 +8,7 @@ html {
|
||||
padding: 0 20px;
|
||||
min-height: 100%;
|
||||
background: #9ab;
|
||||
background: repeating-linear-gradient(to bottom, #9ab, #89a 2px);
|
||||
background: #FFFFFF;
|
||||
scrollbar-color: #bcd #789
|
||||
}
|
||||
|
||||
@@ -17,12 +17,9 @@ body {
|
||||
padding: 20px 40px;
|
||||
font-family: Open Sans, Noto Sans, Segoe UI, sans-serif;
|
||||
font-size: 12pt;
|
||||
color: #495057;
|
||||
color: #FFFFFF;
|
||||
text-decoration: none;
|
||||
word-wrap: break-word;
|
||||
border-left: 1px solid #495057;
|
||||
border-right: 1px solid #495057;
|
||||
box-shadow: 0 0 2px 2px rgba(0, 0, 0, .1);
|
||||
background: #f2f2f2
|
||||
}
|
||||
|
||||
@@ -30,7 +27,7 @@ h1,
|
||||
h2,
|
||||
h3,
|
||||
h4 {
|
||||
display: inline-block;
|
||||
display: block;
|
||||
font-weight: 700
|
||||
}
|
||||
|
||||
@@ -73,16 +70,13 @@ ul {
|
||||
|
||||
li {
|
||||
margin-left: 0;
|
||||
padding-left: 2%;
|
||||
padding-right: 2%;
|
||||
padding-top: 2%;
|
||||
padding-bottom: 2%;
|
||||
padding: 12px 15px 15px 20px;
|
||||
width: calc(100% - 40px);
|
||||
text-align: justify;
|
||||
border: 1px solid #9ab;
|
||||
border-radius: 2px;
|
||||
box-shadow: inset 0 0 0 1px #fff;
|
||||
background: #dee2e6
|
||||
border: 1px solid #363A68;
|
||||
border-radius: 25px;
|
||||
box-shadow: inset 0 0 0 1px #363A68;
|
||||
background: #4456B7
|
||||
}
|
||||
|
||||
li li {
|
||||
@@ -100,7 +94,7 @@ li li:first-of-type {
|
||||
}
|
||||
|
||||
li a:first-of-type {
|
||||
display: inline-block;
|
||||
display: block;
|
||||
width: 100%
|
||||
}
|
||||
|
||||
@@ -120,7 +114,7 @@ ul+h3 {
|
||||
|
||||
a,
|
||||
button {
|
||||
color: #3b6bbf;
|
||||
color: #F9F7DC;
|
||||
text-decoration: none;
|
||||
font-weight: 700;
|
||||
word-wrap: break-word;
|
||||
@@ -128,16 +122,16 @@ button {
|
||||
}
|
||||
|
||||
.applicationDesc {
|
||||
color: #81888f;
|
||||
color: #FFFFFF;
|
||||
text-decoration: none;
|
||||
font-weight: 700;
|
||||
word-wrap: break-word;
|
||||
outline: 0
|
||||
}
|
||||
|
||||
.applicationDesc:hover,
|
||||
a:hover,
|
||||
button:hover {
|
||||
color: #FF9E7A;
|
||||
text-decoration: none;
|
||||
font-weight: 700;
|
||||
word-wrap: break-word;
|
||||
@@ -147,17 +141,14 @@ button:hover {
|
||||
button {
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
color: #3b6bbf;
|
||||
color: #FFFFFF;
|
||||
text-decoration: none;
|
||||
font-weight: 700;
|
||||
word-wrap: break-word;
|
||||
outline: 0
|
||||
}
|
||||
|
||||
.background {
|
||||
background-color: #f8f8ff;
|
||||
height: 100%
|
||||
}
|
||||
.background {}
|
||||
|
||||
.content {
|
||||
margin: 1.5rem;
|
||||
@@ -165,10 +156,9 @@ button {
|
||||
min-height: 3rem;
|
||||
min-width: 95%;
|
||||
display: inline-block;
|
||||
border: 1px solid #d9d9d6;
|
||||
border-radius: 2px;
|
||||
box-shadow: inset 0 0 0 1px #fff, 0 0 1px #ccc;
|
||||
background: #f8f8ff
|
||||
border: 1px solid #363A68;
|
||||
border-radius: 25px;
|
||||
background: #363A68
|
||||
}
|
||||
|
||||
#header,
|
||||
@@ -181,27 +171,25 @@ button {
|
||||
min-height: 3rem;
|
||||
min-width: 95%;
|
||||
display: inline-block;
|
||||
border: 1px solid #d9d9d6;
|
||||
border-radius: 2px;
|
||||
box-shadow: inset 0 0 0 1px #fff, 0 0 1px #ccc;
|
||||
background: #f8f8ff
|
||||
border: 1px solid #787FF6;
|
||||
border-radius: 25px;
|
||||
box-shadow: inset 0 0 0 1px #787FF6, 0 0 1px #ccc;
|
||||
background: #363A68;
|
||||
}
|
||||
|
||||
.showhider {
|
||||
margin-right: auto;
|
||||
padding: 5% !important;
|
||||
padding: 0!important;
|
||||
text-transform: uppercase;
|
||||
background: none!important;
|
||||
border: none;
|
||||
width: 90%;
|
||||
color: #3b6bbf;
|
||||
color: #FFFFFF;
|
||||
text-decoration: none;
|
||||
font-weight: 700;
|
||||
word-wrap: break-word;
|
||||
outline: 0;
|
||||
text-align: left;
|
||||
border-radius: 12%;
|
||||
border: 1px solid;
|
||||
text-align: left
|
||||
}
|
||||
|
||||
#links .showhider {
|
||||
@@ -220,11 +208,6 @@ button {
|
||||
margin: 1rem;
|
||||
width: 42%;
|
||||
min-width: 42%;
|
||||
background: #dee2e6;
|
||||
text-align: center!important;
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 2px;
|
||||
box-shadow: inset 0 0 0 1px #fff, 0 0 1px #ccc;
|
||||
display: inline-block
|
||||
}
|
||||
|
||||
@@ -236,12 +219,11 @@ button {
|
||||
width: 42%;
|
||||
min-width: 42%;
|
||||
font-size: 2rem;
|
||||
background: #a48fe1;
|
||||
background: #4456B7;
|
||||
text-align: center!important;
|
||||
border: 1px solid #a48fe1;
|
||||
border-radius: 2px;
|
||||
box-shadow: inset 0 0 0 1px #fff, 0 0 1px #ccc;
|
||||
float: left;
|
||||
border: 2px solid #787FF6;
|
||||
border-radius: 25px;
|
||||
box-shadow: inset 0 0 0 1px #fff, 0 0 1px #ccc
|
||||
}
|
||||
|
||||
#i2pbrowser-description {
|
||||
@@ -250,23 +232,14 @@ button {
|
||||
width: 50%;
|
||||
min-width: 50%;
|
||||
display: inline-block;
|
||||
background: #dee2e6;
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 2px;
|
||||
box-shadow: inset 0 0 0 1px #fff, 0 0 1px #ccc
|
||||
}
|
||||
|
||||
#linksExplain {
|
||||
min-height: 5rem;
|
||||
padding: .5rem;
|
||||
margin: .5rem;
|
||||
width: 30%;
|
||||
min-width: 30%;
|
||||
background: #dee2e6;
|
||||
text-align: center!important;
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 2px;
|
||||
box-shadow: inset 0 0 0 1px #fff, 0 0 1px #ccc
|
||||
width: 100%;
|
||||
min-width: 100%;
|
||||
}
|
||||
|
||||
#applicationExplain,
|
||||
@@ -274,13 +247,8 @@ button {
|
||||
min-height: 5rem;
|
||||
padding: .5rem;
|
||||
margin: .5rem;
|
||||
width: 30%;
|
||||
min-width: 30%;
|
||||
background: #dee2e6;
|
||||
text-align: center!important;
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 2px;
|
||||
box-shadow: inset 0 0 0 1px #fff, 0 0 1px #ccc;
|
||||
width: 100%;
|
||||
min-width: 100%;
|
||||
float: left
|
||||
}
|
||||
|
||||
@@ -291,12 +259,12 @@ button {
|
||||
width: 38%;
|
||||
min-width: 38%;
|
||||
display: inline-block;
|
||||
background: #d9d9d6;
|
||||
background: #363A68;
|
||||
float: right;
|
||||
text-align: center!important;
|
||||
border: 1px solid #d9d9d6;
|
||||
border-radius: 2px;
|
||||
box-shadow: inset 0 0 0 1px #fff, 0 0 1px #ccc
|
||||
border: 2px solid #787FF6;
|
||||
border-radius: 25px;
|
||||
box-shadow: inset 0 0 0 1px #fff, 0 0 1px #ccc;
|
||||
}
|
||||
|
||||
#proxyUnready {
|
||||
@@ -306,12 +274,11 @@ button {
|
||||
width: 38%;
|
||||
min-width: 38%;
|
||||
display: inline-block;
|
||||
background: #363A68;
|
||||
float: right;
|
||||
text-align: center!important;
|
||||
border: 1px solid #ffc56d;
|
||||
border-radius: 2px;
|
||||
background: #ffc56d;
|
||||
box-shadow: inset 0 0 0 1px #fff, 0 0 1px #ccc
|
||||
border: 2px solid #787FF6;
|
||||
border-radius: 25px;
|
||||
}
|
||||
|
||||
#consoleOn {
|
||||
@@ -360,15 +327,6 @@ img.readyness {
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 800px) {
|
||||
.application-info {
|
||||
max-width: 46%;
|
||||
min-width: 46% !important;
|
||||
margin-right: 1%;
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1200px) {
|
||||
body {
|
||||
font-size: 10.5pt
|
||||
|
||||
26
proxy.js
26
proxy.js
@@ -451,34 +451,42 @@ function setupProxy() {
|
||||
|
||||
function handleContextProxyError(err) {
|
||||
function changeTabErr(error) {
|
||||
console.error(`Error: ${error}`);
|
||||
console.error(`(proxy) Error: ${error}`);
|
||||
}
|
||||
|
||||
if (err.message !== "ProxyInfoData: Invalid proxy server type: \"undefined\"") {
|
||||
function changeTabPage(tabs) {
|
||||
function checkTabCookieStore(context) {
|
||||
for (let index = 0; index < tabs.length; index += 1) {
|
||||
let tab = tabs[index];
|
||||
console.warn("(proxy) Error:", err)
|
||||
}
|
||||
|
||||
function changeTabPage(tabs) {
|
||||
function checkTabCookieStore(context) {
|
||||
for (let index = 0; index < tabs.length; index += 1) {
|
||||
let tab = tabs[index];
|
||||
if (!tab.url.endsWith("proxyerr.html")) {
|
||||
if (tab.cookieStoreId == context[0].cookieStoreId) {
|
||||
function onProxyErrorUpdated() {
|
||||
console.log(`Updated tab:`);
|
||||
console.warn(`(proxy) Updated tab:` + tab);
|
||||
}
|
||||
|
||||
function onProxyError(error) {
|
||||
console.error(`Error: ${error}`);
|
||||
console.error(`(proxy) Error: ${error}`);
|
||||
}
|
||||
let createData = {
|
||||
url: "proxyerr.html"
|
||||
};
|
||||
let creating = browser.tabs.update(tab.id, createData);
|
||||
creating.then(onProxyErrorUpdated, onProxyError);
|
||||
} else {
|
||||
console.warn("Not directing to proxy error page due to context mismatch");
|
||||
}
|
||||
} else {
|
||||
console.warn("Not directing to proxy error page due to hostname match");
|
||||
}
|
||||
}
|
||||
browser.contextualIdentities.query({ name: titlepref }).then(checkTabCookieStore, changeTabErr);
|
||||
}
|
||||
browser.tabs.query({ url: ["*://*.i2p/*", "*://localhost/*", "*://127.0.0.1/*", "*://*/*i2p*"] }).then(changeTabPage, changeTabErr);
|
||||
browser.contextualIdentities.query({ name: titlepref }).then(checkTabCookieStore, changeTabErr);
|
||||
}
|
||||
browser.tabs.query({ url: ["*://*.i2p/*", "*://localhost/*", "*://127.0.0.1/*", "*://*/*i2p*"] }).then(changeTabPage, changeTabErr);
|
||||
}
|
||||
|
||||
function update() {
|
||||
|
||||
Reference in New Issue
Block a user