Compare commits
40 Commits
811f8766ee
...
759e403883
Author | SHA1 | Date |
---|---|---|
ManeraKai | 759e403883 | |
Gérson da Fonseca Henzel | aa2627904c | |
ManeraKai | 8b415d91e6 | |
ManeraKai | 2a239a2fb2 | |
CompileNix | e75eab9798 | |
ManeraKai | b6c98028b9 | |
ManeraKai | be9a72f3a2 | |
ManeraKai | bf64922d2c | |
Hamza | a7665994f0 | |
ManeraKai | 4fc8c6cdcd | |
ManeraKai | 3feaaa0eba | |
ManeraKai | 9cf2b97784 | |
ManeraKai | fc6218c84d | |
ManeraKai | 8d944834fa | |
ManeraKai | 1b95b1ce52 | |
gallegonovato | ca8be7a99a | |
ButterflyOfFire | 7c8afce025 | |
Deleted User | 3442a02fc6 | |
gallegonovato | 57893573f0 | |
josé m | 06f9abd62e | |
ManeraKai | cfa6c887f1 | |
ManeraKai | b79a485f61 | |
HexagonCDN | cc02c1cd8a | |
ManeraKai | c599ad9ed6 | |
ManeraKai | f80d4a8491 | |
ManeraKai | f43cf3c09a | |
ManeraKai | e48f68126d | |
ManeraKai | dbd0bbb03e | |
ManeraKai | 94f7690e1d | |
ManeraKai | 473e196567 | |
ManeraKai | fa9f55978e | |
ManeraKai | ab46d1a7d4 | |
ManeraKai | 7951a084ba | |
syeopite | 5db2536eae | |
syeopite | 4741eb2439 | |
ManeraKai | 2e5b23c83f | |
ManeraKai | 0babf9719d | |
ManeraKai | 5a105da61e | |
ManeraKai | 51ffdebd12 | |
Or | d9121aa5d8 |
|
@ -7,7 +7,8 @@
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "web-ext run",
|
"start": "web-ext run",
|
||||||
"start_ar": "web-ext run --firefox=/home/esmail/Downloads/ar/firefox/firefox --pref font.language.group=ar",
|
"nightly": "web-ext run --firefox=/home/manerakai/software/firefox_nightly/firefox",
|
||||||
|
"android": "web-ext run -t firefox-android --adb-device emulator-5554 --firefox-apk org.mozilla.fenix",
|
||||||
"build": "web-ext build",
|
"build": "web-ext build",
|
||||||
"test": "web-ext lint",
|
"test": "web-ext lint",
|
||||||
"html": "pug --basedir ./ --obj ./src/config.json src/pages/options/index.pug --out src/pages/options/ && pug --basedir ./ --obj ./src/config.json src/pages/popup/popup.pug --out src/pages/popup/"
|
"html": "pug --basedir ./ --obj ./src/config.json src/pages/options/index.pug --out src/pages/options/ && pug --basedir ./ --obj ./src/config.json src/pages/popup/popup.pug --out src/pages/popup/"
|
||||||
|
|
|
@ -99,5 +99,14 @@
|
||||||
},
|
},
|
||||||
"about": {
|
"about": {
|
||||||
"message": "Über"
|
"message": "Über"
|
||||||
|
},
|
||||||
|
"unsupportedIframesHandling": {
|
||||||
|
"message": "Umgang mit nicht unterstützten iFrames"
|
||||||
|
},
|
||||||
|
"fetchPublicInstances": {
|
||||||
|
"message": "Abrufen öffentlicher Instanzen"
|
||||||
|
},
|
||||||
|
"disable": {
|
||||||
|
"message": "Deaktivieren"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,5 +105,8 @@
|
||||||
},
|
},
|
||||||
"disable": {
|
"disable": {
|
||||||
"message": "Désactiver"
|
"message": "Désactiver"
|
||||||
|
},
|
||||||
|
"unsupportedIframesHandling": {
|
||||||
|
"message": "Gestion des iframes non prises en charge"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
"description": "used in the settings page"
|
"description": "used in the settings page"
|
||||||
},
|
},
|
||||||
"excludeFromRedirecting": {
|
"excludeFromRedirecting": {
|
||||||
"message": "Excluded from redirecting",
|
"message": "Excluído da redirección",
|
||||||
"description": "used in the settings page"
|
"description": "used in the settings page"
|
||||||
},
|
},
|
||||||
"importSettings": {
|
"importSettings": {
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
"description": "used in the settings page"
|
"description": "used in the settings page"
|
||||||
},
|
},
|
||||||
"showInPopup": {
|
"showInPopup": {
|
||||||
"message": "Show in popup",
|
"message": "Mostrar nunha ventá emerxente",
|
||||||
"description": "used in the settings page"
|
"description": "used in the settings page"
|
||||||
},
|
},
|
||||||
"frontend": {
|
"frontend": {
|
||||||
|
@ -76,21 +76,21 @@
|
||||||
"description": "used in the settings page"
|
"description": "used in the settings page"
|
||||||
},
|
},
|
||||||
"onlyNotEmbedded": {
|
"onlyNotEmbedded": {
|
||||||
"message": "non só incrustados",
|
"message": "só non incrustados",
|
||||||
"description": "used in the settings page"
|
"description": "used in the settings page"
|
||||||
},
|
},
|
||||||
"addYourFavoriteInstances": {
|
"addYourFavoriteInstances": {
|
||||||
"message": "Add your favorite instances",
|
"message": "Engade as túas instancias favoritas",
|
||||||
"description": "used in the settings page"
|
"description": "used in the settings page"
|
||||||
},
|
},
|
||||||
"copyRaw": {
|
"copyRaw": {
|
||||||
"message": "Copiar en crú"
|
"message": "Copiar Orixinal"
|
||||||
},
|
},
|
||||||
"copied": {
|
"copied": {
|
||||||
"message": "Copied"
|
"message": "Copiouse"
|
||||||
},
|
},
|
||||||
"redirectToOriginal": {
|
"redirectToOriginal": {
|
||||||
"message": "Redirect to original",
|
"message": "Ir ao orixinal",
|
||||||
"description": "Used in context menus when right clicking on a page/tab"
|
"description": "Used in context menus when right clicking on a page/tab"
|
||||||
},
|
},
|
||||||
"redirectLink": {
|
"redirectLink": {
|
||||||
|
@ -98,10 +98,10 @@
|
||||||
"description": "Used in context menus when right clicking on a hyperlink"
|
"description": "Used in context menus when right clicking on a hyperlink"
|
||||||
},
|
},
|
||||||
"about": {
|
"about": {
|
||||||
"message": "About"
|
"message": "Acerca de"
|
||||||
},
|
},
|
||||||
"unsupportedIframesHandling": {
|
"unsupportedIframesHandling": {
|
||||||
"message": "Sen soporte para a xestión de iframes"
|
"message": "Xestión de iframes sen soporte"
|
||||||
},
|
},
|
||||||
"fetchPublicInstances": {
|
"fetchPublicInstances": {
|
||||||
"message": "Obter instancias públicas"
|
"message": "Obter instancias públicas"
|
||||||
|
|
|
@ -99,5 +99,8 @@
|
||||||
},
|
},
|
||||||
"about": {
|
"about": {
|
||||||
"message": "Sobre"
|
"message": "Sobre"
|
||||||
|
},
|
||||||
|
"disable": {
|
||||||
|
"message": "Desativar"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,15 +36,15 @@
|
||||||
"description": "used in the settings page"
|
"description": "used in the settings page"
|
||||||
},
|
},
|
||||||
"excludeFromRedirecting": {
|
"excludeFromRedirecting": {
|
||||||
"message": "Excluded from redirecting",
|
"message": "Không được chuyển hướng",
|
||||||
"description": "used in the settings page"
|
"description": "used in the settings page"
|
||||||
},
|
},
|
||||||
"importSettings": {
|
"importSettings": {
|
||||||
"message": "Nhập cài đặt",
|
"message": "Nhập vào cài đặt",
|
||||||
"description": "used in the settings page"
|
"description": "used in the settings page"
|
||||||
},
|
},
|
||||||
"exportSettings": {
|
"exportSettings": {
|
||||||
"message": "Xuất cài đặt",
|
"message": "Xuất ra cài đặt",
|
||||||
"description": "used in the settings page"
|
"description": "used in the settings page"
|
||||||
},
|
},
|
||||||
"resetSettings": {
|
"resetSettings": {
|
||||||
|
@ -72,25 +72,25 @@
|
||||||
"description": "used in the settings page"
|
"description": "used in the settings page"
|
||||||
},
|
},
|
||||||
"onlyEmbedded": {
|
"onlyEmbedded": {
|
||||||
"message": "only embedded",
|
"message": "chỉ các mã nhúng",
|
||||||
"description": "used in the settings page"
|
"description": "used in the settings page"
|
||||||
},
|
},
|
||||||
"onlyNotEmbedded": {
|
"onlyNotEmbedded": {
|
||||||
"message": "only not embedded",
|
"message": "chỉ những cái không phải là mã nhúng",
|
||||||
"description": "used in the settings page"
|
"description": "used in the settings page"
|
||||||
},
|
},
|
||||||
"addYourFavoriteInstances": {
|
"addYourFavoriteInstances": {
|
||||||
"message": "Add your favorite instances",
|
"message": "Thêm những instance bạn yêu thích",
|
||||||
"description": "used in the settings page"
|
"description": "used in the settings page"
|
||||||
},
|
},
|
||||||
"copyRaw": {
|
"copyRaw": {
|
||||||
"message": "Copy Raw"
|
"message": "Sao chép liên kết gốc"
|
||||||
},
|
},
|
||||||
"copied": {
|
"copied": {
|
||||||
"message": "Đã Sao Chép"
|
"message": "Đã Sao Chép"
|
||||||
},
|
},
|
||||||
"redirectToOriginal": {
|
"redirectToOriginal": {
|
||||||
"message": "Redirect to original",
|
"message": "Chuyển hướng tới trang web gốc",
|
||||||
"description": "Used in context menus when right clicking on a page/tab"
|
"description": "Used in context menus when right clicking on a page/tab"
|
||||||
},
|
},
|
||||||
"redirectLink": {
|
"redirectLink": {
|
||||||
|
@ -99,5 +99,14 @@
|
||||||
},
|
},
|
||||||
"about": {
|
"about": {
|
||||||
"message": "Về tiện ích"
|
"message": "Về tiện ích"
|
||||||
|
},
|
||||||
|
"unsupportedIframesHandling": {
|
||||||
|
"message": "Cách xử lý các iframe không được hỗ trợ"
|
||||||
|
},
|
||||||
|
"fetchPublicInstances": {
|
||||||
|
"message": "Tìm các instance công cộng"
|
||||||
|
},
|
||||||
|
"disable": {
|
||||||
|
"message": "Tắt"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,63 +1,4 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<svg width="36" height="32" viewBox="0 0 360 320" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
<path d="M254.896 184.158C252.81 183.926 250.733 183.645 248.671 183.315C250.773 183.574 252.849 183.855 254.896 184.158Z" fill="white"/>
|
||||||
|
<path d="M180 141.964C163.699 110.262 119.308 51.1817 78.0347 22.044C38.4971 -5.86834 23.414 -1.03207 13.526 3.43594C2.08093 8.60755 0 26.1785 0 36.5164C0 46.8542 5.66748 121.272 9.36416 133.694C21.5786 174.738 65.0603 188.607 105.104 184.156C107.151 183.852 109.227 183.572 111.329 183.312C109.267 183.642 107.19 183.924 105.104 184.156C46.4204 192.847 -5.69621 214.233 62.6582 290.33C137.848 368.18 165.705 273.637 180 225.702C194.295 273.637 210.76 364.771 295.995 290.33C360 225.702 313.58 192.85 254.896 184.158C252.81 183.926 250.733 183.645 248.671 183.315C250.773 183.574 252.849 183.855 254.896 184.158C294.94 188.61 338.421 174.74 350.636 133.697C354.333 121.275 360 46.8568 360 36.519C360 26.1811 357.919 8.61012 346.474 3.43851C336.586 -1.02949 321.503 -5.86576 281.965 22.0466C240.692 51.1843 196.301 110.262 180 141.964Z" fill="#295ef6"/>
|
||||||
<svg
|
</svg>
|
||||||
width="512"
|
|
||||||
height="512"
|
|
||||||
viewBox="0 0 135.46666 135.46667"
|
|
||||||
version="1.1"
|
|
||||||
id="svg1"
|
|
||||||
xml:space="preserve"
|
|
||||||
inkscape:version="1.3.1 (91b66b0783, 2023-11-16)"
|
|
||||||
sodipodi:docname="bluesky-icon.svg"
|
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
|
|
||||||
id="namedview1"
|
|
||||||
pagecolor="#ffffff"
|
|
||||||
bordercolor="#666666"
|
|
||||||
borderopacity="1.0"
|
|
||||||
inkscape:showpageshadow="2"
|
|
||||||
inkscape:pageopacity="0.0"
|
|
||||||
inkscape:pagecheckerboard="0"
|
|
||||||
inkscape:deskcolor="#d1d1d1"
|
|
||||||
inkscape:document-units="px"
|
|
||||||
inkscape:zoom="1.1452094"
|
|
||||||
inkscape:cx="358.01312"
|
|
||||||
inkscape:cy="227.46931"
|
|
||||||
inkscape:window-width="1888"
|
|
||||||
inkscape:window-height="1060"
|
|
||||||
inkscape:window-x="32"
|
|
||||||
inkscape:window-y="0"
|
|
||||||
inkscape:window-maximized="1"
|
|
||||||
inkscape:current-layer="layer1" /><defs
|
|
||||||
id="defs1"><linearGradient
|
|
||||||
id="linearGradient1"
|
|
||||||
inkscape:collect="always"><stop
|
|
||||||
style="stop-color:#0062ff;stop-opacity:1;"
|
|
||||||
offset="0"
|
|
||||||
id="stop1" /><stop
|
|
||||||
style="stop-color:#0090fe;stop-opacity:1;"
|
|
||||||
offset="1"
|
|
||||||
id="stop2" /></linearGradient><linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient1"
|
|
||||||
id="linearGradient2"
|
|
||||||
x1="-16.737301"
|
|
||||||
y1="0.19602649"
|
|
||||||
x2="-16.737301"
|
|
||||||
y2="136.34718"
|
|
||||||
gradientUnits="userSpaceOnUse" /></defs><g
|
|
||||||
inkscape:label="Layer 1"
|
|
||||||
inkscape:groupmode="layer"
|
|
||||||
id="layer1"><rect
|
|
||||||
style="fill:url(#linearGradient2);stroke-width:1.165;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.53144"
|
|
||||||
id="rect1"
|
|
||||||
width="135.46667"
|
|
||||||
height="136.65152"
|
|
||||||
x="-4.9023438e-06"
|
|
||||||
y="-0.59242737"
|
|
||||||
ry="24.716606"
|
|
||||||
rx="24.716606" /></g></svg>
|
|
||||||
|
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
@ -0,0 +1,52 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
version="1.1"
|
||||||
|
id="Calque_1"
|
||||||
|
x="0px"
|
||||||
|
y="0px"
|
||||||
|
width="256px"
|
||||||
|
height="256px"
|
||||||
|
viewBox="0 0 256 256"
|
||||||
|
enable-background="new 0 0 256 256"
|
||||||
|
xml:space="preserve"
|
||||||
|
sodipodi:docname="Tumblr.svg"
|
||||||
|
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"><defs
|
||||||
|
id="defs4" /><sodipodi:namedview
|
||||||
|
id="namedview4"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
inkscape:zoom="2.622483"
|
||||||
|
inkscape:cx="108.10366"
|
||||||
|
inkscape:cy="127.93219"
|
||||||
|
inkscape:window-width="1888"
|
||||||
|
inkscape:window-height="1056"
|
||||||
|
inkscape:window-x="32"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="g4" />
|
||||||
|
<g
|
||||||
|
id="g4">
|
||||||
|
|
||||||
|
<g
|
||||||
|
id="g3"
|
||||||
|
style="fill:#314358;fill-opacity:1"
|
||||||
|
transform="matrix(1.2688081,0,0,1.2688081,-34.911581,-33.121241)">
|
||||||
|
<path
|
||||||
|
fill="#FFFFFF"
|
||||||
|
d="m 168.08,170.918 c -2.969,1.416 -8.647,2.648 -12.881,2.754 -12.783,0.342 -15.264,-8.979 -15.367,-15.736 v -49.705 h 32.065 V 84.055 H 139.943 V 43.382 c 0,0 -23.008,0 -23.383,0 -0.385,0 -1.057,0.337 -1.152,1.192 -1.368,12.448 -7.192,34.296 -31.416,43.032 v 20.624 h 16.16 v 52.167 c 0,17.863 13.176,43.24 47.959,42.641 11.736,-0.201 24.77,-5.113 27.648,-9.354 l -7.679,-22.766"
|
||||||
|
id="path2"
|
||||||
|
style="fill:#314358;fill-opacity:1" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.7 KiB |
|
@ -104,7 +104,10 @@ function redirect(url, type, initiator, forceRedirection, incognito) {
|
||||||
initiator
|
initiator
|
||||||
&&
|
&&
|
||||||
instanceList.includes(initiator.origin)
|
instanceList.includes(initiator.origin)
|
||||||
) return "BYPASSTAB"
|
) {
|
||||||
|
if (type != "main_frame") return null
|
||||||
|
else return "BYPASSTAB"
|
||||||
|
}
|
||||||
|
|
||||||
randomInstance = utils.getRandomInstance(instanceList)
|
randomInstance = utils.getRandomInstance(instanceList)
|
||||||
if (config.services[service].frontends[frontend].localhost && options[service].instance == "localhost") {
|
if (config.services[service].frontends[frontend].localhost && options[service].instance == "localhost") {
|
||||||
|
@ -131,36 +134,12 @@ function redirect(url, type, initiator, forceRedirection, incognito) {
|
||||||
}
|
}
|
||||||
return randomInstance
|
return randomInstance
|
||||||
}
|
}
|
||||||
case "librex": {
|
case "librey": {
|
||||||
return `${randomInstance}/search.php${url.search}`
|
return `${randomInstance}/search.php${url.search}`
|
||||||
}
|
}
|
||||||
case "send": {
|
case "send": {
|
||||||
return randomInstance
|
return randomInstance
|
||||||
}
|
}
|
||||||
case "nitter": {
|
|
||||||
let search = new URLSearchParams(url.search)
|
|
||||||
|
|
||||||
search.delete("ref_src")
|
|
||||||
search.delete("ref_url")
|
|
||||||
search.delete("s") // type of device that shared the link
|
|
||||||
search.delete("t") // some sort of tracking ID
|
|
||||||
|
|
||||||
search = search.toString()
|
|
||||||
if (search !== "") search = `?${search}`
|
|
||||||
|
|
||||||
if (url.host.split(".")[0] === "pbs" || url.host.split(".")[0] === "video") {
|
|
||||||
try {
|
|
||||||
const [, id, format, extra] = search.match(/(.*)\?format=(.*)&(.*)/)
|
|
||||||
const query = encodeURIComponent(`${id}.${format}?${extra}`)
|
|
||||||
return `${randomInstance}/pic${url.pathname}${query}`
|
|
||||||
} catch {
|
|
||||||
return `${randomInstance}/pic${url.pathname}${search}`
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (url.pathname.split("/").includes("tweets")) return `${randomInstance}${url.pathname.replace("/tweets", "")}${search}`
|
|
||||||
if (url.host == "t.co") return `${randomInstance}/t.co${url.pathname}`
|
|
||||||
return `${randomInstance}${url.pathname}${search}#m`
|
|
||||||
}
|
|
||||||
case "yattee": {
|
case "yattee": {
|
||||||
return url.href.replace(/^https?:\/{2}/, "yattee://")
|
return url.href.replace(/^https?:\/{2}/, "yattee://")
|
||||||
}
|
}
|
||||||
|
@ -207,9 +186,8 @@ function redirect(url, type, initiator, forceRedirection, incognito) {
|
||||||
return `${randomInstance}/${search}`
|
return `${randomInstance}/${search}`
|
||||||
}
|
}
|
||||||
case "osm": {
|
case "osm": {
|
||||||
const dataLatLngRegex = /!3d(-?[0-9]{1,}.[0-9]{1,})!4d(-?[0-9]{1,}.[0-9]{1,})/
|
const placeRegex = /\/place\/(.*?)\//
|
||||||
const placeRegex = /\/place\/(.*)\//
|
function convertMapCentre(url) {
|
||||||
function convertMapCentre() {
|
|
||||||
let [lat, lon, zoom] = [null, null, null]
|
let [lat, lon, zoom] = [null, null, null]
|
||||||
const reg = url.pathname.match(/@(-?\d[0-9.]*),(-?\d[0-9.]*),(\d{1,2})[.z]/)
|
const reg = url.pathname.match(/@(-?\d[0-9.]*),(-?\d[0-9.]*),(\d{1,2})[.z]/)
|
||||||
if (reg) {
|
if (reg) {
|
||||||
|
@ -221,14 +199,6 @@ function redirect(url, type, initiator, forceRedirection, incognito) {
|
||||||
}
|
}
|
||||||
return { zoom, lon, lat }
|
return { zoom, lon, lat }
|
||||||
}
|
}
|
||||||
if (initiator && initiator.host === "earth.google.com") return randomInstance
|
|
||||||
const travelModes = {
|
|
||||||
driving: "fossgis_osrm_car",
|
|
||||||
walking: "fossgis_osrm_foot",
|
|
||||||
bicycling: "fossgis_osrm_bike",
|
|
||||||
transit: "fossgis_osrm_car", // not implemented on OSM, default to car.
|
|
||||||
}
|
|
||||||
|
|
||||||
function addressToLatLng(address) {
|
function addressToLatLng(address) {
|
||||||
const http = new XMLHttpRequest()
|
const http = new XMLHttpRequest()
|
||||||
http.open("GET", `https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(address)}&format=json&limit=1`, false)
|
http.open("GET", `https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(address)}&format=json&limit=1`, false)
|
||||||
|
@ -244,86 +214,69 @@ function redirect(url, type, initiator, forceRedirection, incognito) {
|
||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function getQuery(url) {
|
||||||
let mapCentre = "#"
|
|
||||||
let prefs = {}
|
|
||||||
|
|
||||||
const mapCentreData = convertMapCentre()
|
|
||||||
if (mapCentreData.zoom && mapCentreData.lon && mapCentreData.lat) mapCentre = `#map=${mapCentreData.zoom}/${mapCentreData.lon}/${mapCentreData.lat}`
|
|
||||||
if (url.searchParams.get("layer")) prefs.layers = osmLayers[url.searchParams.get("layer")]
|
|
||||||
|
|
||||||
if (url.pathname.includes("/embed")) {
|
|
||||||
// Handle Google Maps Embed API
|
|
||||||
// https://www.google.com/maps/embed/v1/place?key=AIzaSyD4iE2xVSpkLLOXoyqT-RuPwURN3ddScAI&q=Eiffel+Tower,Paris+France
|
|
||||||
let query = ""
|
let query = ""
|
||||||
if (url.searchParams.has("q")) query = url.searchParams.get("q")
|
if (url.searchParams.has("q")) query = url.searchParams.get("q")
|
||||||
else if (url.searchParams.has("query")) query = url.searchParams.has("query")
|
else if (url.searchParams.has("query")) query = url.searchParams.has("query")
|
||||||
else if (url.searchParams.has("pb"))
|
return query
|
||||||
try {
|
}
|
||||||
query = url.searchParams.get("pb").split(/!2s(.*?)!/)[1]
|
function prefsEncoded(prefs) {
|
||||||
} catch (error) {
|
return new URLSearchParams(prefs).toString()
|
||||||
// Unable to find map marker in URL.
|
}
|
||||||
console.error(error)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (initiator && initiator.host === "earth.google.com") return randomInstance
|
||||||
|
|
||||||
|
let mapCentre = "#"
|
||||||
|
let prefs = { layers: "mapnik" }
|
||||||
|
|
||||||
|
const mapCentreData = convertMapCentre(url)
|
||||||
|
if (mapCentreData.zoom && mapCentreData.lon && mapCentreData.lat) mapCentre = `#map=${mapCentreData.zoom}/${mapCentreData.lon}/${mapCentreData.lat}`
|
||||||
|
|
||||||
|
if (url.pathname.includes("/embed")) { // https://www.google.com/maps/embed/v1/place?key=AIzaSyD4iE2xVSpkLLOXoyqT-RuPwURN3ddScAI&q=Eiffel+Tower,Paris+France
|
||||||
|
const query = getQuery(url)
|
||||||
let { coordinate, boundingbox } = addressToLatLng(query)
|
let { coordinate, boundingbox } = addressToLatLng(query)
|
||||||
prefs.bbox = boundingbox
|
prefs.bbox = boundingbox
|
||||||
prefs.marker = coordinate
|
prefs.marker = coordinate
|
||||||
prefs.layers = "mapnik"
|
return `${randomInstance}/export/embed.html?${prefsEncoded(prefs)}`
|
||||||
let prefsEncoded = new URLSearchParams(prefs).toString()
|
|
||||||
return `${randomInstance}/export/embed.html?${prefsEncoded}`
|
|
||||||
} else if (url.pathname.includes("/dir")) {
|
} else if (url.pathname.includes("/dir")) {
|
||||||
// Handle Google Maps Directions
|
|
||||||
if (url.searchParams.has("travelmode")) {
|
if (url.searchParams.has("travelmode")) {
|
||||||
|
const travelModes = {
|
||||||
|
driving: "fossgis_osrm_car",
|
||||||
|
walking: "fossgis_osrm_foot",
|
||||||
|
bicycling: "fossgis_osrm_bike",
|
||||||
|
transit: "fossgis_osrm_car", // not implemented on OSM, default to car.
|
||||||
|
}
|
||||||
prefs.engine = travelModes[url.searchParams.get("travelmode")]
|
prefs.engine = travelModes[url.searchParams.get("travelmode")]
|
||||||
}
|
}
|
||||||
const regex1 = /\/dir\/([^@/]+)\/([^@/]+)\/@-?\d[0-9.]*,-?\d[0-9.]*,\d{1,2}[.z]/.exec(url.pathname)
|
const regex1 = /\/dir\/([^@/]+)\/([^@/]+)\/@-?\d[0-9.]*,-?\d[0-9.]*,\d{1,2}[.z]/.exec(url.pathname)
|
||||||
const regex2 = /\/dir\/([^@/]+)\//.exec(url.pathname)
|
const regex2 = /\/dir\/([^@/]+)\//.exec(url.pathname)
|
||||||
if (regex1) {
|
if (regex1) { // https://www.google.com/maps/dir/92+Rue+Moncey,+69003+Lyon,+France/M%C3%A9dip%C3%B4le+Lyon-Villeurbanne/@45.760254,4.8486298,13z?travelmode=bicycling
|
||||||
// https://www.google.com/maps/dir/92+Rue+Moncey,+69003+Lyon,+France/M%C3%A9dip%C3%B4le+Lyon-Villeurbanne/@45.760254,4.8486298,13z?travelmode=bicycling
|
|
||||||
const origin = addressToLatLng(decodeURIComponent(regex1[1])).coordinate ?? ''
|
const origin = addressToLatLng(decodeURIComponent(regex1[1])).coordinate ?? ''
|
||||||
const destination = addressToLatLng(decodeURIComponent(regex1[2])).coordinate ?? ''
|
const destination = addressToLatLng(decodeURIComponent(regex1[2])).coordinate ?? ''
|
||||||
prefs.route = `${origin};${destination}`
|
prefs.route = `${origin};${destination}`
|
||||||
} else if (regex2) {
|
} else if (regex2) { // https://www.google.com/maps/dir/92+Rue+Moncey,+69003+Lyon,+France/@45.760254,4.8486298,13z?travelmode=bicycling
|
||||||
// https://www.google.com/maps/dir/92+Rue+Moncey,+69003+Lyon,+France/@45.760254,4.8486298,13z?travelmode=bicycling
|
|
||||||
const origin = addressToLatLng(decodeURIComponent(regex2[1])).coordinate ?? ''
|
const origin = addressToLatLng(decodeURIComponent(regex2[1])).coordinate ?? ''
|
||||||
prefs.route = `${origin};`
|
prefs.route = `${origin};`
|
||||||
} else {
|
} else { // https://www.google.com/maps/dir/?api=1&origin=Space+Needle+Seattle+WA&destination=Pike+Place+Market+Seattle+WA&travelmode=bicycling
|
||||||
// https://www.google.com/maps/dir/?api=1&origin=Space+Needle+Seattle+WA&destination=Pike+Place+Market+Seattle+WA&travelmode=bicycling
|
|
||||||
const origin = addressToLatLng(url.searchParams.get("origin")).coordinate ?? ''
|
const origin = addressToLatLng(url.searchParams.get("origin")).coordinate ?? ''
|
||||||
const destination = addressToLatLng(url.searchParams.get("destination")).coordinate ?? ''
|
const destination = addressToLatLng(url.searchParams.get("destination")).coordinate ?? ''
|
||||||
prefs.route = `${origin};${destination}`
|
prefs.route = `${origin};${destination}`
|
||||||
}
|
}
|
||||||
const prefsEncoded = new URLSearchParams(prefs).toString()
|
return `${randomInstance}/directions?${prefsEncoded(prefs)}${mapCentre}`
|
||||||
return `${randomInstance}/directions?${prefsEncoded}${mapCentre}`
|
} else if (url.pathname.match(placeRegex)) { // https://www.google.com/maps/place/H%C3%B4tel+de+Londres+Eiffel/@40.9845265,28.7081268,14z
|
||||||
} else if (url.pathname.includes("data=") && url.pathname.match(dataLatLngRegex)) {
|
const query = url.pathname.match(placeRegex)[1]
|
||||||
// Get marker from data attribute
|
return `${randomInstance}/search?query=${query}${mapCentre}`
|
||||||
// https://www.google.com/maps/place/41%C2%B001'58.2%22N+40%C2%B029'18.2%22E/@41.032833,40.4862063,17z/data=!3m1!4b1!4m6!3m5!1s0x0:0xf64286eaf72fc49d!7e2!8m2!3d41.0328329!4d40.4883948
|
} else if (url.searchParams.has("ll")) { // https://maps.google.com/?ll=38.882147,-76.99017
|
||||||
let [, mlat, mlon] = url.pathname.match(dataLatLngRegex)
|
|
||||||
return `${randomInstance}/search?query=${mlat}%2C${mlon}`
|
|
||||||
} else if (url.searchParams.has("ll")) {
|
|
||||||
// Get marker from ll param
|
|
||||||
// https://maps.google.com/?ll=38.882147,-76.99017
|
|
||||||
const [mlat, mlon] = url.searchParams.get("ll").split(",")
|
const [mlat, mlon] = url.searchParams.get("ll").split(",")
|
||||||
return `${randomInstance}/search?query=${mlat}%2C${mlon}`
|
return `${randomInstance}/search?query=${mlat}%2C${mlon}`
|
||||||
} else if (url.searchParams.has("viewpoint")) {
|
} else if (url.searchParams.has("viewpoint")) { // https://www.google.com/maps/@?api=1&map_action=pano&viewpoint=48.857832,2.295226&heading=-45&pitch=38&fov=80
|
||||||
// Get marker from viewpoint param.
|
|
||||||
// https://www.google.com/maps/@?api=1&map_action=pano&viewpoint=48.857832,2.295226&heading=-45&pitch=38&fov=80
|
|
||||||
const [mlat, mlon] = url.searchParams.get("viewpoint").split(",")
|
const [mlat, mlon] = url.searchParams.get("viewpoint").split(",")
|
||||||
return `${randomInstance}/search?query=${mlat}%2C${mlon}`
|
return `${randomInstance}/search?query=${mlat}%2C${mlon}`
|
||||||
} else {
|
} else {
|
||||||
// Use query as search if present.
|
const query = getQuery(url)
|
||||||
let query
|
if (query) return `${randomInstance}/search?query="${query}${mapCentre}&${prefsEncoded(prefs)}`
|
||||||
if (url.searchParams.has("q")) query = url.searchParams.get("q")
|
|
||||||
else if (url.searchParams.has("query")) query = url.searchParams.get("query")
|
|
||||||
else if (url.pathname.match(placeRegex)) query = url.pathname.match(placeRegex)[1]
|
|
||||||
|
|
||||||
let prefsEncoded = new URLSearchParams(prefs).toString()
|
|
||||||
if (query) return `${randomInstance}/search?query="${query}${mapCentre}&${prefsEncoded}`
|
|
||||||
}
|
}
|
||||||
|
return `${randomInstance}/${mapCentre}&${prefsEncoded(prefs)}`
|
||||||
let prefsEncoded = new URLSearchParams(prefs).toString()
|
|
||||||
return `${randomInstance}/${mapCentre}&${prefsEncoded}`
|
|
||||||
}
|
}
|
||||||
case "breezeWiki": {
|
case "breezeWiki": {
|
||||||
let wiki, urlpath = ""
|
let wiki, urlpath = ""
|
||||||
|
@ -351,6 +304,7 @@ function redirect(url, type, initiator, forceRedirection, incognito) {
|
||||||
}
|
}
|
||||||
return `${randomInstance}${url.pathname}${url.search}`
|
return `${randomInstance}${url.pathname}${url.search}`
|
||||||
}
|
}
|
||||||
|
case "redlib":
|
||||||
case "libreddit": {
|
case "libreddit": {
|
||||||
const subdomain = url.hostname.match(/^(?:(?:external-)?preview|i)(?=\.redd\.it)/)
|
const subdomain = url.hostname.match(/^(?:(?:external-)?preview|i)(?=\.redd\.it)/)
|
||||||
if (!subdomain) return `${randomInstance}${url.pathname}${url.search}`
|
if (!subdomain) return `${randomInstance}${url.pathname}${url.search}`
|
||||||
|
@ -442,12 +396,11 @@ function redirect(url, type, initiator, forceRedirection, incognito) {
|
||||||
}
|
}
|
||||||
case "gothub": {
|
case "gothub": {
|
||||||
if (url.hostname == "gist.github.com") return `${randomInstance}/gist${url.pathname}${url.search}`
|
if (url.hostname == "gist.github.com") return `${randomInstance}/gist${url.pathname}${url.search}`
|
||||||
|
if (url.hostname == "raw.githubusercontent.com") return `${randomInstance}/raw${url.pathname}${url.search}`
|
||||||
return `${randomInstance}${url.pathname}${url.search}`
|
return `${randomInstance}${url.pathname}${url.search}`
|
||||||
}
|
}
|
||||||
case "mikuInvidious": {
|
case "mikuInvidious": {
|
||||||
console.log("Hello?")
|
|
||||||
if (url.hostname == "bilibili.com" || url.hostname == "www.bilibili.com" || url.hostname == 'b23.tv') {
|
if (url.hostname == "bilibili.com" || url.hostname == "www.bilibili.com" || url.hostname == 'b23.tv') {
|
||||||
console.log('wewe')
|
|
||||||
return `${randomInstance}${url.pathname}${url.search}`
|
return `${randomInstance}${url.pathname}${url.search}`
|
||||||
}
|
}
|
||||||
if (url.hostname == "space.bilibili.com") {
|
if (url.hostname == "space.bilibili.com") {
|
||||||
|
@ -491,7 +444,6 @@ function redirect(url, type, initiator, forceRedirection, incognito) {
|
||||||
}
|
}
|
||||||
case "binternet": {
|
case "binternet": {
|
||||||
if (url.hostname == "i.pinimg.com") return `${randomInstance}/image_proxy.php?url=${url.href}`
|
if (url.hostname == "i.pinimg.com") return `${randomInstance}/image_proxy.php?url=${url.href}`
|
||||||
return randomInstance
|
|
||||||
}
|
}
|
||||||
case "laboratory": {
|
case "laboratory": {
|
||||||
let path = url.pathname
|
let path = url.pathname
|
||||||
|
@ -500,7 +452,6 @@ function redirect(url, type, initiator, forceRedirection, incognito) {
|
||||||
}
|
}
|
||||||
case "quetre": {
|
case "quetre": {
|
||||||
const regex = /([a-z]+)\.quora\.com/.exec(url.hostname)
|
const regex = /([a-z]+)\.quora\.com/.exec(url.hostname)
|
||||||
console.log(regex)
|
|
||||||
if (regex) {
|
if (regex) {
|
||||||
const lang = regex[1]
|
const lang = regex[1]
|
||||||
url.searchParams.append("lang", lang)
|
url.searchParams.append("lang", lang)
|
||||||
|
@ -521,6 +472,9 @@ function redirect(url, type, initiator, forceRedirection, incognito) {
|
||||||
const watch = url.pathname.substring(url.pathname.lastIndexOf('/') + 1)
|
const watch = url.pathname.substring(url.pathname.lastIndexOf('/') + 1)
|
||||||
return `${randomInstance}/watch?v=${watch}`
|
return `${randomInstance}/watch?v=${watch}`
|
||||||
}
|
}
|
||||||
|
if (url.hostname.endsWith("youtube.com") && url.pathname.startsWith("/redirect?")) {
|
||||||
|
return url.href
|
||||||
|
}
|
||||||
return `${randomInstance}${url.pathname}${url.search}`
|
return `${randomInstance}${url.pathname}${url.search}`
|
||||||
}
|
}
|
||||||
case "invidiousMusic": {
|
case "invidiousMusic": {
|
||||||
|
@ -571,6 +525,32 @@ function redirect(url, type, initiator, forceRedirection, incognito) {
|
||||||
if (url.pathname == '/') return randomInstance
|
if (url.pathname == '/') return randomInstance
|
||||||
return `${randomInstance}?url=${encodeURIComponent(url.href)}`
|
return `${randomInstance}?url=${encodeURIComponent(url.href)}`
|
||||||
}
|
}
|
||||||
|
case "priviblur": {
|
||||||
|
if (url.hostname == "www.tumblr.com")
|
||||||
|
return `${randomInstance}${url.pathname}${url.search}`
|
||||||
|
|
||||||
|
if (url.hostname.startsWith("assets"))
|
||||||
|
return `${randomInstance}/tblr/assets${url.pathname}${url.search}`
|
||||||
|
|
||||||
|
if (url.hostname.startsWith("static"))
|
||||||
|
return `${randomInstance}/tblr/static${url.pathname}${url.search}`
|
||||||
|
|
||||||
|
const reg = /^([0-9]+)\.media\.tumblr\.com/.exec(url.hostname) // *.media.tumblr.com
|
||||||
|
if (reg)
|
||||||
|
return `${randomInstance}/tblr/media/${reg[1]}${url.pathname}${url.search}`
|
||||||
|
|
||||||
|
const blogregex = /^(?:www\.)?([a-z\d-]+)\.tumblr\.com/.exec(url.hostname) // <blog>.tumblr.com
|
||||||
|
if (blogregex) {
|
||||||
|
const blog_name = blogregex[1];
|
||||||
|
// Under the <blog>.tumblr.com domain posts are under a /post path
|
||||||
|
if (url.pathname.startsWith("/post")) {
|
||||||
|
return `${randomInstance}/${blog_name}${url.pathname.slice(5)}${url.search}`
|
||||||
|
} else {
|
||||||
|
return `${randomInstance}/${blog_name}${url.pathname}${url.search}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return `${randomInstance}${url.pathname}${url.search}`;
|
||||||
|
}
|
||||||
default: {
|
default: {
|
||||||
return `${randomInstance}${url.pathname}${url.search}`
|
return `${randomInstance}${url.pathname}${url.search}`
|
||||||
}
|
}
|
||||||
|
@ -618,7 +598,11 @@ function switchInstance(url, customService) {
|
||||||
if (customService) {
|
if (customService) {
|
||||||
const instancesList = options[options[customService].frontend]
|
const instancesList = options[options[customService].frontend]
|
||||||
if (instancesList !== undefined) {
|
if (instancesList !== undefined) {
|
||||||
resolve(`${utils.getRandomInstance(instancesList)}${url.pathname}${url.search}`)
|
const newInstance = utils.getNextInstance(url.origin, instancesList)
|
||||||
|
if (newInstance) {
|
||||||
|
resolve(`${newInstance}${url.pathname}${url.search}`)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (const service in config.services) {
|
for (const service in config.services) {
|
||||||
|
@ -631,8 +615,11 @@ function switchInstance(url, customService) {
|
||||||
resolve()
|
resolve()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
resolve(`${utils.getRandomInstance(instancesList)}${url.pathname}${url.search}`)
|
const newInstance = utils.getNextInstance(url.origin, instancesList)
|
||||||
return
|
if (newInstance) {
|
||||||
|
resolve(`${newInstance}${url.pathname}${url.search}`)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
resolve()
|
resolve()
|
||||||
|
@ -655,7 +642,6 @@ async function reverse(url) {
|
||||||
case "imdb":
|
case "imdb":
|
||||||
case "imgur":
|
case "imgur":
|
||||||
case "tiktok":
|
case "tiktok":
|
||||||
case "twitter":
|
|
||||||
case "reddit":
|
case "reddit":
|
||||||
case "imdb":
|
case "imdb":
|
||||||
case "snopes":
|
case "snopes":
|
||||||
|
@ -696,12 +682,13 @@ async function reverse(url) {
|
||||||
|
|
||||||
const defaultInstances = {
|
const defaultInstances = {
|
||||||
'invidious': ['https://inv.vern.cc'],
|
'invidious': ['https://inv.vern.cc'],
|
||||||
|
'viewtube': ['https://viewtube.io'],
|
||||||
'piped': ['https://pipedapi-libre.kavin.rocks'],
|
'piped': ['https://pipedapi-libre.kavin.rocks'],
|
||||||
'pipedMaterial': ['https://piped-material.xn--17b.net'],
|
'pipedMaterial': ['https://piped-material.xn--17b.net'],
|
||||||
'cloudtube': ['https://tube.cadence.moe'],
|
'cloudtube': ['https://tube.cadence.moe'],
|
||||||
'poketube': ['https://poketube.fun'],
|
'poketube': ['https://poketube.fun'],
|
||||||
'proxiTok': ['https://proxitok.pabloferreiro.es'],
|
'proxiTok': ['https://proxitok.pabloferreiro.es'],
|
||||||
'nitter': ['https://nitter.net'],
|
'redlib': ['https://safereddit.com'],
|
||||||
'libreddit': ['https://libreddit.spike.codes'],
|
'libreddit': ['https://libreddit.spike.codes'],
|
||||||
'teddit': ['https://teddit.net'],
|
'teddit': ['https://teddit.net'],
|
||||||
'scribe': ['https://scribe.rip'],
|
'scribe': ['https://scribe.rip'],
|
||||||
|
@ -714,7 +701,6 @@ const defaultInstances = {
|
||||||
'4get': ['https://4get.ca'],
|
'4get': ['https://4get.ca'],
|
||||||
'rimgo': ['https://rimgo.vern.cc'],
|
'rimgo': ['https://rimgo.vern.cc'],
|
||||||
'hyperpipe': ['https://hyperpipe.surge.sh'],
|
'hyperpipe': ['https://hyperpipe.surge.sh'],
|
||||||
'facil': [' https://facilmap.org '],
|
|
||||||
'osm': ['https://www.openstreetmap.org'],
|
'osm': ['https://www.openstreetmap.org'],
|
||||||
'breezeWiki': ['https://breezewiki.com'],
|
'breezeWiki': ['https://breezewiki.com'],
|
||||||
'neuters': ['https://neuters.de'],
|
'neuters': ['https://neuters.de'],
|
||||||
|
@ -742,6 +728,7 @@ const defaultInstances = {
|
||||||
'tuboSoundcloud': ['https://tubo.migalmoreno.com'],
|
'tuboSoundcloud': ['https://tubo.migalmoreno.com'],
|
||||||
'tekstoLibre': ['https://davilarek.github.io/TekstoLibre'],
|
'tekstoLibre': ['https://davilarek.github.io/TekstoLibre'],
|
||||||
'skyview': ['https://skyview.social'],
|
'skyview': ['https://skyview.social'],
|
||||||
|
'priviblur': ['https://pb.bloat.cat'],
|
||||||
}
|
}
|
||||||
|
|
||||||
function initDefaults() {
|
function initDefaults() {
|
||||||
|
@ -760,12 +747,12 @@ function initDefaults() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
options['exceptions'] = {
|
options.exceptions = {
|
||||||
url: [],
|
url: [],
|
||||||
regex: [],
|
regex: [],
|
||||||
}
|
}
|
||||||
options.theme = "detect"
|
options.theme = "detect"
|
||||||
options.popupServices = ["youtube", "twitter", "tiktok", "imgur", "reddit", "quora", "translate", "maps"]
|
options.popupServices = ["youtube", "tiktok", "imgur", "reddit", "quora", "translate", "maps"]
|
||||||
options.fetchInstances = 'github'
|
options.fetchInstances = 'github'
|
||||||
options.redirectOnlyInIncognito = false
|
options.redirectOnlyInIncognito = false
|
||||||
|
|
||||||
|
@ -792,28 +779,27 @@ function upgradeOptions() {
|
||||||
|
|
||||||
function processUpdate() {
|
function processUpdate() {
|
||||||
return new Promise(async resolve => {
|
return new Promise(async resolve => {
|
||||||
let config = await utils.getConfig()
|
let frontends = []
|
||||||
|
const config = await utils.getConfig()
|
||||||
let options = await utils.getOptions()
|
let options = await utils.getOptions()
|
||||||
for (const service in config.services) {
|
for (const service in config.services) {
|
||||||
if (!options[service]) options[service] = {}
|
if (!options[service]) options[service] = {}
|
||||||
|
|
||||||
if (!(options[service].frontend in config.services[service].frontends)) {
|
if (!(options[service].frontend in config.services[service].frontends)) {
|
||||||
options[service] = config.services[service].options
|
options[service] = config.services[service].options // Reset settings for service
|
||||||
delete options[options[service].frontend]
|
delete options[options[service].frontend] // Remove deprecated frontend
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const defaultOption in config.services[service].options) {
|
for (const defaultOption in config.services[service].options) {
|
||||||
if (options[service][defaultOption] === undefined) {
|
if (!(defaultOption in options[service])) {
|
||||||
options[service][defaultOption] = config.services[service].options[defaultOption]
|
options[service][defaultOption] = config.services[service].options[defaultOption]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const frontend in config.services[service].frontends) {
|
for (const frontend in config.services[service].frontends) {
|
||||||
if (options[frontend] === undefined && config.services[service].frontends[frontend].instanceList) {
|
frontends.push(frontend)
|
||||||
options[frontend] = defaultInstances[frontend]
|
if (!(frontend in options) && config.services[service].frontends[frontend].instanceList) {
|
||||||
}
|
options[frontend] = defaultInstances[frontend] || []
|
||||||
else if (frontend in options && !(frontend in config.services[service].frontends)) {
|
|
||||||
delete options[frontend]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -824,6 +810,20 @@ function processUpdate() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const general = ['theme', 'popupServices', 'fetchInstances', 'redirectOnlyInIncognito']
|
||||||
|
const combined = [
|
||||||
|
...Object.keys(config.services),
|
||||||
|
...frontends,
|
||||||
|
...general,
|
||||||
|
'exceptions',
|
||||||
|
'popupServices',
|
||||||
|
'version',
|
||||||
|
]
|
||||||
|
for (const key in options) {
|
||||||
|
if (combined.indexOf(key) < 0) {
|
||||||
|
delete options[key] // Remove any unknown settings in options
|
||||||
|
}
|
||||||
|
}
|
||||||
browser.storage.local.set({ options }, () => {
|
browser.storage.local.set({ options }, () => {
|
||||||
resolve()
|
resolve()
|
||||||
})
|
})
|
||||||
|
|
|
@ -8,6 +8,23 @@ function getRandomInstance(instances) {
|
||||||
return instances[~~(instances.length * Math.random())]
|
return instances[~~(instances.length * Math.random())]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} currentInstanceUrl
|
||||||
|
* @param {Array.<T>} instances
|
||||||
|
* @returns {T}
|
||||||
|
*/
|
||||||
|
function getNextInstance(currentInstanceUrl, instances) {
|
||||||
|
const currentInstanceIndex = instances.indexOf(currentInstanceUrl);
|
||||||
|
|
||||||
|
if (currentInstanceIndex === -1){
|
||||||
|
return getRandomInstance(instances);
|
||||||
|
}
|
||||||
|
|
||||||
|
const nextInstanceIndex = (currentInstanceIndex + 1) % instances.length;
|
||||||
|
|
||||||
|
return instances[nextInstanceIndex];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} str
|
* @param {string} str
|
||||||
*/
|
*/
|
||||||
|
@ -197,6 +214,7 @@ function ping(href) {
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
getRandomInstance,
|
getRandomInstance,
|
||||||
|
getNextInstance,
|
||||||
protocolHost,
|
protocolHost,
|
||||||
getList,
|
getList,
|
||||||
getBlacklist,
|
getBlacklist,
|
||||||
|
|
884
src/config.json
884
src/config.json
File diff suppressed because it is too large
Load Diff
|
@ -7,6 +7,9 @@
|
||||||
"gecko": {
|
"gecko": {
|
||||||
"id": "7esoorv3@alefvanoon.anonaddy.me",
|
"id": "7esoorv3@alefvanoon.anonaddy.me",
|
||||||
"strict_min_version": "89.0"
|
"strict_min_version": "89.0"
|
||||||
|
},
|
||||||
|
"gecko_android": {
|
||||||
|
"strict_min_version": "113.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"background": {
|
"background": {
|
||||||
|
@ -85,4 +88,4 @@
|
||||||
"default_locale": "en",
|
"default_locale": "en",
|
||||||
"update_url": "https://raw.githubusercontent.com/libredirect/libredirect/master/src/updates/updates.xml",
|
"update_url": "https://raw.githubusercontent.com/libredirect/libredirect/master/src/updates/updates.xml",
|
||||||
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAroWDSoSRZ1scj+eJRrvnhJbrqXTKnhQuxs6+AJg16sqr0bsMdFV+MSY4i4xnK+K5WOYkBliWXgUyk/wzicoAjOnSJddrL/Md4FuWHI2NVIkrlsLOrYkygi5OLqGPajRH/w8Cdmg7KzEpXe/OnYV0/qS8li8huEdTzdeLdhfbiVl1j3DOr4OJALQ7mPeeNFHFo/oVQ+OkSezWLezA5jUGfhtzPYV6u1TXzX7lCi8E/BbDbwkvvXOMcjXCv08kjdLOY2djCA2a6zr0xAb3q8DlexAMZ8vMof7AQRFtBKhLc9n9VFoipMMdBOVQQj/eIcRILBrmkcZNnJxFKiHNJ+NcZQIDAQAB"
|
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAroWDSoSRZ1scj+eJRrvnhJbrqXTKnhQuxs6+AJg16sqr0bsMdFV+MSY4i4xnK+K5WOYkBliWXgUyk/wzicoAjOnSJddrL/Md4FuWHI2NVIkrlsLOrYkygi5OLqGPajRH/w8Cdmg7KzEpXe/OnYV0/qS8li8huEdTzdeLdhfbiVl1j3DOr4OJALQ7mPeeNFHFo/oVQ+OkSezWLezA5jUGfhtzPYV6u1TXzX7lCi8E/BbDbwkvvXOMcjXCv08kjdLOY2djCA2a6zr0xAb3q8DlexAMZ8vMof7AQRFtBKhLc9n9VFoipMMdBOVQQj/eIcRILBrmkcZNnJxFKiHNJ+NcZQIDAQAB"
|
||||||
}
|
}
|
|
@ -71,7 +71,7 @@ browser.webRequest.onBeforeRequest.addListener(
|
||||||
if (tabIdRedirects[details.tabId] != false) tabIdRedirects[details.tabId] = false
|
if (tabIdRedirects[details.tabId] != false) tabIdRedirects[details.tabId] = false
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
console.info("Redirecting", url.href, "=>", newUrl)
|
console.log("Redirecting", url.href, "=>", newUrl)
|
||||||
return { redirectUrl: newUrl }
|
return { redirectUrl: newUrl }
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
|
@ -160,9 +160,7 @@ browser.contextMenus.onClicked.addListener(async (info) => {
|
||||||
case 'switchInstanceTab': {
|
case 'switchInstanceTab': {
|
||||||
const url = new URL(info.pageUrl)
|
const url = new URL(info.pageUrl)
|
||||||
const newUrl = await servicesHelper.switchInstance(url)
|
const newUrl = await servicesHelper.switchInstance(url)
|
||||||
if (newUrl) {
|
if (newUrl) browser.tabs.update({ url: newUrl })
|
||||||
browser.tabs.update({ url: newUrl })
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
case 'settingsTab': {
|
case 'settingsTab': {
|
||||||
|
|
|
@ -109,6 +109,18 @@ redirectOnlyInIncognitoElement.addEventListener('change', event => {
|
||||||
setOption('redirectOnlyInIncognito', 'checkbox', event)
|
setOption('redirectOnlyInIncognito', 'checkbox', event)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const bookmarksMenuElement = document.getElementById('bookmarksMenu')
|
||||||
|
bookmarksMenuElement.addEventListener('change', async event => {
|
||||||
|
if (event.target.checked)
|
||||||
|
bookmarksMenuElement.checked = await browser.permissions.request({
|
||||||
|
permissions: ["bookmarks"]
|
||||||
|
})
|
||||||
|
else
|
||||||
|
bookmarksMenuElement.checked = !await browser.permissions.remove({
|
||||||
|
permissions: ["bookmarks"]
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
let themeElement = document.getElementById("theme")
|
let themeElement = document.getElementById("theme")
|
||||||
themeElement.addEventListener("change", event => {
|
themeElement.addEventListener("change", event => {
|
||||||
setOption("theme", "select", event)
|
setOption("theme", "select", event)
|
||||||
|
@ -136,7 +148,8 @@ for (const service in config.services) {
|
||||||
let options = await utils.getOptions()
|
let options = await utils.getOptions()
|
||||||
themeElement.value = options.theme
|
themeElement.value = options.theme
|
||||||
fetchInstancesElement.value = options.fetchInstances
|
fetchInstancesElement.value = options.fetchInstances
|
||||||
redirectOnlyInIncognitoElement.target.checked = options.redirectOnlyInIncognito
|
redirectOnlyInIncognitoElement.checked = options.redirectOnlyInIncognito
|
||||||
|
bookmarksMenuElement.checked = await browser.permissions.contains({ permissions: ["bookmarks"] })
|
||||||
for (const service in config.services) document.getElementById(service).checked = options.popupServices.includes(service)
|
for (const service in config.services) document.getElementById(service).checked = options.popupServices.includes(service)
|
||||||
|
|
||||||
instanceTypeElement.addEventListener("change", event => {
|
instanceTypeElement.addEventListener("change", event => {
|
||||||
|
|
|
@ -21,6 +21,10 @@ section(class="block-option" id="general_page")
|
||||||
label(for='redirectOnlyInIncognito' data-localise="__MSG_redirectOnlyInIncognito__") Redirect Only in Incognito
|
label(for='redirectOnlyInIncognito' data-localise="__MSG_redirectOnlyInIncognito__") Redirect Only in Incognito
|
||||||
input(id='redirectOnlyInIncognito' type="checkbox")
|
input(id='redirectOnlyInIncognito' type="checkbox")
|
||||||
|
|
||||||
|
div(class="block block-option")
|
||||||
|
label(for='bookmarksMenu' data-localise="__MSG_bookmarksMenu__") Bookmarks menu
|
||||||
|
input(id='bookmarksMenu' type="checkbox")
|
||||||
|
|
||||||
div(class="block block-option")
|
div(class="block block-option")
|
||||||
label(data-localise="__MSG_excludeFromRedirecting__") Excluded from redirecting
|
label(data-localise="__MSG_excludeFromRedirecting__") Excluded from redirecting
|
||||||
|
|
||||||
|
@ -47,7 +51,7 @@ section(class="block-option" id="general_page")
|
||||||
path(d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z")
|
path(d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z")
|
||||||
|
|
|
|
||||||
x(data-localise="__MSG_importSettings__") Import Settings
|
x(data-localise="__MSG_importSettings__") Import Settings
|
||||||
input(id="import-settings" type="file" style="display: none")
|
input(id="import-settings" type="file" accept=".json" style="display: none")
|
||||||
|
|
||||||
|
|
|
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,18 @@ window.browser = window.browser || window.chrome
|
||||||
import servicesHelper from "../../assets/javascripts/services.js"
|
import servicesHelper from "../../assets/javascripts/services.js"
|
||||||
import utils from "../../assets/javascripts/utils.js"
|
import utils from "../../assets/javascripts/utils.js"
|
||||||
|
|
||||||
document.getElementById("more-options").addEventListener("click", () => browser.runtime.openOptionsPage())
|
document.getElementById("more-options").href = browser.runtime.getURL("pages/options/index.html")
|
||||||
|
document.getElementById("more-options").setAttribute('target', '_blank')
|
||||||
|
|
||||||
|
const os = (await browser.runtime.getPlatformInfo()).os
|
||||||
|
|
||||||
|
switch (os) {
|
||||||
|
case "fuchsia":
|
||||||
|
case "ios":
|
||||||
|
case "android": {
|
||||||
|
document.getElementsByTagName("html")[0].classList.add("mobile")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const allSites = document.getElementById("all_sites")
|
const allSites = document.getElementById("all_sites")
|
||||||
const currSite = document.getElementById("current_site")
|
const currSite = document.getElementById("current_site")
|
||||||
|
|
|
@ -6,6 +6,32 @@ html(lang="en")
|
||||||
link(href="../stylesheets/styles.css" rel="stylesheet")
|
link(href="../stylesheets/styles.css" rel="stylesheet")
|
||||||
link(href="./style.css" rel="stylesheet")
|
link(href="./style.css" rel="stylesheet")
|
||||||
body(dir="auto")
|
body(dir="auto")
|
||||||
|
div(class="block" id="change_instance_div" style="display: none")
|
||||||
|
button(class="title button bottom-button" id="change_instance")
|
||||||
|
label(data-localise="__MSG_switchInstance__") Switch Instance
|
||||||
|
svg(xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" preserveAspectRatio="xMinYMin meet" fill="currentColor")
|
||||||
|
path(d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z")
|
||||||
|
|
||||||
|
div(class="block" id="copy_original_div" title="Copy the original redirected link" style="display: none")
|
||||||
|
button(class="title button bottom-button" id="copy_original")
|
||||||
|
label() Copy Original
|
||||||
|
svg(xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" preserveAspectRatio="xMinYMin meet" fill="currentColor")
|
||||||
|
path(d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z")
|
||||||
|
|
||||||
|
div(class="block" id="redirect_div" style="display: none")
|
||||||
|
button(class="title button bottom-button" id="redirect")
|
||||||
|
label Redirect
|
||||||
|
svg(xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" preserveAspectRatio="xMinYMin meet" fill="currentColor")
|
||||||
|
path(d="M7 20v-9q0-.825.588-1.413Q8.175 9 9 9h8.2l-1.6-1.6L17 6l4 4-4 4-1.4-1.4 1.6-1.6H9v9Z")
|
||||||
|
|
||||||
|
div(class="block" id="redirect_to_original_div" style="display: none")
|
||||||
|
button(class="title button bottom-button" id="redirect_to_original")
|
||||||
|
label Redirect To Original
|
||||||
|
svg(xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" preserveAspectRatio="xMinYMin meet" fill="currentColor")
|
||||||
|
path(d="M 17,20 V 11 Q 17,10.175 16.412,9.587 15.825,9 15,9 H 6.8 L 8.4,7.4 7,6 3,10 7,14 8.4,12.6 6.8,11 H 15 v 9 z" id="path2")
|
||||||
|
|
||||||
|
hr
|
||||||
|
|
||||||
div(id="current_site")
|
div(id="current_site")
|
||||||
include /src/pages/popup/switches
|
include /src/pages/popup/switches
|
||||||
div(id="current_site_divider" style="display: none")
|
div(id="current_site_divider" style="display: none")
|
||||||
|
@ -16,36 +42,12 @@ html(lang="en")
|
||||||
|
|
||||||
hr
|
hr
|
||||||
|
|
||||||
div(class="block" id="change_instance_div" style="display: none")
|
|
||||||
button(class="title button bottom-button" id="change_instance")
|
|
||||||
label(data-localise="__MSG_switchInstance__") Switch Instance
|
|
||||||
svg(xmlns="http://www.w3.org/2000/svg" height="26px" width="26px" fill="currentColor")
|
|
||||||
path(d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z")
|
|
||||||
|
|
||||||
div(class="block" id="copy_original_div" title="Copy the original redirected link" style="display: none")
|
|
||||||
button(class="title button bottom-button" id="copy_original")
|
|
||||||
label() Copy Original
|
|
||||||
svg(xmlns="http://www.w3.org/2000/svg" height="24px" width="24px" fill="currentColor")
|
|
||||||
path(d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z")
|
|
||||||
|
|
||||||
div(class="block" id="redirect_div" style="display: none")
|
|
||||||
button(class="title button bottom-button" id="redirect")
|
|
||||||
label Redirect
|
|
||||||
svg(xmlns="http://www.w3.org/2000/svg" height="24" width="24" fill="currentColor")
|
|
||||||
path(d="M7 20v-9q0-.825.588-1.413Q8.175 9 9 9h8.2l-1.6-1.6L17 6l4 4-4 4-1.4-1.4 1.6-1.6H9v9Z")
|
|
||||||
|
|
||||||
div(class="block" id="redirect_to_original_div" style="display: none")
|
|
||||||
button(class="title button bottom-button" id="redirect_to_original")
|
|
||||||
label Redirect To Original
|
|
||||||
svg(xmlns="http://www.w3.org/2000/svg" height="24px" width="24px" fill="currentColor")
|
|
||||||
path(d="M 17,20 V 11 Q 17,10.175 16.412,9.587 15.825,9 15,9 H 6.8 L 8.4,7.4 7,6 3,10 7,14 8.4,12.6 6.8,11 H 15 v 9 z" id="path2")
|
|
||||||
|
|
||||||
div(class="block")
|
div(class="block")
|
||||||
button(class="title button bottom-button" id="more-options")
|
a(class="title button bottom-button" id="more-options")
|
||||||
label(data-localise="__MSG_settings__") Settings
|
label(data-localise="__MSG_settings__") Settings
|
||||||
svg(xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="26px" width="26px" fill="currentColor")
|
svg(xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" preserveAspectRatio="xMinYMin meet" fill="currentColor")
|
||||||
path(d="m9.25 22-.4-3.2q-.325-.125-.612-.3-.288-.175-.563-.375L4.7 19.375l-2.75-4.75 2.575-1.95Q4.5 12.5 4.5 12.337v-.675q0-.162.025-.337L1.95 9.375l2.75-4.75 2.975 1.25q.275-.2.575-.375.3-.175.6-.3l.4-3.2h5.5l.4 3.2q.325.125.613.3.287.175.562.375l2.975-1.25 2.75 4.75-2.575 1.95q.025.175.025.337v.675q0 .163-.05.338l2.575 1.95-2.75 4.75-2.95-1.25q-.275.2-.575.375-.3.175-.6.3l-.4 3.2Zm2.8-6.5q1.45 0 2.475-1.025Q15.55 13.45 15.55 12q0-1.45-1.025-2.475Q13.5 8.5 12.05 8.5q-1.475 0-2.488 1.025Q8.55 10.55 8.55 12q0 1.45 1.012 2.475Q10.575 15.5 12.05 15.5Z")
|
path(d="m9.25 22-.4-3.2q-.325-.125-.612-.3-.288-.175-.563-.375L4.7 19.375l-2.75-4.75 2.575-1.95Q4.5 12.5 4.5 12.337v-.675q0-.162.025-.337L1.95 9.375l2.75-4.75 2.975 1.25q.275-.2.575-.375.3-.175.6-.3l.4-3.2h5.5l.4 3.2q.325.125.613.3.287.175.562.375l2.975-1.25 2.75 4.75-2.575 1.95q.025.175.025.337v.675q0 .163-.05.338l2.575 1.95-2.75 4.75-2.95-1.25q-.275.2-.575.375-.3.175-.6.3l-.4 3.2Zm2.8-6.5q1.45 0 2.475-1.025Q15.55 13.45 15.55 12q0-1.45-1.025-2.475Q13.5 8.5 12.05 8.5q-1.475 0-2.488 1.025Q8.55 10.55 8.55 12q0 1.45 1.012 2.475Q10.575 15.5 12.05 15.5Z")
|
||||||
|
|
||||||
div(class="space")
|
div(class="space")
|
||||||
script(type="module" src="../options/init.js")
|
script(type="module" src="../options/init.js")
|
||||||
script(type="module" src="./popup.js")
|
script(type="module" src="./popup.js")
|
||||||
|
|
|
@ -36,7 +36,6 @@ input {
|
||||||
width: 46px;
|
width: 46px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
div.block label {
|
div.block label {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
|
@ -50,4 +49,17 @@ div.block label:hover {
|
||||||
|
|
||||||
div.block div {
|
div.block div {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
html.mobile body {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
html.mobile div.block label {
|
||||||
|
font-size: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
html.mobile .button svg {
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
}
|
}
|
|
@ -10,5 +10,5 @@ each _, service in services
|
||||||
div
|
div
|
||||||
input(class=`${service}-enabled` type="checkbox" aria-label=`toggle ${services[service].name}`)
|
input(class=`${service}-enabled` type="checkbox" aria-label=`toggle ${services[service].name}`)
|
||||||
button(class=`${service}-change_instance title button` aria-label=`change instance for ${services[service].name}`)
|
button(class=`${service}-change_instance title button` aria-label=`change instance for ${services[service].name}`)
|
||||||
svg(xmlns="http://www.w3.org/2000/svg" height="26px" width="26px" fill="currentColor")
|
svg(xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" preserveAspectRatio="xMinYMin meet" fill="currentColor")
|
||||||
path(d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z")
|
path(d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z")
|
|
@ -388,4 +388,55 @@ input:disabled {
|
||||||
width: 750px;
|
width: 750px;
|
||||||
padding: 0 55px;
|
padding: 0 55px;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
html.mobile img,
|
||||||
|
html.mobile svg {
|
||||||
|
margin-right: 10px;
|
||||||
|
height: 30px;
|
||||||
|
width: 30px;
|
||||||
|
color: var(--text);
|
||||||
|
}
|
||||||
|
|
||||||
|
html.mobile div.block {
|
||||||
|
padding: 0 15px;
|
||||||
|
justify-content: space-between;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
html.mobile div.block input[type="checkbox"] {
|
||||||
|
width: 58px;
|
||||||
|
height: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
html.mobile div.block input[type="checkbox"]::before {
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
top: 3px;
|
||||||
|
left: 3.5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
html.mobile div.block input[type="checkbox"]:checked::before {
|
||||||
|
left: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
html.mobile body.option {
|
||||||
|
flex-direction: column;
|
||||||
|
width: 100%;
|
||||||
|
padding: 0;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
html.mobile section.links {
|
||||||
|
flex-direction: row;
|
||||||
|
width: 100%;
|
||||||
|
padding: 0 55px;
|
||||||
|
}
|
||||||
|
|
||||||
|
html.mobile section.block-option {
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
||||||
<app appid='oladmjdebphlnjjcnomfhhbfdldiimaf'>
|
<app appid='oladmjdebphlnjjcnomfhhbfdldiimaf'>
|
||||||
<updatecheck codebase='https://github.com/libredirect/libredirect/releases/download/v2.8.0/libredirect-2.8.0.crx' version='2.8.0' />
|
<updatecheck codebase='https://github.com/libredirect/libredirect/releases/download/v2.8.2/libredirect-2.8.2.crx' version='2.8.2' />
|
||||||
</app>
|
</app>
|
||||||
</gupdate>
|
</gupdate>
|
||||||
|
|
Loading…
Reference in New Issue