このコミットが含まれているのは:
守矢諏訪子 2023-06-06 13:26:33 +09:00
コミット 7bc84bfe73
18個のファイルの変更137行の追加189行の削除

バイナリ
img/1.png

バイナリファイルは表示されません。

変更前

幅:  |  高さ:  |  サイズ: 714 KiB

バイナリ
img/2.png

バイナリファイルは表示されません。

変更前

幅:  |  高さ:  |  サイズ: 130 KiB

バイナリ
img/3.png

バイナリファイルは表示されません。

変更前

幅:  |  高さ:  |  サイズ: 144 KiB

バイナリファイルは表示されません。

変更前

幅:  |  高さ:  |  サイズ: 36 KiB

バイナリ
img/badge-ms.png

バイナリファイルは表示されません。

変更前

幅:  |  高さ:  |  サイズ: 27 KiB

長すぎる行があるためファイル差分は表示されません

変更前

幅:  |  高さ:  |  サイズ: 11 KiB

バイナリファイルは表示されません。

変更前

幅:  |  高さ:  |  サイズ: 3.8 KiB

ファイルの表示

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="90.482758" height="32" version="1.1" id="svg13" sodipodi:docname="liberapay.svg" inkscape:version="1.1.1 (1:1.1+202109281949+c3084ef5ed)" 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="defs17"/>
<sodipodi:namedview id="namedview15" pagecolor="#505050" bordercolor="#ffffff" borderopacity="1" inkscape:pageshadow="0" inkscape:pageopacity="0" inkscape:pagecheckerboard="1" showgrid="false" showguides="false" inkscape:zoom="7.5783133" inkscape:cx="23.620032" inkscape:cy="32.131161" inkscape:window-width="1888" inkscape:window-height="1060" inkscape:window-x="32" inkscape:window-y="0" inkscape:window-maximized="1" inkscape:current-layer="svg13"/>
<rect id="back" fill="#f6c915" x="0" y="0" width="90.482758" height="32" rx="4.4137931" style="stroke-width:1.10345"/>
<path d="m 12.338759,21.08469 c -0.788083,0 -1.406456,-0.102842 -1.856,-0.308083 C 10.033214,20.571366 9.711448,20.29131 9.517241,19.936 9.323034,19.58091 9.228579,19.173076 9.234317,18.712497 c 0.0055,-0.460359 0.06908,-0.951394 0.191559,-1.473104 l 2.113986,-8.8386206 2.579862,-0.3994483 -2.31371,9.5867589 c -0.04458,0.199724 -0.0693,0.382896 -0.07481,0.549296 -0.0057,0.1664 0.02494,0.3136 0.09159,0.441159 0.06665,0.127779 0.180304,0.2304 0.341186,0.307862 0.160883,0.0779 0.385545,0.127779 0.674207,0.149848 l -0.49942,2.047559" id="path3" style="fill:#1a171b;stroke-width:0.22069"/>
<path d="m 21.66069,15.576276 c 0,0.810152 -0.133297,1.551448 -0.399669,2.222345 -0.266373,0.671558 -0.635366,1.251089 -1.105655,1.739255 -0.471835,0.488386 -1.037683,0.868414 -1.697766,1.140303 -0.660303,0.271669 -1.378869,0.407835 -2.155476,0.407835 -0.377379,0 -0.754758,-0.03332 -1.131917,-0.09997 l -0.749021,3.012635 h -2.463338 l 2.763035,-11.517793 c 0.443586,-0.133076 0.951393,-0.252249 1.522979,-0.357959 0.571366,-0.105269 1.190179,-0.158014 1.856,-0.158014 0.621241,0 1.156855,0.09446 1.606179,0.282924 0.449545,0.18869 0.818318,0.446676 1.107862,0.773959 0.288442,0.327504 0.501849,0.7104 0.640883,1.14869 0.138373,0.43851 0.20789,0.907034 0.20789,1.406455 m -6.042042,3.412083 c 0.188469,0.04458 0.421518,0.06665 0.698925,0.06665 0.432772,0 0.826703,-0.08033 1.181793,-0.241435 0.355089,-0.160662 0.657434,-0.385544 0.907255,-0.674206 0.2496,-0.288442 0.443586,-0.634925 0.582621,-1.040331 0.138593,-0.404966 0.20811,-0.851421 0.20811,-1.339807 0,-0.476911 -0.10571,-0.882318 -0.316248,-1.215118 -0.21098,-0.3328 -0.577104,-0.49942 -1.098593,-0.49942 -0.355311,0 -0.688111,0.03332 -0.998621,0.09997 l -1.165242,4.843697" id="path5" style="fill:#1a171b;stroke-width:0.22069"/>
<path d="m 29.120083,21.517241 h 4.402758 c 1.714759,0 2.796138,-0.401655 3.568552,-1.313103 0.880552,-1.050483 1.359448,-2.564414 1.359448,-4.325517 0,-1.745655 -0.478896,-3.259587 -1.359448,-4.325518 -0.772414,-0.911448 -1.838345,-1.297655 -3.568552,-1.297655 h -4.402758 z m 2.317241,-1.931034 v -7.399724 h 2.085517 c 1.745656,0 2.610759,1.220414 2.610759,3.707586 0,2.471724 -0.865103,3.692138 -2.610759,3.692138 z" style="font-weight:700;font-size:14px;font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;text-anchor:middle;fill:#1a171b;stroke-width:1.10345" id="path1460"/>
<path d="m 43.765003,13.036138 c -2.548965,0 -4.109241,1.683862 -4.109241,4.418207 0,2.749793 1.560276,4.418207 4.124689,4.418207 2.548966,0 4.12469,-1.668414 4.12469,-4.356414 0,-2.827035 -1.529379,-4.48 -4.140138,-4.48 z m 0.01545,1.745655 c 1.189518,0 1.961931,1.065931 1.961931,2.703448 0,1.560276 -0.80331,2.641656 -1.961931,2.641656 -1.174069,0 -1.961931,-1.065931 -1.961931,-2.672552 0,-1.606621 0.787862,-2.672552 1.961931,-2.672552 z" style="font-weight:700;font-size:14px;font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;text-anchor:middle;fill:#1a171b;stroke-width:1.10345" id="path1462"/>
<path d="m 49.527181,13.175172 v 8.342069 H 51.68994 V 16.512 c 0,-0.98869 0.679724,-1.637517 1.745655,-1.637517 0.926897,0 1.390345,0.509793 1.390345,1.498483 v 5.144275 h 2.162758 v -5.592275 c 0,-1.853794 -1.004137,-2.888828 -2.796137,-2.888828 -1.127725,0 -1.88469,0.401655 -2.502621,1.344 v -1.204966 z" style="font-weight:700;font-size:14px;font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;text-anchor:middle;fill:#1a171b;stroke-width:1.10345" id="path1464"/>
<path d="M 66.087705,21.254621 C 65.716947,20.89931 65.593361,20.652138 65.593361,20.235034 v -4.634482 c 0,-1.699311 -1.158621,-2.564414 -3.414069,-2.564414 -2.255449,0 -3.429518,0.957793 -3.568552,2.888828 h 2.085517 c 0.108138,-0.865104 0.463448,-1.143173 1.529379,-1.143173 0.834207,0 1.251311,0.278069 1.251311,0.834207 0,0.278069 -0.139035,0.509793 -0.370759,0.648828 -0.293517,0.154482 -0.293517,0.154482 -1.359448,0.324413 l -0.865104,0.154483 c -1.652965,0.278069 -2.456275,1.127724 -2.456275,2.626207 0,1.498483 1.004137,2.502621 2.533517,2.502621 0.926896,0 1.761103,-0.386207 2.533517,-1.189518 0,0.432552 0.04635,0.587035 0.247172,0.834207 h 2.348138 z m -2.610758,-3.089655 c 0,1.25131 -0.617931,1.961931 -1.714759,1.961931 -0.726069,0 -1.174069,-0.386207 -1.174069,-1.004138 0,-0.648828 0.339862,-0.957793 1.235862,-1.143173 l 0.741517,-0.139034 c 0.571587,-0.108138 0.664276,-0.139035 0.911449,-0.262621 z" style="font-weight:700;font-size:14px;font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;text-anchor:middle;fill:#1a171b;stroke-width:1.10345" id="path1466"/>
<path d="m 71.185629,13.345103 h -1.204966 v -2.24 h -2.162758 v 2.24 h -1.065931 v 1.43669 h 1.065931 v 5.128828 c 0,1.313103 0.695172,1.961931 2.116413,1.961931 0.494345,0 0.849656,-0.04634 1.251311,-0.169931 V 20.18869 c -0.216276,0.0309 -0.324414,0.04634 -0.494345,0.04634 -0.571586,0 -0.710621,-0.169931 -0.710621,-0.911448 v -4.541793 h 1.204966 z" style="font-weight:700;font-size:14px;font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;text-anchor:middle;fill:#1a171b;stroke-width:1.10345" id="path1468"/>
<path d="m 79.713025,18.025931 c 0.01545,-0.185379 0.01545,-0.262621 0.01545,-0.370759 0,-0.834206 -0.123586,-1.60662 -0.324413,-2.193655 -0.556138,-1.513931 -1.900138,-2.425379 -3.584,-2.425379 -2.394483,0 -3.862069,1.730207 -3.862069,4.526345 0,2.672551 1.452138,4.310069 3.815724,4.310069 1.869241,0 3.383172,-1.050483 3.862069,-2.703449 h -2.131862 c -0.262621,0.664276 -0.865104,1.050483 -1.652966,1.050483 -0.617931,0 -1.112276,-0.26262 -1.421241,-0.726069 -0.200828,-0.308965 -0.278069,-0.679724 -0.308966,-1.467586 z m -5.561379,-1.43669 c 0.139034,-1.282207 0.679724,-1.900138 1.637517,-1.900138 0.98869,0 1.575724,0.664276 1.683862,1.900138 z" style="font-weight:700;font-size:14px;font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;text-anchor:middle;fill:#1a171b;stroke-width:1.10345" id="path1470"/>
</svg>

