diff --git a/home.css b/home.css index 911720d..ca11647 100644 --- a/home.css +++ b/home.css @@ -1,34 +1,140 @@ + + * { padding: 0; - color: #1f1a24; - margin: 0 + margin: 0; } -a, -button { - color: #1f1a24; + +html { + margin: 0 4%; + padding: 0 20px; + min-height: 100%; + background: #9ab; + background: repeating-linear-gradient(to bottom, #9ab, #89a 2px); + scrollbar-color: #bcd #789; +} + +body { + margin: 0; + padding: 20px 40px; + font-family: Open Sans, Noto Sans, Segoe UI, sans-serif; + font-size: 12pt; + color: #495057; + 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; +} + +h1, h2, h3, h4 { + display: block; + font-weight: 700; +} + +h1 { + text-transform: uppercase; + font-weight: 900; + font-size: 200%; +} + +h2 { + font-size: 140%; +} + +h3 { + font-size: 120%; +} + +h4 { + margin-bottom: 5px; + text-align: right; + text-transform: none; + font-size: 90%; + font-weight: 600; + font-style: italic; +} + +p { + margin-bottom: 15px; + width: 100%; + line-height: 1.4; + word-wrap: break-word; + text-align: justify; + text-decoration: none; +} + +ul { + margin: 10px 20px; + list-style: none; +} + +li { + margin-left: 0; + 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; +} + +li li { + padding-bottom: 0; + width: calc(100% - 40px); + text-align: left; + border: none; + border-top: 1px solid #9ab; + box-shadow: none; +} + +li li:first-of-type { + margin-top: 15px; + border-top: none; +} + +li a:first-of-type { + display: block; + width: 100%; +} + +#applicationExplain { + float: unset; +} + +li+li { + margin-top: 15px; +} + +h3+ul, ul+h3, ul+h2 { + margin-top: 20px; +} + +a, button { + color: #3b6bbf; text-decoration: none; - background: none; font-weight: 700; word-wrap: break-word; outline: 0; - padding: 3px; - margin: auto } + .applicationDesc { + color: #81888f; text-decoration: none; font-weight: 700; word-wrap: break-word; - outline: 0 + outline: 0; } -.applicationDesc:hover, -a:hover, -button:hover { - color: #495057; + +.applicationDesc:hover, a:hover, button:hover { text-decoration: none; font-weight: 700; word-wrap: break-word; - outline: 0 + outline: 0; } + button { border: none; cursor: pointer; @@ -36,137 +142,77 @@ button { text-decoration: none; font-weight: 700; word-wrap: break-word; - outline: 0 -} -body { - display: flex; - flex-direction: column; - font-family: "Droid Sans","Noto Sans",Ubuntu,"Segoe UI","Lucida Grande",Verdana,Helvetica,sans-serif; - margin: 0 auto; - padding: 0; - text-decoration: none; - font-weight: 700; - word-wrap: break-word; - outline: 0 -} -.button-list { - min-height: 230px; - min-width: 230px + outline: 0; } + .background { - height: 100% -} -p { - line-height: 32px; - font-size: 17px; - font-family: "Droid Sans","Noto Sans",Ubuntu,"Segoe UI","Lucida Grande",Verdana,Helvetica,sans-serif; - text-decoration: none; - font-weight: 700; - word-wrap: break-word; - outline: 0 + background-color: #f8f8ff; + height: 100%; } + .content { - min-height: 3rem; - padding: 1rem; margin: 1.5rem; - display: block; - border-radius: 2px; - min-width: 100% -} -#header, -.application-info, -.browser-info, -.extended-info, -.search-info { - min-height: 3rem; padding: 1rem; - margin-top: 1.5rem; - display: block; + min-height: 3rem; + min-width: 95%; + display: inline-block; + border: 1px solid #d9d9d6; border-radius: 2px; - min-width: 100% + box-shadow: inset 0 0 0 1px #fff, 0 0 1px #ccc; + background: #f8f8ff; } -h1 { - margin: auto; - font-family: "Droid Sans","Noto Sans",Ubuntu,"Segoe UI","Lucida Grande",Verdana,Helvetica,sans-serif; - font-weight: 600; - font-size: 32px; - color: #e6e6e7; - background: #1f1a24; - width: 100%; - border-radius: 2px 2px 0 0 -} -h2, -h3 { - margin-right: auto; - font-family: "Droid Sans","Noto Sans",Ubuntu,"Segoe UI","Lucida Grande",Verdana,Helvetica,sans-serif; - font-weight: 600; - font-size: 25px; - color: #e6e6e7; - border-radius: 2px 2px 0 0; - background: #1f1a24; - width: 100%; - padding-left: 5% -} -h4 { - margin-right: auto; - font-family: "Droid Sans","Noto Sans",Ubuntu,"Segoe UI","Lucida Grande",Verdana,Helvetica,sans-serif; - font-weight: 600; - font-size: 20px!important; - color: #41465f; - border-radius: 2px 2px 0 0; - background: #1f1a24; - width: 100%; - padding-left: 5% + +#header, .application-info, .browser-info, .extended-info, .search-info { + margin-top: 1.5rem; + padding: 1rem; + 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; } + .showhider { margin-right: auto; - font-family: "Droid Sans","Noto Sans",Ubuntu,"Segoe UI","Lucida Grande",Verdana,Helvetica,sans-serif; - border: none; padding: 0!important; + text-transform: uppercase; + background: none !important; + border: none; + width: 90%; color: #3b6bbf; text-decoration: none; font-weight: 700; word-wrap: break-word; outline: 0; - text-align: left + text-align: left; } + #links .showhider { - font-size: 25px + font-size: 25px; } + .section-header { display: flex; flex-direction: row; - margin-bottom: 80px -} -ul { - margin: auto; - border-radius: 2px; - width: 100%; - margin: 0; - padding: 0 -} -li { - display: block; - text-align: center; - margin: 0; - padding: 0 -} -.center { - display: block; - margin-left: auto; - margin-right: auto; - width: 50% + margin-bottom: 80px; } + #readyness { padding-top: 1rem; padding-bottom: 1rem; margin: 1rem; width: 42%; min-width: 42%; + background: #dee2e6; text-align: center!important; + border: 1px solid #dee2e6; border-radius: 2px; - display: block + box-shadow: inset 0 0 0 1px #fff, 0 0 1px #ccc; + display: inline-block; } + #onboarding { min-height: 5rem; padding: .5rem; @@ -175,107 +221,133 @@ li { width: 42%; min-width: 42%; font-size: 2rem; + background: #a48fe1; text-align: center!important; - border-radius: 2px + border: 1px solid #a48fe1; + border-radius: 2px; + box-shadow: inset 0 0 0 1px #fff, 0 0 1px #ccc; } + #i2pbrowser-description { padding-top: 1rem; padding-bottom: 1rem; width: 50%; min-width: 50%; - display: block -} -html body ul.label-list li { - list-style: none; - float: left -} -html body ul.label-list li:nth-child(odd) { - clear: left + 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-radius: 2px + border: 1px solid #dee2e6; + border-radius: 2px; + box-shadow: inset 0 0 0 1px #fff, 0 0 1px #ccc; } -#applicationExplain, -#controlExplain { + +#applicationExplain, #controlExplain { min-height: 5rem; padding: .5rem; margin: .5rem; - text-align: left!important; - float: left + 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; + float: left; } + #proxyReady { min-height: 3rem; padding: .5rem; margin: .2rem; width: 38%; min-width: 38%; - display: block; + display: inline-block; + background: #d9d9d6; float: right; - text-align: center!important + text-align: center!important; + border: 1px solid #d9d9d6; + border-radius: 2px; + box-shadow: inset 0 0 0 1px #fff, 0 0 1px #ccc; } + #proxyUnready { min-height: 3rem; padding: .5rem; margin: .2rem; width: 38%; min-width: 38%; - display: block; + display: inline-block; float: right; - text-align: center!important + 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; } + #consoleOn { min-height: 3rem; padding: .5rem; margin: .2rem; width: 38%; min-width: 38%; - display: block; + display: inline-block; float: left; - text-align: center!important -} -.tabicon { - min-width: 64px; - min-height: 64px -} -li.application { - text-align: left -} -button.applicationName { - width: auto + text-align: center!important; + border: 1px solid #f7e59a; + border-radius: 2px; + background: #f7e59a; + box-shadow: inset 0 0 0 1px #fff, 0 0 1px #ccc; } + .onboardingContent { font-size: .8rem!important; text-align: left; - display: none + display: none; } + #info-content { - display: none + display: none; } -.consoleOn:hover #proxy-check, -.proxyReady:hover #proxy-check { + +.consoleOn:hover #proxy-check, .proxyReady:hover #proxy-check { visibility: visible; - opacity: 1 + opacity: 1; } + img { max-width: 100%; - margin: 3% } + img.readyness { height: 100%; - width: auto + width: auto; } -input { - color: #1f1a24 + +@media only screen and (max-width: 399px) { + .application-info { + display: none; + } } -#hidden { - display: none + +@media screen and (max-width: 1200px) { + body { + font-size: 10.5pt; + } +} + +video { + width: 100% } -.hidden { - display: none -} \ No newline at end of file diff --git a/scrub.js b/scrub.js index 2663906..ec9c9a2 100644 --- a/scrub.js +++ b/scrub.js @@ -684,7 +684,7 @@ var coolheadersSetup = function (e) { }); } else { browser.pageAction.setIcon({ - path: "icons/infotoopiebpt.png", + path: "icons/infotoopiebt.png", tabId: e.tabId, }); } @@ -706,7 +706,34 @@ var coolheadersSetup = function (e) { function getTabURL(tab) { if (tab.url.startsWith("https")) { console.log(tab.url); - if (tab.url.endsWith(".i2p/")) { + if (tab.url.includes(".i2p")) { + + //console.log("(background) tabinfo", tabInfo[0].id) + try { + browser.tabs + .sendMessage(tab.id, { req: "i2p-torrentlocation" }) + .then((response) => { + if (response != undefined && response != "") { + console.log( + "(pageaction) i2p-torrentlocation response object", + response + ); + if (response.content.toUpperCase() != "NO-ALT-LOCATION") { + browser.pageAction.setPopup({ + tabId: tab.id, + popup: "torrent.html", + }); + browser.pageAction.setIcon({ + path: "icons/infotoopiesbt.png", + tabId: tab.id, + }); + browser.pageAction.setTitle({ + tabId: tab.id, + title: response.content, + }); + browser.pageAction.show(tab.id); + } + }else{ browser.pageAction.setPopup({ tabId: tab.id, popup: "security.html", @@ -715,62 +742,43 @@ function getTabURL(tab) { path: "icons/infotoopies.png", tabId: tab.id, }); - //console.log("(background) tabinfo", tabInfo[0].id) - } - try { - browser.tabs - .sendMessage(tab.id, { req: "i2p-location" }) - .then((response) => { - if (response != undefined) { - console.log("(scrub) i2p-location response object", 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); - } catch (e) { - console.log("(pageaction)", e); - } - - try { - browser.tabs - .sendMessage(tab.id, { req: "i2p-torrentlocation" }) - .then((response) => { - if (response != undefined) { - console.log("(scrub) i2p-location response object", response); - if (response.content.toUpperCase() != "NO-ALT-LOCATION") { - browser.pageAction.setPopup({ - tabId: tab.id, - popup: "torrent.html", - }); - browser.pageAction.setIcon({ - path: "icons/infotoopiesbt.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); + } catch (e) { + console.log("(pageaction)", e); + } + } else { + try { + browser.tabs + .sendMessage(tab.id, { req: "i2p-location" }) + .then((response) => { + if (response != undefined) { + console.log( + "(pageaction) i2p-location response object", + 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); - } catch (e) { - console.log("(pageaction)", e); + }); + console.log("(pageaction)", tab.id, tab.url); + } catch (e) { + console.log("(pageaction)", e); + } } } else { try { @@ -778,7 +786,10 @@ function getTabURL(tab) { .sendMessage(tab.id, { req: "i2p-torrentlocation" }) .then((response) => { if (response != undefined) { - console.log("(scrub) i2p-location response object", response); + console.log( + "(pageaction) i2p-torrentlocation response object", + response + ); if (response.content.toUpperCase() != "NO-ALT-LOCATION") { browser.pageAction.setPopup({ tabId: tab.id,