diff options
-rw-r--r-- | src/assets/images/soundcloud-icon.svg | 43 | ||||
-rw-r--r-- | src/assets/javascripts/services.js | 22 | ||||
-rw-r--r-- | src/config.json | 41 |
3 files changed, 103 insertions, 3 deletions
diff --git a/src/assets/images/soundcloud-icon.svg b/src/assets/images/soundcloud-icon.svg new file mode 100644 index 00000000..fe800af3 --- /dev/null +++ b/src/assets/images/soundcloud-icon.svg @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + width="87.053955mm" + height="87.053955mm" + viewBox="0 0 87.053955 87.053956" + version="1.1" + id="svg1" + xml:space="preserve" + inkscape:version="1.3 (0e150ed6c4, 2023-07-21)" + sodipodi:docname="soundcloud-icon.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="namedview1" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:showpageshadow="2" + inkscape:pageopacity="0.0" + inkscape:pagecheckerboard="0" + inkscape:deskcolor="#d1d1d1" + inkscape:document-units="mm" + inkscape:zoom="1.1452094" + inkscape:cx="123.99479" + inkscape:cy="250.17258" + 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" /><g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(-12.363839,-103.73239)"><path + style="fill:#f26e1e;fill-opacity:1;stroke-width:0.999996" + d="m 34.898173,164.03329 c -0.329046,-0.76149 -0.403939,-21.90325 -0.0864,-24.39023 0.160234,-1.25497 0.241744,-1.40949 0.743482,-1.40949 0.505915,0 0.578237,0.14409 0.707482,1.40949 0.07917,0.77521 0.27221,4.82901 0.428955,9.00845 0.243843,6.50178 0.2307,8.17251 -0.09103,11.57129 -0.206813,2.18478 -0.447258,4.08758 -0.534324,4.22846 -0.291339,0.47139 -0.873946,0.26294 -1.168163,-0.41797 z m 10.003479,0.2889 c -0.233796,-0.23379 -0.391925,-0.83598 -0.402306,-1.53204 -0.0095,-0.63077 -0.109057,-2.41539 -0.221441,-3.96583 -0.250331,-3.45354 0.198917,-21.56298 0.545768,-22.00023 0.313055,-0.39465 1.031221,-0.39353 1.359578,0.002 0.155808,0.18773 0.365067,3.83821 0.534478,9.32386 0.321244,10.40208 0.05269,17.69113 -0.672432,18.25091 -0.515189,0.39772 -0.678375,0.38649 -1.143645,-0.0788 z m 13.23953,-0.15071 c -0.344117,-0.4913 -0.387816,-2.36857 -0.387816,-16.66008 0,-13.46796 0.05614,-16.16254 0.342701,-16.44909 0.679185,-0.67919 4.037101,-1.28661 7.011141,-1.26826 3.362765,0.0208 5.170787,0.43615 8.089225,1.8586 2.70764,1.3197 6.048842,4.56473 7.411073,7.19774 0.935747,1.80868 1.903793,4.89747 1.903793,6.07451 0,0.61031 0.06759,0.67386 0.551538,0.51862 5.043399,-1.61786 10.092559,0.5262 12.350362,5.24446 0.966363,2.01946 1.107445,5.0889 0.332046,7.22405 -1.059583,2.91771 -3.01897,4.97311 -5.818311,6.10346 l -1.409998,0.56934 -14.993969,0.0701 -14.993969,0.0702 z m -29.677062,-0.0156 c -0.328485,-0.97132 -0.586254,-9.47647 -0.377032,-12.44024 0.128485,-1.82007 0.237501,-3.67118 0.24226,-4.11358 0.0087,-0.81159 0.570639,-1.31649 0.982502,-0.88281 0.113032,0.11902 0.379797,2.09426 0.592811,4.38943 0.370888,3.99619 0.366318,4.35455 -0.107834,8.45691 -0.540044,4.67244 -0.584405,4.89671 -0.968573,4.89671 -0.143282,0 -0.307143,-0.13788 -0.364134,-0.30642 z m 3.271856,0.24514 c -0.0186,-0.0338 -0.222195,-2.04682 -0.452437,-4.47359 -0.382157,-4.02797 -0.388216,-4.99949 -0.06954,-11.15332 0.191992,-3.70756 0.392127,-6.8789 0.444744,-7.04743 0.05261,-0.16853 0.304574,-0.30641 0.559906,-0.30641 0.526356,0 0.549924,0.20272 1.040393,8.94934 0.232449,4.14529 0.213662,5.58284 -0.12133,9.28425 -0.218002,2.40872 -0.456014,4.47601 -0.528916,4.59397 -0.118254,0.19135 -0.786997,0.3087 -0.872815,0.15319 z m 6.54247,-0.1632 c -0.596982,-0.96594 -0.71293,-18.73719 -0.166145,-25.46509 0.139453,-1.71592 0.203477,-1.89444 0.704922,-1.96566 0.303346,-0.0431 0.566655,-0.0431 0.585132,0 0.01848,0.0431 0.156361,4.18559 0.30641,9.20557 0.267054,8.93446 0.07335,17.38755 -0.415752,18.14324 -0.231761,0.35811 -0.814792,0.40518 -1.014567,0.0819 z m 3.207861,0.0343 c -0.06464,-0.10459 -0.244529,-2.1567 -0.399739,-4.56022 -0.212283,-3.28737 -0.212987,-6.68395 -0.0029,-13.70989 0.153646,-5.13692 0.333527,-9.42751 0.399737,-9.53464 0.191243,-0.30943 1.077627,-0.22582 1.183337,0.11164 0.05279,0.16852 0.204884,4.43019 0.337981,9.47039 0.245028,9.2789 0.01448,17.44434 -0.51124,18.10649 -0.272149,0.34279 -0.827603,0.40688 -1.007234,0.11623 z m 6.920925,-0.21452 c -0.231019,-0.27792 -0.413227,-1.70897 -0.581553,-4.5675 -0.302477,-5.13674 0.08977,-21.81278 0.523267,-22.2458 0.152976,-0.15281 0.539052,-0.24092 0.857948,-0.19579 0.53688,0.076 0.591265,0.22303 0.734522,1.98652 0.617061,7.59599 0.420108,24.21929 -0.297192,25.08358 -0.378674,0.45628 -0.825297,0.43425 -1.236992,-0.061 z m 3.223226,0.0433 c -0.616984,-0.74341 -0.835776,-8.18003 -0.569799,-19.36716 0.228623,-9.61602 0.286408,-10.5273 0.686068,-10.81954 0.76202,-0.55721 1.292809,-0.0168 1.483611,1.51023 0.09345,0.7479 0.184162,7.22888 0.201594,14.40214 0.02717,11.17908 -0.02111,13.14694 -0.337866,13.77471 -0.4278,0.8478 -1.009769,1.04646 -1.463608,0.49962 z m 3.469018,0.0449 c -0.144453,-0.17405 -0.391278,-2.2596 -0.548502,-4.63455 -0.343258,-5.18508 0.08626,-26.7776 0.54363,-27.32869 0.365818,-0.44079 0.793744,-0.40428 1.24978,0.10664 0.326565,0.36587 0.4133,1.92565 0.589529,10.60179 0.244868,12.0552 0.244488,12.55252 -0.01317,17.22863 -0.145776,2.6456 -0.296696,3.72105 -0.558988,3.98334 -0.44356,0.44355 -0.916386,0.4596 -1.262274,0.0428 z m -29.806524,-0.14298 c -0.07284,-0.11785 -0.310969,-2.11097 -0.529169,-4.42915 -0.364764,-3.8753 -0.365054,-4.58286 -0.0036,-8.78287 0.366362,-4.25713 0.598349,-5.32305 1.058385,-4.86302 0.101828,0.10183 0.363242,2.19032 0.580919,4.6411 0.349691,3.93709 0.356354,4.92691 0.05722,8.50055 -0.186203,2.22454 -0.392726,4.29282 -0.458939,4.59617 -0.122485,0.56116 -0.465102,0.72509 -0.70481,0.33722 z m -3.021608,-0.52108 c -0.128739,-0.33705 -0.374082,-2.29793 -0.545206,-4.35751 -0.251414,-3.02589 -0.251425,-4.53158 -6.1e-5,-7.84409 0.171092,-2.25468 0.416434,-4.37518 0.545206,-4.71223 0.221173,-0.5789 0.244254,-0.58569 0.41705,-0.12257 0.100606,0.26964 0.327365,2.34432 0.503908,4.61041 0.263795,3.386 0.264285,4.82736 0.0028,8.08922 -0.175032,2.18299 -0.40179,4.1897 -0.503908,4.45934 -0.175561,0.46356 -0.198416,0.45689 -0.41974,-0.12257 z m -3.259067,-0.73538 c -0.02726,-0.0674 -0.229279,-1.77718 -0.448934,-3.79948 -0.361663,-3.32973 -0.364597,-4.01659 -0.03108,-7.27414 0.523179,-5.10994 0.588674,-5.0805 1.377503,0.6193 0.375874,2.71592 0.374585,3.11509 -0.01978,6.1282 -0.37764,2.88531 -0.739373,4.66824 -0.877713,4.32612 z m -3.364363,-5.20888 c -0.37561,-3.34492 0.285861,-8.58316 0.773853,-6.1282 0.597314,3.00492 0.664002,3.8945 0.407316,5.43326 -0.62881,3.76953 -0.823081,3.88382 -1.181169,0.69494 z" + id="path1" + sodipodi:nodetypes="ssssssssscssscsscccsssssscsssccccsssssssssssssssssscssssscccsssssscccsssssccssssssscssssssccssssssssssssssssssssssssssssss" /></g></svg> diff --git a/src/assets/javascripts/services.js b/src/assets/javascripts/services.js index 69c6935f..6ed77621 100644 --- a/src/assets/javascripts/services.js +++ b/src/assets/javascripts/services.js @@ -517,6 +517,24 @@ function redirect(url, type, initiator, forceRedirection) { } return `${randomInstance}${url.pathname}${url.search}` } + case "tuboYoutube": { + if (url.pathname.startsWith("/channel")) { + return `${randomInstance}/channel?url=${encodeURIComponent(url.href)}` + } + if (url.pathname.startsWith("/watch")) { + return `${randomInstance}/stream?url=${encodeURIComponent(url.href)}` + } + return `${randomInstance}` + } + case "tuboSoundcloud": { + if (url.pathname.match(/\/user[^\/]+(\/$|$)/)) { + return `${randomInstance}/channel?url=${encodeURIComponent(url.href)}` + } + if (url.pathname.match(/\/user[^\/]+\/[^\/]+/)) { + return `${randomInstance}/stream?url=${encodeURIComponent(url.href)}` + } + return `${randomInstance}` + } default: { return `${randomInstance}${url.pathname}${url.search}` } @@ -670,7 +688,9 @@ const defaultInstances = { 'destructables': ['https://ds.vern.cc'], 'wtfismyip': ['https://myip.wtf'], 'safetwitch': ['https://safetwitch.drgns.space'], - 'proxigram': ['https://proxigram.privacyfrontends.repl.co'] + 'proxigram': ['https://proxigram.privacyfrontends.repl.co'], + 'tuboYoutube': ['https://tubo.migalmoreno.com'], + 'tuboSoundcloud': ['https://tubo.migalmoreno.com'], } function initDefaults() { diff --git a/src/config.json b/src/config.json index abc37477..1efcd646 100644 --- a/src/config.json +++ b/src/config.json @@ -60,7 +60,21 @@ "name": "CloudTube", "embeddable": false, "instanceList": true, - "url": "https://sr.ht/~cadence/tube/" + "url": "https://sr.ht/~cadence/tube", + "excludeTargets": [ + 2, + 3 + ] + }, + "tuboYoutube": { + "name": "Tubo", + "embeddable": false, + "instanceList": true, + "url": "https://github.com/migalmoreno/tubo", + "excludeTargets": [ + 2, + 3 + ] }, "freetube": { "excludeTargets": [ @@ -213,7 +227,7 @@ } }, "targets": [ - "^https?:\\/{2}(www\\.)?instagram\\.com\\/?" + "^https?:\\/{2}(www\\.)?instagram\\.com" ], "name": "Instagram", "options": { @@ -299,6 +313,29 @@ "imageType": "svg", "url": "https://www.pixiv.net" }, + "soundcloud": { + "frontends": { + "tuboSoundcloud": { + "name": "Tubo", + "embeddable": false, + "instanceList": true, + "url": "https://github.com/migalmoreno/tubo" + } + }, + "targets": [ + "^https?:\\/{2}soundcloud\\.com" + ], + "name": "SoundCloud", + "options": { + "enabled": false, + "redirectType": "main_frame", + "frontend": "tuboSoundcloud", + "unsupportedUrls": "bypass" + }, + "imageType": "svg", + "embeddable": false, + "url": "https://soundcloud.com" + }, "medium": { "frontends": { "scribe": { |