Created
October 3, 2022 13:43
-
-
Save jaeh/f5eb66a7a0f84d50c220beb170242d64 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ua = window.navigator.userAgent | |
var ios13 = ua.includes('mac') && 'ontouchend' in W.D | |
var iDevice = ['ipad', 'iphone', 'ipod'].some(device => ua.includes(device)) | |
var ios = iDevice || ios13 | |
var isWebxrViewer = ios && ua.includes('webxrviewer') | |
if (isWebxrViewer) { | |
var links = document.getElementsByTagName('a') | |
for (var id in links) { | |
if (links[id].target) { | |
links[id].target = undefined | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment