When user clicks link with custom protocol (like myapp://superlink)
I need either launch an app or allow user to download and run configuration app
Update to Korono's answer, this worked for me:
$(function() {
var timeIndex;
$("a[href*='myapp://']").blur(function(e)
{
clearTimeout(timeIndex);
});
$("a[href*='myapp://']").click(function(e)
{
var el = $(this);
timeIndex = setTimeout(function() {
window.location = el.attr("data-href-alt");
}, 200);
// once you do the custom-uri, it should properly execute the handler, otherwise, the settimeout that you set before will kick in
window.location = el.attr("href");
e.preventDefault();
});
});