about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/assets/javascripts/services.js12
-rw-r--r--src/config.json6
2 files changed, 17 insertions, 1 deletions
diff --git a/src/assets/javascripts/services.js b/src/assets/javascripts/services.js
index 94d8d980..417f66c3 100644
--- a/src/assets/javascripts/services.js
+++ b/src/assets/javascripts/services.js
@@ -565,6 +565,15 @@ function rewrite(url, frontend, randomInstance) {
 
       return `${randomInstance}${url.pathname}${url.search}`
     }
+    case "ytify": {
+      if (url.pathname.startsWith('/watch')) return `${randomInstance}/?s=${encodeURIComponent(url.searchParams.get('v'))}`
+
+      const channelReg = /\/channel\/([^\/]+)/.exec(url.pathname)
+      if (channelReg) return `${randomInstance}/list?channel=${channelReg[1]}`
+
+      if (url.pathname.startsWith('/playlist')) return `${randomInstance}/list?playlists=${encodeURIComponent(url.searchParams.get('list'))}`
+      return `${randomInstance}${url.pathname}${url.search}`
+    }
     case "piped":
     case "pipedMaterial":
     case "cloudtube":
@@ -818,7 +827,8 @@ const defaultInstances = {
   freetar: ["https://freetar.de"],
   ratAintTieba: ["https://rat.fis.land"],
   shoelace: ["https://shoelace.mint.lgbt"],
-  skunkyArt: ["https://skunky.bloat.cat/"],
+  skunkyArt: ["https://skunky.bloat.cat"],
+  ytify: ["https://ytify.netlify.app"],
 }
 
 function initDefaults() {
diff --git a/src/config.json b/src/config.json
index a4abc44e..16bd9076 100644
--- a/src/config.json
+++ b/src/config.json
@@ -125,6 +125,12 @@
           "embeddable": false,
           "instanceList": true,
           "url": "https://github.com/ViewTube/viewtube"
+        },
+        "ytify": {
+          "name": "ytify",
+          "embeddable": false,
+          "instanceList": true,
+          "url": "https://github.com/n-ce/ytify/"
         }
       },
       "targets": [