変更前

幅:  |  高さ:  |  サイズ: 6.8 KiB

ファイルの表示

@ -1,95 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="90.483002"
height="31.999998"
viewBox="0 0 23.940294 8.4666664"
version="1.1"
id="svg5"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
sodipodi:docname="patreon.svg"
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">
<sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:document-units="mm"
showgrid="false"
units="px"
height="32px"
showguides="true"
inkscape:guide-bbox="true"
inkscape:zoom="9.179349"
inkscape:cx="37.257544"
inkscape:cy="19.010063"
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="defs2" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-3.8096814)">
<rect
id="back"
fill="#f6c915"
x="3.8096814"
y="-2.9802322e-08"
width="23.940294"
height="8.4666662"
rx="1.1678303"
style="fill:#ff424d;fill-opacity:1;stroke-width:0.291956" />
<g
id="g832"
transform="matrix(5.1798222e-4,0,0,-5.1798222e-4,6.6605479,5.6789438)"
style="fill:#141518;fill-opacity:1">
<path
d="m 3844.89,5757.79 c -1190.76,0 -2159.54,-969.65 -2159.54,-2161.59 0,-1188.33 968.78,-2155.12 2159.54,-2155.12 1187.08,0 2152.82,966.79 2152.82,2155.12 0,1191.94 -965.74,2161.59 -2152.82,2161.59"
style="fill:#141518;fill-opacity:1;fill-rule:evenodd;stroke:none"
id="path834" />
<path
d="M 0,0 H 1054.41 V 5757.81 H 0 V 0"
style="fill:#141518;fill-opacity:1;fill-rule:evenodd;stroke:none"
id="path836" />
</g>
<path
d="m 11.509193,5.6761532 h 1.164885 c 0.453692,0 0.739805,-0.10627 0.94417,-0.3474215 0.232977,-0.2779374 0.359684,-0.6784943 0.359684,-1.1444477 0,-0.4618674 -0.126707,-0.8624243 -0.359684,-1.144449 -0.204365,-0.2411516 -0.486389,-0.3433345 -0.94417,-0.3433345 h -1.164885 z m 0.613099,-0.510914 v -1.957824 h 0.551786 c 0.461867,0 0.690757,0.322898 0.690757,0.9809558 0,0.6539705 -0.22889,0.9768682 -0.690757,0.9768682 z"
style="font-weight:700;font-size:14px;font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;text-anchor:middle;fill:#141518;fill-opacity:1;stroke-width:0.291952"
id="path1460" />
<path
d="m 15.383957,3.4322174 c -0.674408,0 -1.087226,0.4455177 -1.087226,1.1689724 0,0.7275419 0.412818,1.1689724 1.091313,1.1689724 0.674408,0 1.091313,-0.4414305 1.091313,-1.1526235 0,-0.7479785 -0.404644,-1.1853213 -1.0954,-1.1853213 z m 0.004,0.4618665 c 0.314722,0 0.519088,0.2820252 0.519088,0.7152799 0,0.4128189 -0.212539,0.6989321 -0.519088,0.6989321 -0.310636,0 -0.519089,-0.2820253 -0.519089,-0.7071061 0,-0.4250807 0.208453,-0.7071059 0.519089,-0.7071059 z"
style="font-weight:700;font-size:14px;font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;text-anchor:middle;fill:#141518;fill-opacity:1;stroke-width:0.291952"
id="path1462" />
<path
d="m 16.908518,3.4690032 v 2.20715 h 0.572225 V 4.3518634 c 0,-0.2615884 0.179842,-0.4332558 0.461866,-0.4332558 0.24524,0 0.367859,0.1348817 0.367859,0.3964702 v 1.3610754 h 0.572223 V 4.1965459 c 0,-0.4904781 -0.265675,-0.7643285 -0.739803,-0.7643285 -0.298375,0 -0.498654,0.1062702 -0.662145,0.3555966 V 3.4690032 Z"
style="font-weight:700;font-size:14px;font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;text-anchor:middle;fill:#141518;fill-opacity:1;stroke-width:0.291952"
id="path1464" />
<path
d="M 21.290113,5.6066699 C 21.192015,5.5126609 21.159319,5.4472644 21.159319,5.3369065 V 4.1107118 c 0,-0.4496045 -0.306548,-0.6784944 -0.903297,-0.6784944 -0.596747,0 -0.907383,0.2534136 -0.94417,0.7643285 h 0.551787 c 0.02861,-0.2288897 0.12262,-0.302462 0.404645,-0.302462 0.220715,0 0.331074,0.073569 0.331074,0.2207149 0,0.073569 -0.03679,0.1348815 -0.0981,0.1716672 -0.07765,0.04087 -0.07765,0.04087 -0.359682,0.08584 l -0.22889,0.04087 c -0.437344,0.073569 -0.649885,0.2983741 -0.649885,0.6948442 0,0.39647 0.265676,0.6621454 0.670321,0.6621454 0.245238,0 0.465954,-0.1021826 0.670319,-0.3147239 0,0.1144449 0.01226,0.1553185 0.0654,0.2207149 h 0.621271 z M 20.599358,4.789206 c 0,0.3310727 -0.163493,0.5190899 -0.453693,0.5190899 -0.192104,0 -0.310635,-0.1021836 -0.310635,-0.2656765 0,-0.1716672 0.08992,-0.2534134 0.326984,-0.3024609 l 0.196192,-0.03679 c 0.15123,-0.028609 0.175754,-0.03679 0.241152,-0.069489 z"
style="font-weight:700;font-size:14px;font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;text-anchor:middle;fill:#141518;fill-opacity:1;stroke-width:0.291952"
id="path1466" />
<path
d="m 22.638925,3.5139636 h -0.31881 V 2.9213028 h -0.572223 v 0.5926608 h -0.282026 v 0.3801203 h 0.282026 v 1.3569894 c 0,0.3474216 0.183928,0.5190889 0.559961,0.5190889 0.130794,0 0.224802,-0.01226 0.331072,-0.04496 V 5.3246456 c -0.05722,0.0082 -0.08583,0.01226 -0.130794,0.01226 -0.15123,0 -0.188016,-0.04496 -0.188016,-0.2411517 V 3.8940826 h 0.31881 z"
style="font-weight:700;font-size:14px;font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;text-anchor:middle;fill:#141518;fill-opacity:1;stroke-width:0.291952"
id="path1468" />
<path
d="m 24.895109,4.7524204 c 0.004,-0.04905 0.004,-0.069489 0.004,-0.098099 0,-0.2207148 -0.0327,-0.4250807 -0.08583,-0.5803981 -0.147142,-0.400557 -0.502739,-0.6417087 -0.948257,-0.6417087 -0.633533,0 -1.021829,0.4577795 -1.021829,1.1975832 0,0.7071058 0.384209,1.1403615 1.009567,1.1403615 0.494566,0 0.895123,-0.2779382 1.021829,-0.7152809 H 24.31054 c -0.06947,0.1757553 -0.22889,0.2779373 -0.437342,0.2779373 -0.163494,0 -0.294287,-0.069479 -0.376033,-0.1921031 -0.05308,-0.081749 -0.07352,-0.1798425 -0.08169,-0.3882955 z M 23.423676,4.3723001 c 0.03679,-0.3392476 0.179842,-0.5027399 0.433256,-0.5027399 0.261589,0 0.416905,0.1757542 0.445517,0.5027399 z"
style="font-weight:700;font-size:14px;font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;text-anchor:middle;fill:#141518;fill-opacity:1;stroke-width:0.291952"
id="path1470" />
</g>
</svg>

