-
-
Save steve228uk/0d40936eb27be445608a to your computer and use it in GitHub Desktop.
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
window.onload = function() { | |
var desktopFallback = "https://youtube.com/watch?v=4KnNVK-udTU", | |
mobileFallback = "https://youtube.com/watch?v=4KnNVK-udTU", | |
app = "vnd.youtube://4KnNVK-udTU"; | |
if( /Android|iPhone|iPad|iPod/i.test(navigator.userAgent) ) { | |
window.location = app; | |
window.setTimeout(function() { | |
window.location = mobileFallback; | |
}, 25); | |
} else { | |
window.location = desktopFallback; | |
} | |
function killPopup() { | |
window.removeEventListener('pagehide', killPopup); | |
} | |
window.addEventListener('pagehide', killPopup); | |
}; | |
</script> | |
</body> | |
</html> |
Best help!
Thanks
Oh my god .. Thank you ..
Well Done bro! Very Nice job. Buddy can you share a code to check browser in the phone and open the link in that app.Similar to this code but at the place of youtube it could be a browser and the place of channel link,it could be a website url.
Doesnt seem to be working anymore? Just tried on Android Chrome/Brave/Firefox.. It opens the YT video in the browser itself.
Thank You.. it working
It works fine with me as well. But when I share it, it appear as coming from my domain. While people using professional deep linking portal the link appear as being from youtube with the same Thumbnail. I wonder if the code can be modified so the shared post looks the same
Looking for a way to deeplink YT for free, found this. So does this need to be hosted on a domain and then will take the viewer straight to the app?
This is great, thanks.
I've been using it for a while, it worked perfectly, now it's working except on Facebook, it doesn't even fallback to the webpage, just loads white blank page! Any ideas?
Can we do something like this for other apps? Like Instagram, Facebook, Twitter etc?
Thank you, the code works great on Android and iPhone
https://www.facebook.com/as7aby/posts/10228785413441705?__cft__[0]=AZV90WiqjECtqm4Jo282HQC88-oY87Ui8kuWbjj5wW6sSFtZDmB8vRtMm_RQvANEcfsdBn4Cmbnw1XN0KcqHBLGmUcgoj7hyB6VnW3UeYwd7_Zv6HhP6T6MB8Z-f0fHOP2g&__tn__=%2CO%2CP-R
Thank you!
Thank You..