Skip to content

Commit ff16ab4

Browse files
committed
Added Freetar #942
1 parent c6f9865 commit ff16ab4

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed
Lines changed: 1 addition & 0 deletions
Loading

src/assets/javascripts/services.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,15 @@ function rewrite(url, frontend, randomInstance) {
531531
}
532532
return `${randomInstance}${url.pathname}${url.search}`
533533
}
534+
case "freetar":
535+
if (url.pathname.startsWith("/search.php")) {
536+
url.searchParams.set("search_term", url.searchParams.get("value"))
537+
url.searchParams.delete("value")
538+
url.searchParams.delete("search_type")
539+
return `${randomInstance}/search${url.search}`
540+
}
541+
if (url.pathname.startsWith("/artist")) return
542+
return `${randomInstance}${url.pathname}${url.search}`
534543
case "piped":
535544
case "pipedMaterial":
536545
case "cloudtube":
@@ -779,6 +788,7 @@ const defaultInstances = {
779788
priviblur: ["https://pb.bloat.cat"],
780789
nitter: ["https://nitter.privacydev.net"],
781790
pasted: ["https://pasted.drakeerv.com"],
791+
freetar: ["https://freetar.de"],
782792
}
783793

784794
function initDefaults() {

src/config.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,6 +1032,24 @@
10321032
},
10331033
"imageType": "svgMono",
10341034
"url": "https://paste.libredirect.invalid"
1035+
},
1036+
"ultimateGuitar": {
1037+
"frontends": {
1038+
"freetar": {
1039+
"name": "Freetar",
1040+
"instanceList": true,
1041+
"url": "https://github.com/kmille/freetar"
1042+
}
1043+
},
1044+
"targets": ["^https?:\\/{2}(tabs\\.|www\\.)?ultimate-guitar\\.com"],
1045+
"name": "Ultimate Guitar",
1046+
"options": {
1047+
"enabled": false,
1048+
"unsupportedUrls": "bypass",
1049+
"frontend": "freetar"
1050+
},
1051+
"imageType": "svg",
1052+
"url": "https://www.ultimate-guitar.com"
10351053
}
10361054
}
10371055
}

0 commit comments

Comments
 (0)