Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# based on
if window.navigator.standalone?
noddy = false
remotes = false
document.addEventListener 'click', (event) ->
noddy =
while noddy.nodeName isnt 'A' and noddy.nodeName isnt 'HTML'
noddy = noddy.parentNode
if noddy.href? and !!~ noddy.href.indexOf('http') and (!!~ noddy.href.indexOf( || remotes)
document.location.href = noddy.href
, false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment