//Youtube++ 🔽 Core /* By: Sethu Senthil https://sethusenthil.com Go to https://shourtcuts.sethusenthil.com for more cool shortcuts! Instagram: https://instagram.com/sethui9 Twitter: https://instagram.com/sethusenthilll TikTok: https://www.tiktok.com/@sethusenthil Reddit: https://www.reddit.com/user/Sethu_Senthil Don't touch the file unless you actually know what you doin! */ /*let url = "https://youtu.be/feq6MOg3qpA"; let citem = "Background Play"; let wVer = "2.3";*/ if (wVer != "2.3") { let alert = new Alert(); alert.title = "YouTube++ shortcut out if date"; alert.message = "You will be redirected to the update page"; alert.addAction("OK") await alert.presentAlert() Safari.open("https://routinehub.co/download/15815") } else { // Construct the full URL for the request const apiUrl = `https://ytdl.hamsterlabs.de/?url=${encodeURIComponent(url)}`; // Make an HTTP request (for video url in google servers) let request = new Request(apiUrl); let htmlString = await request.loadString(); let vidURL = htmlString.split('360p')[1].split('')[1].split('')[0]; if (citem == "Background Play" || citem == null) { await Safari.open("vlc://" + vidURL); Pasteboard.copy("https://shortcuts.sethusenthil.com/youtube/index.html#" + vidURL + "&title=" + videoTitle) await Safari.open("shortcuts://run-shortcut?name=YouTube%20%2B%2B%20%20%E2%96%B6%EF%B8%8F&input=" + "playonly") } else { if (citem == "Download Video") { await Safari.open("vlc://" + vidURL); await Safari.open("shortcuts://run-shortcut?name=YouTube%20%2B%2B%20%20%E2%96%B6%EF%B8%8F&input=" + "video") } else if (citem == "Download Audio") { Safari.open("shortcuts://run-shortcut?name=YouTube%20%2B%2B%20%20%E2%96%B6%EF%B8%8F&input=" + "audio") } } let web = new WebView(); await web.loadURL("https://shortcuts.sethusenthil.com/ytbackground/#" + wVer); await web.present(false) } let versionName = "initTitle" let identity = "shajajq737$27"