Added links on icons in the popup #103

This commit is contained in:
ManeraKai 2022-03-10 19:41:00 +03:00
parent 26337798bf
commit 57d3517b75
No known key found for this signature in database
GPG Key ID: 5ABC31FFD562E337
6 changed files with 34 additions and 36 deletions

View File

@ -19,7 +19,7 @@
"bugs": { "bugs": {
"url": "https://github.com/LibRedirect/LibRedirect/issues" "url": "https://github.com/LibRedirect/LibRedirect/issues"
}, },
"homepage": "https://github.com/LibRedirect/LibRedirect#readme", "homepage": "https://github.com/LibRedirect/LibRedirect",
"devDependencies": { "devDependencies": {
"web-ext": "^6.7.0" "web-ext": "^6.7.0"
}, },

View File

@ -3,7 +3,8 @@ window.browser = window.browser || window.chrome;
import commonHelper from './common.js' import commonHelper from './common.js'
const targets = [ const targets = [
/^https?:\/\/send\.firefox\.com\/$/, /^https?:\/\/send.onion\/$/,
/^ https ?: \/\/send\.firefox\.com\/$/,
/^https?:\/\/sendfiles\.online\/$/ /^https?:\/\/sendfiles\.online\/$/
]; ];

View File

@ -98,11 +98,9 @@ function setWikilessTorCustomRedirects(val) {
let theme; let theme;
let applyThemeToSites; let applyThemeToSites;
function initWikilessCookies() { function initWikilessCookies() {
console.log("applyThemeToSites", applyThemeToSites)
let themeValue; let themeValue;
if (theme == 'light') themeValue = 'white'; if (theme == 'light') themeValue = 'white';
if (theme == 'dark') themeValue = 'dark'; if (theme == 'dark') themeValue = 'dark';
console.log("themeValue", themeValue)
if (applyThemeToSites && themeValue) { if (applyThemeToSites && themeValue) {
let allInstances = [...redirects.wikiless.normal, ...redirects.wikiless.tor, ...wikilessNormalCustomRedirects, ...wikilessTorCustomRedirects] let allInstances = [...redirects.wikiless.normal, ...redirects.wikiless.tor, ...wikilessNormalCustomRedirects, ...wikilessTorCustomRedirects]
let checkedInstances = [...wikilessNormalRedirectsChecks, ...wikilessNormalCustomRedirects, ...wikilessTorRedirectsChecks, ...wikilessTorCustomRedirects] let checkedInstances = [...wikilessNormalRedirectsChecks, ...wikilessNormalCustomRedirects, ...wikilessTorRedirectsChecks, ...wikilessTorCustomRedirects]

View File

@ -440,8 +440,6 @@ function redirect(url, details, initiator) {
} }
function changeInstance(url) { function changeInstance(url) {
console.log("changeInstance Youtube");
let protocolHost = `${url.protocol}//${url.host}`; let protocolHost = `${url.protocol}//${url.host}`;
console.log("protocolHost", protocolHost); console.log("protocolHost", protocolHost);

View File

@ -10,83 +10,83 @@
<body> <body>
<div id="youtube" class="some-block"> <div id="youtube" class="some-block">
<div class="title"> <a class="title" href="https://youtube.com">
<img src="../../assets/images/youtube-icon.png" /> <img src="../../assets/images/youtube-icon.png" />
<h4>YouTube</h4> <h4>YouTube</h4>
</div> </a>
<input id="disable-youtube" type="checkbox" checked /> <input id="disable-youtube" type="checkbox" checked />
</div> </div>
<div id="youtubeMusic" class="some-block"> <div id="youtubeMusic" class="some-block">
<div class="title"> <a class="title" href="https://music.youtube.com">
<img src="../../assets/images/youtube-music-icon.png" /> <img src="../../assets/images/youtube-music-icon.png" />
<h4>YT Music</h4> <h4>YT Music</h4>
</div> </a>
<input id="disable-youtubeMusic" type="checkbox" checked /> <input id="disable-youtubeMusic" type="checkbox" checked />
</div> </div>
<div id="twitter" class="some-block"> <div id="twitter" class="some-block">
<div class="title"> <a class="title" href="https://twitter.com">
<img src="../../assets/images/twitter-icon.png" /> <img src="../../assets/images/twitter-icon.png" />
<h4>Twitter</h4> <h4>Twitter</h4>
</div> </a>
<input id="disable-nitter" type="checkbox" checked /> <input id="disable-nitter" type="checkbox" checked />
</div> </div>
<div id="instagram" class="some-block"> <div id="instagram" class="some-block">
<div class="title"> <a class="title" href="https://instagram.com">
<!-- https://www.iconfinder.com/Indygo --> <!-- https://www.iconfinder.com/Indygo -->
<img src="../../assets/images/instagram-icon.png" /> <img src="../../assets/images/instagram-icon.png" />
<h4>Instagram</h4> <h4>Instagram</h4>
</div> </a>
<input id="disable-bibliogram" type="checkbox" checked /> <input id="disable-bibliogram" type="checkbox" checked />
</div> </div>
<div id="tikTok" class="some-block"> <div id="tikTok" class="some-block">
<div class="title"> <a class="title" href="https://tiktok.com">
<!-- https://www.flaticon.com/authors/designer-shah --> <!-- https://www.flaticon.com/authors/designer-shah -->
<img src="../../assets/images/tiktok-icon.png" /> <img src="../../assets/images/tiktok-icon.png" />
<h4>TikTok</h4> <h4>TikTok</h4>
</div> </a>
<input id="disable-tiktok" type="checkbox" checked /> <input id="disable-tiktok" type="checkbox" checked />
</div> </div>
<div id="imgur" class="some-block"> <div id="imgur" class="some-block">
<div class="title"> <a class="title" href="https://imgur.com">
<img src="../../assets/images/imgur-icon.png" /> <img src="../../assets/images/imgur-icon.png" />
<h4>Imgur</h4> <h4>Imgur</h4>
</div> </a>
<input id="disable-imgur" type="checkbox" checked /> <input id="disable-imgur" type="checkbox" checked />
</div> </div>
<div id="reddit" class="some-block"> <div id="reddit" class="some-block">
<div class="title"> <a class="title" href="https://reddit.com">
<!-- https://www.flaticon.com/authors/md-tanvirul-haque --> <!-- https://www.flaticon.com/authors/md-tanvirul-haque -->
<img src="../../assets/images/reddit-icon.png" /> <img src="../../assets/images/reddit-icon.png" />
<h4>Reddit</h4> <h4>Reddit</h4>
</div> </a>
<input id="disable-reddit" type="checkbox" checked /> <input id="disable-reddit" type="checkbox" checked />
</div> </div>
<div id="pixiv" class="some-block"> <div id="pixiv" class="some-block">
<div class="title"> <a class="title" href="https://pixiv.net">
<!-- https://clipground.com/pics/getsecond?url=pixiv-logo-2.png --> <!-- https://clipground.com/pics/getsecond?url=pixiv-logo-2.png -->
<img src="../../assets/images/pixiv-icon.svg" /> <img src="../../assets/images/pixiv-icon.svg" />
<h4>Pixiv</h4> <h4>Pixiv</h4>
</div> </a>
<input id="disable-pixiv" type="checkbox" checked /> <input id="disable-pixiv" type="checkbox" checked />
</div> </div>
<div id="wikipedia" class="some-block"> <div id="wikipedia" class="some-block">
<div class="title"> <a class="title" href="https://wikipedia.org">
<img src="../../../assets/images/wikipedia-icon.svg" /> <img src="../../../assets/images/wikipedia-icon.svg" />
<h4>Wikipedia</h4> <h4>Wikipedia</h4>
</div> </a>
<input id="disable-wikipedia" type="checkbox" checked /> <input id="disable-wikipedia" type="checkbox" checked />
</div> </div>
<div id="medium" class="some-block"> <div id="medium" class="some-block">
<div class="title"> <a class="title" href="https://medium.com">
<!-- https://markentier.tech/posts/2020/10/medium-icon-svg/ --> <!-- https://markentier.tech/posts/2020/10/medium-icon-svg/ -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
<circle cx="500" cy="500" r="500" /> <circle cx="500" cy="500" r="500" />
@ -94,54 +94,53 @@
<ellipse cx="1682" cy="502" rx="88" ry="424" /> <ellipse cx="1682" cy="502" rx="88" ry="424" />
</svg> </svg>
<h4>Medium</h4> <h4>Medium</h4>
</div> </a>
<input id="disable-medium" type="checkbox" checked /> <input id="disable-medium" type="checkbox" checked />
</div> </div>
<div id="search" class="some-block"> <div id="search" class="some-block">
<div class="title"> <a class="title" href="http://libredirect.onion">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
<path d="M0 0h24v24H0V0z" fill="none" /> <path d="M0 0h24v24H0V0z" fill="none" />
<path <path
d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" /> d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" />
</svg> </svg>
<h4>Search</h4> <h4>Search</h4>
</div> </a>
<input id="disable-search" type="checkbox" checked /> <input id="disable-search" type="checkbox" checked />
</div> </div>
<div id="translate" class="some-block"> <div id="translate" class="some-block">
<div class="title"> <a class="title" href="https://translate.google.com">
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
<path d="M0 0h24v24H0V0z" fill="none" />
<path <path
d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z" /> d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z" />
</svg> </svg>
<h4>Translate</h4> <h4>Translate</h4>
</div> </a>
<input id="disable-simplyTranslate" type="checkbox" checked /> <input id="disable-simplyTranslate" type="checkbox" checked />
</div> </div>
<div id="maps" class="some-block"> <div id="maps" class="some-block">
<div class="title"> <a class="title" href="https://maps.google.com">
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
<path d="M0 0h24v24H0V0z" fill="none" /> <path d="M0 0h24v24H0V0z" fill="none" />
<path <path
d="M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM10 5.47l4 1.4v11.66l-4-1.4V5.47zm-5 .99l3-1.01v11.7l-3 1.16V6.46zm14 11.08l-3 1.01V6.86l3-1.16v11.84z" /> d="M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM10 5.47l4 1.4v11.66l-4-1.4V5.47zm-5 .99l3-1.01v11.7l-3 1.16V6.46zm14 11.08l-3 1.01V6.86l3-1.16v11.84z" />
</svg> </svg>
<h4>Maps</h4> <h4>Maps</h4>
</div> </a>
<input id="disable-osm" type="checkbox" checked /> <input id="disable-osm" type="checkbox" checked />
</div> </div>
<div id="sendTargets" class="some-block"> <div id="sendTargets" class="some-block">
<div class="title"> <a class="title" href="http://send.onion">
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"> <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
<path <path
d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z" /> d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z" />
</svg> </svg>
<h4>Send Files</h4> <h4>Send Files</h4>
</div> </a>
<input id="disable-sendTargets" type="checkbox" checked /> <input id="disable-sendTargets" type="checkbox" checked />
</div> </div>

View File

@ -32,9 +32,11 @@ div.some-block input[type="checkbox"] {
-webkit-appearance: none; -webkit-appearance: none;
} }
div.title { .title {
display: flex; display: flex;
align-items: center; align-items: center;
text-decoration: none;
color: var(--text);
} }
img, svg { img, svg {