diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/assets/images/deviantArt-icon.svg | 474 | ||||
-rw-r--r-- | src/assets/javascripts/services.js | 17 | ||||
-rw-r--r-- | src/config.json | 20 |
3 files changed, 510 insertions, 1 deletions
diff --git a/src/assets/images/deviantArt-icon.svg b/src/assets/images/deviantArt-icon.svg new file mode 100644 index 00000000..30836c15 --- /dev/null +++ b/src/assets/images/deviantArt-icon.svg @@ -0,0 +1,474 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Generator: Adobe Illustrator 23.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> + +<svg + version="1.1" + id="svg2" + x="0px" + y="0px" + viewBox="0 0 256 256" + xml:space="preserve" + sodipodi:docname="DeviantArt_Logo.svg" + width="256" + height="256" + 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" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:ns="http://ns.adobe.com/SaveForWeb/1.0/"><defs + id="defs1" /> +<style + type="text/css" + id="style1"> + .st0{fill:#24E39D;} + .st1{display:none;} + .st2{display:inline;fill:none;stroke:#868686;stroke-width:0.4;stroke-miterlimit:10;stroke-dasharray:2;} + .st3{display:inline;fill:none;stroke:#9C9B9B;stroke-width:0.25;stroke-miterlimit:10;stroke-dasharray:2;} + .st4{display:inline;fill:none;stroke:#868686;stroke-width:0.2;stroke-miterlimit:10;stroke-dasharray:2;} + .st5{display:inline;} + .st6{fill:#6F6F6E;} + .st7{fill:none;stroke:#6F6F6E;stroke-width:0.5;stroke-miterlimit:10;} + .st8{display:inline;fill:#D9D9D9;} +</style> +<metadata + id="metadata174"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + + </cc:Work> + </rdf:RDF> + <ns:sfw> + <ns:slices /> + <ns:sliceSourceBounds + bottomLeftOrigin="true" + height="372.2" + width="962.9" + x="-7.3" + y="0" /> + </ns:sfw> +</metadata> +<sodipodi:namedview + bordercolor="#666666" + borderopacity="1" + gridtolerance="10" + guidetolerance="10" + id="namedview170" + inkscape:current-layer="svg2" + inkscape:cx="167" + inkscape:cy="53" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-height="1056" + inkscape:window-maximized="1" + inkscape:window-width="1888" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:zoom="1" + objecttolerance="10" + pagecolor="#ffffff" + showgrid="false" + inkscape:showpageshadow="2" + inkscape:pagecheckerboard="0" + inkscape:deskcolor="#d1d1d1"> + </sodipodi:namedview> +<polygon + id="polygon8" + class="st0" + points="37.1,204.3 40.9,200.6 58.4,167.2 63.9,163.5 126.5,163.5 126.5,112.4 92.1,112.4 89,108.7 126.5,37.2 126.5,0 126.4,0 89.3,0 85.6,3.7 68.1,37.2 62.6,40.9 0,40.9 0,91.9 34.4,91.9 37.5,95.6 0,167.2 0,204.3 " + transform="translate(64.75,25.85)" /> + + +<g + id="Construction" + transform="translate(0,-191.65601)" + class="st1"> + <line + id="line35" + class="st2" + x1="225.10001" + y1="340.39999" + x2="372.89999" + y2="58.299999" /> + <line + id="line37" + class="st2" + x1="453.29999" + y1="340.39999" + x2="601.09998" + y2="58.299999" /> + <line + id="line39" + class="st2" + x1="539.59998" + y1="340.39999" + x2="687.29999" + y2="58.599998" /> + <line + id="line41" + class="st2" + x1="776.90002" + y1="340.39999" + x2="924.70001" + y2="58.299999" /> + <line + id="line43" + class="st2" + x1="110.9" + y1="342.5" + x2="259.79999" + y2="58.299999" /> + <line + id="line45" + class="st2" + x1="52.599998" + y1="342.5" + x2="201.39999" + y2="58.299999" /> + <line + id="line47" + class="st3" + x1="67.099998" + y1="188.8" + x2="921.70001" + y2="188.8" /> + <line + id="line49" + class="st3" + x1="67.099998" + y1="96.900002" + x2="921.70001" + y2="96.900002" /> + <line + id="line51" + class="st3" + x1="67.099998" + y1="301.20001" + x2="921.70001" + y2="301.20001" /> + <line + id="line53" + class="st3" + x1="67.099998" + y1="209.3" + x2="921.70001" + y2="209.3" /> + <line + id="line55" + class="st4" + x1="354.5" + y1="340.39999" + x2="287.10001" + y2="58.299999" /> + <line + id="line57" + class="st4" + x1="539.59998" + y1="340.39999" + x2="472.70001" + y2="60.099998" /> + <line + id="line59" + class="st4" + x1="754.5" + y1="340.39999" + x2="687.20001" + y2="58.299999" /> +</g> +<g + id="Guidelines" + transform="translate(0,-191.65601)" + class="st1"> + <line + id="line62" + class="st3" + x1="27.1" + y1="188.8" + x2="904.5" + y2="188.8" /> + <line + id="line64" + class="st3" + x1="27.1" + y1="137.8" + x2="93.699997" + y2="137.8" /> + <line + id="line66" + class="st3" + x1="220.10001" + y1="96.900002" + x2="220.10001" + y2="364.5" /> + <line + id="line68" + class="st3" + x1="245.60001" + y1="96.900002" + x2="245.60001" + y2="364.5" /> + <g + id="g70" + class="st5"> + <path + id="path72" + inkscape:connector-curvature="0" + class="st6" + d="m -0.3,163.6 3.7,5.7 H 0.2 l -2.2,-3.4 -2.2,3.4 h -3.2 l 3.7,-5.7 -3.5,-5.4 H -4 l 2,3.2 2.1,-3.2 h 3.1 c 0.1,0 -3.5,5.4 -3.5,5.4 z" /> + </g> + <g + id="g74" + class="st5"> + <g + id="g76"> + <line + id="line78" + class="st7" + x1="12.8" + y1="139" + x2="12.8" + y2="187.8" /> + <g + id="g80"> + <circle + id="circle82" + class="st6" + cx="12.8" + cy="139.10001" + r="1.3" /> + </g> + <g + id="g84"> + <circle + id="circle86" + class="st6" + cx="12.8" + cy="187.7" + r="1.3" /> + </g> + </g> + </g> + <g + id="g88" + class="st5"> + <path + id="path90" + inkscape:connector-curvature="0" + class="st6" + d="m 215.7,386 c 0,-3.4 1.9,-5.7 4.6,-5.7 2.7,0 4.6,2.3 4.6,5.7 0,3.4 -1.9,5.7 -4.6,5.7 -2.7,0 -4.6,-2.3 -4.6,-5.7 z m 2.8,0 c 0,1.7 0.5,3.2 1.8,3.2 1.3,0 1.8,-1.5 1.8,-3.2 0,-1.7 -0.5,-3.2 -1.8,-3.2 -1.3,0 -1.8,1.5 -1.8,3.2 z" /> + <path + id="path92" + inkscape:connector-curvature="0" + class="st6" + d="m 226.8,388.3 c 0.9,0 1.7,0.7 1.7,1.7 0,1 -0.7,1.7 -1.7,1.7 -0.9,0 -1.7,-0.7 -1.7,-1.7 0.1,-1 0.8,-1.7 1.7,-1.7 z" /> + <path + id="path94" + inkscape:connector-curvature="0" + class="st6" + d="m 232.1,387.1 h -2.3 v -6.6 h 6.8 v 2.5 h -4.5 v 1.7 c 0.3,-0.2 1,-0.4 1.7,-0.4 2.2,0 3.6,1.5 3.6,3.7 0,2.3 -1.6,3.8 -4,3.8 -2.5,0 -4.1,-1.5 -4.2,-3.7 h 2.8 c 0.1,0.8 0.6,1.3 1.4,1.3 0.8,0 1.3,-0.6 1.3,-1.4 0,-0.8 -0.5,-1.4 -1.3,-1.4 -0.6,-0.1 -1,0.2 -1.3,0.5 z" /> + <path + id="path96" + inkscape:connector-curvature="0" + class="st6" + d="m 248.5,385.9 3.7,5.7 H 249 l -2.2,-3.4 -2.2,3.4 h -3.2 l 3.7,-5.7 -3.5,-5.4 h 3.2 l 2,3.1 2.1,-3.1 h 3.1 z" /> + </g> + <g + id="g98" + class="st5"> + <g + id="g100"> + <line + id="line102" + class="st7" + x1="221.3" + y1="368.79999" + x2="245.10001" + y2="368.79999" /> + <g + id="g104"> + <circle + id="circle106" + class="st6" + cx="221.39999" + cy="368.79999" + r="1.3" /> + </g> + <g + id="g108"> + <circle + id="circle110" + class="st6" + cx="245.10001" + cy="368.79999" + r="1.3" /> + </g> + </g> + </g> + <g + id="g112" + class="st5"> + <g + id="g114"> + <line + id="line116" + class="st7" + x1="38.099998" + y1="47" + x2="38.099998" + y2="95.800003" /> + <g + id="g118"> + <circle + id="circle120" + class="st6" + cx="38.099998" + cy="47.099998" + r="1.3" /> + </g> + <g + id="g122"> + <circle + id="circle124" + class="st6" + cx="38.099998" + cy="95.699997" + r="1.3" /> + </g> + </g> + </g> + <g + id="g126" + class="st5"> + <path + id="path128" + inkscape:connector-curvature="0" + class="st6" + d="m 70.1,29.2 3.7,5.7 h -3.2 l -2.2,-3.4 -2.2,3.4 H 63 l 3.7,-5.7 -3.5,-5.4 h 3.2 l 2,3.2 2.1,-3.2 h 3.1 c 0,0 -3.5,5.4 -3.5,5.4 z" /> + </g> + <g + id="g130" + class="st5"> + <path + id="path132" + inkscape:connector-curvature="0" + class="st6" + d="M 26.6,70.3 30.3,76 H 27.1 L 24.9,72.6 22.7,76 h -3.2 l 3.7,-5.7 -3.5,-5.4 h 3.2 l 2,3.2 2.1,-3.2 h 3.1 z" /> + </g> + <g + id="g134" + class="st5"> + <g + id="g136"> + <line + id="line138" + class="st7" + x1="92.5" + y1="41.5" + x2="43.799999" + y2="41.5" /> + <g + id="g140"> + <circle + id="circle142" + class="st6" + cx="92.5" + cy="41.5" + r="1.3" /> + </g> + <g + id="g144"> + <circle + id="circle146" + class="st6" + cx="43.900002" + cy="41.5" + r="1.3" /> + </g> + </g> + </g> + <rect + id="rect148" + x="16.799999" + y="137.89999" + class="st8" + width="8.1000004" + height="51" /> + <rect + id="rect150" + x="93.699997" + y="45.900002" + class="st8" + width="8.1000004" + height="51" /> + <rect + id="rect152" + x="896.29999" + y="45.900002" + class="st8" + width="8.1000004" + height="51" /> + <rect + id="rect154" + x="93.699997" + y="301.20001" + class="st8" + width="8.1000004" + height="51" /> + <rect + id="rect156" + x="896.29999" + y="301.20001" + class="st8" + width="8.1000004" + height="51" /> + <rect + id="rect158" + x="42.700001" + y="96.900002" + class="st8" + width="51" + height="8.1000004" /> + <rect + id="rect160" + x="42.700001" + y="293.10001" + class="st8" + width="51" + height="8.1000004" /> + <rect + id="rect162" + x="904.5" + y="96.900002" + class="st8" + width="51" + height="8.1000004" /> + <rect + id="rect164" + x="904.5" + y="293.10001" + class="st8" + width="51" + height="8.1000004" /> + <rect + id="rect166" + x="93.699997" + y="96.900002" + class="st3" + width="810.79999" + height="204.3" /> + <rect + id="rect168" + x="42.700001" + y="45.900002" + class="st3" + width="912.79999" + height="306.39999" /> +</g> +</svg> diff --git a/src/assets/javascripts/services.js b/src/assets/javascripts/services.js index b319d46b..94d8d980 100644 --- a/src/assets/javascripts/services.js +++ b/src/assets/javascripts/services.js @@ -547,10 +547,24 @@ function rewrite(url, frontend, randomInstance) { url.searchParams.delete("ie") return `${randomInstance}${url.pathname}${url.search}` case "shoelace": { - const reg = /\/(?:(?:(?:.*)?\/post)|t)\/(.*)(?:\/)?/.exec(url.pathname) + const reg = /^\/(?:(?:(?:[^\/])?\/post)|t)\/([^\/])/.exec(url.pathname) if (reg) return `${randomInstance}/t/${reg[1]}${url.search}` return `${randomInstance}${url.pathname}${url.search}` } + case "skunkyArt": { + if (url.pathname.startsWith('/search')) return `${randomInstance}${url.pathname}${url.search}&scope=all` + + const artReg = /^\/.*?\/art\/(.*)\/?/.exec(url.pathname) + if (artReg) return `${randomInstance}/post/art/${artReg[1]}${url.search}` + + const userReg = /^\/([^\/]+)$/.exec(url.pathname) + if (userReg) return `${randomInstance}/user/${userReg[1]}${url.search}` + + const galleryReg = /^\/.*?\/gallery(\/$|$)$/.exec(url.pathname) + if (galleryReg) return `${randomInstance}/user/${userReg[1]}?a=gallery` + + return `${randomInstance}${url.pathname}${url.search}` + } case "piped": case "pipedMaterial": case "cloudtube": @@ -804,6 +818,7 @@ const defaultInstances = { freetar: ["https://freetar.de"], ratAintTieba: ["https://rat.fis.land"], shoelace: ["https://shoelace.mint.lgbt"], + skunkyArt: ["https://skunky.bloat.cat/"], } function initDefaults() { diff --git a/src/config.json b/src/config.json index a42b7c73..a4abc44e 100644 --- a/src/config.json +++ b/src/config.json @@ -1208,6 +1208,26 @@ }, "imageType": "svgMono", "url": "https://threads.net" + }, + "deviantArt": { + "frontends": { + "skunkyArt": { + "name": "SkunkyArt", + "instanceList": true, + "url": "https://git.sr.ht/~nixgoat/shoelace" + } + }, + "targets": [ + "^https?:\\/{2}(www\\.)?deviantart\\.com" + ], + "name": "DeviantArt", + "options": { + "enabled": false, + "unsupportedUrls": "bypass", + "frontend": "skunkyArt" + }, + "imageType": "svg", + "url": "https://deviantart.com" } } } \ No newline at end of file |