変更前

幅:  |  高さ:  |  サイズ: 6.6 KiB

ファイルの表示

@ -4,7 +4,7 @@
"description": "name of the extension"
},
"extensionDescription": {
"message": "Веб-расширение, которое перенаправляет популярные сайты на альтернативные фронтенды и бэкенды, обеспечивающие конфиденциальность",
"message": "Браузерное расширение, которое перенаправляет известные сайты на иные интерфейсы и движки, обеспечивающие конфиденциальность",
"description": "description of the extension"
},
"switchInstance": {

1
src/assets/images/gitlab-icon.svg ノーマルファイル
ファイルの表示

@ -0,0 +1 @@
<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="m24.507 9.5-.034-.09L21.082.562a.896.896.0 00-1.694.091l-2.29 7.01H7.825L5.535.653A.898.898.0 003.841.563L.451 9.411.416 9.5a6.297 6.297.0 002.09 7.278l.012.01.03.022 5.16 3.867 2.56 1.935 1.554 1.176a1.051 1.051.0 001.268.0l1.555-1.176 2.56-1.935 5.197-3.89.014-.01A6.297 6.297.0 0024.507 9.5z" fill="#e24329"/><path d="m24.507 9.5-.034-.09a11.44 11.44.0 00-4.56 2.051l-7.447 5.632 4.742 3.584 5.197-3.89.014-.01A6.297 6.297.0 0024.507 9.5z" fill="#fc6d26"/><path d="m7.707 20.677 2.56 1.935 1.555 1.176a1.051 1.051.0 001.268.0l1.555-1.176 2.56-1.935-4.743-3.584-4.755 3.584z" fill="#fca326"/><path d="M5.01 11.461A11.43 11.43.0 00.45 9.411L.416 9.5a6.297 6.297.0 002.09 7.278l.012.01.03.022 5.16 3.867 4.745-3.584-7.444-5.632z" fill="#fc6d26"/></svg>

変更後

幅:  |  高さ:  |  サイズ: 856 B

バイナリファイルは表示されません。

変更前

幅:  |  高さ:  |  サイズ: 18 KiB

ファイルの表示

@ -120,9 +120,6 @@ function redirect(url, type, initiator, forceRedirection) {
case "hyperpipe": {
return `${randomInstance}${url.pathname}${url.search}`.replace(/\/search\?q=.*/, searchQuery => searchQuery.replace("?q=", "/"))
}
case "lbryDesktop": {
return url.href.replace(/^https?:\/{2}odysee\.com\//, "lbry://").replace(/:(?=[a-zA-Z0-9])/g, "#")
}
case "searx":
case "searxng":
return `${randomInstance}/${url.search}`
@ -441,6 +438,9 @@ function redirect(url, type, initiator, forceRedirection) {
if (url.pathname.endsWith('-lyrics')) {
return `${randomInstance}/lyrics?path=${encodeURIComponent(url.pathname)}`
}
if (url.pathname.startsWith('/artists/')) {
return `${randomInstance}/artist?path=${url.pathname}`
}
return `${randomInstance}${url.pathname}${url.search}`
}
case "ruralDictionary": {
@ -466,13 +466,13 @@ function redirect(url, type, initiator, forceRedirection) {
}
case "wikiless": {
let hostSplit = url.host.split(".")
// wikiless doesn't have mobile view support yet
if (hostSplit[0] != "wikipedia" && hostSplit[0] != "www") {
// wikiless doesn't have mobile view support yet
if (hostSplit[0] == "m") url.searchParams.append("mobileaction", "toggle_view_mobile")
else url.searchParams.append("lang", hostSplit[0])
if (hostSplit[1] == "m") url.searchParams.append("mobileaction", "toggle_view_mobile")
}
return `${randomInstance}${url.pathname}${GETArguments.toString()}${url.hash}`
return `${randomInstance}${url.pathname}${url.search}${url.hash}`
}
case "proxiTok": {
if (url.pathname.startsWith('/email')) return randomInstance
@ -591,6 +591,11 @@ function redirect(url, type, initiator, forceRedirection) {
return randomInstance
}
}
case "laboratory": {
let path = url.pathname
if (path == "/") path = ""
return `${randomInstance}/${url.hostname}${path}${url.search}`
}
default: {
return `${randomInstance}${url.pathname}${url.search}`
}
@ -648,47 +653,54 @@ function switchInstance(url) {
})
}
function reverse(url) {
return new Promise(async resolve => {
let options = await utils.getOptions()
let config = await utils.getConfig()
let protocolHost = utils.protocolHost(url)
for (const service in config.services) {
let frontend = options[service].frontend
if (options[frontend] == undefined) continue
if (!options[frontend].includes(protocolHost)) continue
switch (service) {
case "youtube":
case "imdb":
case "imgur":
case "tiktok":
case "twitter":
case "reddit":
case "imdb":
case "snopes":
case "urbanDictionary":
case "quora":
case "medium":
resolve(config.services[service].url + url.pathname + url.search)
return
case "fandom":
let regex = url.pathname.match(/^\/([a-zA-Z0-9-]+)\/wiki\/(.*)/)
if (regex) {
resolve(`https://${regex[1]}.fandom.com/wiki/${regex[2]}`)
return
}
resolve()
return
default:
resolve()
return
async function reverse(url) {
let options = await utils.getOptions()
let config = await utils.getConfig()
let protocolHost = utils.protocolHost(url)
for (const service in config.services) {
let frontend = options[service].frontend
if (options[frontend] == undefined) continue
if (!options[frontend].includes(protocolHost)) continue
switch (service) {
case "youtube":
case "imdb":
case "imgur":
case "tiktok":
case "twitter":
case "reddit":
case "imdb":
case "snopes":
case "urbanDictionary":
case "quora":
case "medium":
return `${config.services[service].url}${url.pathname}${url.search}`
case "fandom":
let regex = url.pathname.match(/^\/([a-zA-Z0-9-]+)\/wiki\/(.*)/)
if (regex) return `https://${regex[1]}.fandom.com/wiki/${regex[2]}`
return
case "wikipedia": {
const lang = url.searchParams.get("lang")
if (lang != null) {
url.searchParams.delete("lang")
return `https://${lang}.wikipedia.org${url.pathname}${url.search}${url.hash}`
}
return `https://wikipedia.org${url.pathname}${url.search}${url.hash}`
}
case "stackOverflow": {
if (url.pathname.startsWith("/questions/")) {
return `https://stackoverflow.com${url.pathname}${url.search}`
}
if (url.pathname.startsWith("/exchange/")) {
const regex = /\/exchange\/(.*?)(\/.*)/.exec(url.pathname)
if (regex) return `https://${regex[1]}.stackexchange.com${regex[2]}`
}
return
}
default:
return
}
resolve()
return
})
}
return
}
const defaultInstances = {
@ -712,7 +724,10 @@ const defaultInstances = {
'lingva': ['https://lingva.ml'],
'searxng': ['https://search.bus-hit.me'],
'rimgo': ['https://rimgo.vern.cc'],
<<<<<<< HEAD
'librarian': ['https://odysee.owacon.moe'],
=======
>>>>>>> a00e5d68b85fb654a85b0bc563a45ad16df13842
'beatbump': ['https://beatbump.ml'],
'hyperpipe': ['https://hyperpipe.surge.sh'],
'facil': [' https://facilmap.org '],
@ -731,6 +746,7 @@ const defaultInstances = {
'mikuInvidious': ['https://mikuinv.resrv.org'],
"tent": ['https://tent.sny.sh'],
"wolfreeAlpha": ['https://gqq.gitlab.io', 'https://uqq.gitlab.io'],
"laboratory": ['https://lab.vern.cc'],
"libreSpeed": ['https://librespeed.org'],
'jitsi': ['https://meet.jit.si', 'https://8x8.vc'],
'binternet': ['https://binternet.ahwx.org']

ファイルの表示

@ -842,6 +842,29 @@
"embeddable": false,
"url": "https://bandcamp.com"
},
"gitlab": {
"frontends": {
"laboratory": {
"name": "Laboratory",
"instanceList": true,
"url": "https://git.vitali64.duckdns.org/utils/laboratory.git/about/"
}
},
"targets": [
"^https?:\\/{2}gitlab\\.com\\/",
"^https?:\\/{2}gitlab\\.freedesktop\\.com\\/",
"^https?:\\/{2}gitlab\\.archlinux\\.com\\/"
],
"name": "Gitlab",
"options": {
"enabled": false,
"unsupportedUrls": "bypass",
"frontend": "laboratory"
},
"imageType": "svg",
"embeddable": false,
"url": "https://gitlab.com/"
},
"wolframAlpha": {
"frontends": {
"wolfreeAlpha": {

ファイルの表示

@ -1,7 +1,7 @@
{
"name": "__MSG_extensionName__",
"description": "__MSG_extensionDescription__",
"version": "2.6.2",
"version": "2.6.3",
"manifest_version": 2,
"browser_specific_settings": {
"gecko": {

ファイルの表示

@ -83,7 +83,7 @@ browser.webRequest.onBeforeRequest.addListener(
browser.tabs.onRemoved.addListener(tabId => {
if (tabIdRedirects[tabId] != undefined) {
delete tabIdRedirects[tabId]
console.log("Removed tab " + tabId + " from tabIdRedirects")
console.log(`Removed tab ${tabId} from tabIdRedirects`)
}
})

ファイルの表示

@ -16,7 +16,7 @@ async function setOption(option, type, event) {
browser.storage.local.set({ options })
}
let exportSettingsElement = document.getElementById("export-settings")
const exportSettingsElement = document.getElementById("export-settings")
async function exportSettings() {
const options = await utils.getOptions()
options.version = browser.runtime.getManifest().version
@ -26,12 +26,16 @@ async function exportSettings() {
return
}
exportSettings()
document.getElementById("general_page").onclick = exportSettings
let importSettingsElement = document.getElementById("import-settings")
let importSettingsElementText = document.getElementById("import_settings_text")
const importSettingsElement = document.getElementById("import-settings")
const importSettingsElementText = document.getElementById("import_settings_text")
importSettingsElement.addEventListener("change", () => {
function importError() {
const oldHTML = importSettingsElementText.innerHTML
importSettingsElementText.innerHTML = '<span style="color:red;">Error!</span>'
setTimeout(() => (importSettingsElementText.innerHTML = oldHTML), 1000)
}
importSettingsElementText.innerHTML = "..."
let file = importSettingsElement.files[0]
const reader = new FileReader()
@ -42,7 +46,6 @@ importSettingsElement.addEventListener("change", () => {
"theme" in data
&& data.version == browser.runtime.getManifest().version
) {
browser.storage.local.clear(async () => {
browser.storage.local.set({ options: data }, () => {
location.reload()
@ -58,11 +61,32 @@ importSettingsElement.addEventListener("change", () => {
importError()
}
})
function importError() {
const oldHTML = importSettingsElementText.innerHTML
importSettingsElementText.innerHTML = '<span style="color:red;">Error!</span>'
setTimeout(() => (importSettingsElementText.innerHTML = oldHTML), 1000)
}
const exportSettingsSync = document.getElementById("export-settings-sync")
exportSettingsSync.addEventListener("click", async () => {
let options = await utils.getOptions()
options.version = browser.runtime.getManifest().version
browser.storage.sync.set({ options }, () => location.reload())
})
const importSettingsSync = document.getElementById("import-settings-sync")
const importSettingsSyncText = document.getElementById("import_settings_sync_text")
importSettingsSync.addEventListener("click", () => {
function importError() {
importSettingsSyncText.innerHTML = '<span style="color:red;">Error!</span>'
setTimeout(() => (importSettingsSyncText.innerHTML = oldHTML), 1000)
}
const oldHTML = importSettingsSyncText.innerHTML
importSettingsSyncText.innerHTML = "..."
browser.storage.sync.get({ options }, r => {
const options = r.options
if (options.version == browser.runtime.getManifest().version) {
browser.storage.local.set({ options }, () => location.reload())
} else {
importError()
}
})
})
const resetSettings = document.getElementById("reset-settings")
resetSettings.addEventListener("click", async () => {

ファイルの表示

@ -53,6 +53,22 @@ section(class="option-block" id="general_page")
x(data-localise="__MSG_exportSettings__") Export Settings
|&nbsp;&nbsp;
a(class="button button-inline" id="export-settings-sync")
svg(xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor")
path(d="M10.09 15.59L11.5 17l5-5-5-5-1.41 1.41L12.67 11H3v2h9.67l-2.58 2.59zM19 3H5c-1.11 0-2 .9-2 2v4h2V5h14v14H5v-4H3v4c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z")
|&nbsp;
x() Export Settings to Sync
|&nbsp;&nbsp;
a(class="button button-inline" id="import-settings-sync")
svg(xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor")
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")
|&nbsp;
x(id="import_settings_sync_text") Import Settings from Sync
|&nbsp;&nbsp;
a(class="button button-inline" id="reset-settings")
svg(xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor")