diff --git a/src/assets/images/ultimateGuitar-icon.svg b/src/assets/images/ultimateGuitar-icon.svg new file mode 100644 index 0000000..5f587c3 --- /dev/null +++ b/src/assets/images/ultimateGuitar-icon.svg @@ -0,0 +1 @@ + diff --git a/src/assets/javascripts/services.js b/src/assets/javascripts/services.js index 3934784..cc10b75 100644 --- a/src/assets/javascripts/services.js +++ b/src/assets/javascripts/services.js @@ -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": @@ -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() { diff --git a/src/config.json b/src/config.json index 9728cdc..5ce6031 100644 --- a/src/config.json +++ b/src/config.json @@ -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" } } }