Skip to content

Commit

Permalink
Added Freetar #942
Browse files Browse the repository at this point in the history
  • Loading branch information
ManeraKai committed Aug 1, 2024
1 parent c6f9865 commit ff16ab4
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/assets/images/ultimateGuitar-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/assets/javascripts/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,15 @@ function rewrite(url, frontend, randomInstance) {
}
return `${randomInstance}${url.pathname}${url.search}`
}
case "freetar":
if (url.pathname.startsWith("/search.php")) {
url.searchParams.set("search_term", url.searchParams.get("value"))
url.searchParams.delete("value")
url.searchParams.delete("search_type")
return `${randomInstance}/search${url.search}`
}
if (url.pathname.startsWith("/artist")) return
return `${randomInstance}${url.pathname}${url.search}`
case "piped":
case "pipedMaterial":
case "cloudtube":
Expand Down Expand Up @@ -779,6 +788,7 @@ const defaultInstances = {
priviblur: ["https://pb.bloat.cat"],
nitter: ["https://nitter.privacydev.net"],
pasted: ["https://pasted.drakeerv.com"],
freetar: ["https://freetar.de"],
}

function initDefaults() {
Expand Down
18 changes: 18 additions & 0 deletions src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,24 @@
},
"imageType": "svgMono",
"url": "https://paste.libredirect.invalid"
},
"ultimateGuitar": {
"frontends": {
"freetar": {
"name": "Freetar",
"instanceList": true,
"url": "https://github.com/kmille/freetar"
}
},
"targets": ["^https?:\\/{2}(tabs\\.|www\\.)?ultimate-guitar\\.com"],
"name": "Ultimate Guitar",
"options": {
"enabled": false,
"unsupportedUrls": "bypass",
"frontend": "freetar"
},
"imageType": "svg",
"url": "https://www.ultimate-guitar.com"
}
}
}

0 comments on commit ff16ab4

Please sign in to comment.