Add back twitter deep linking

This commit is contained in:
Thomas Smith 2023-02-07 19:22:21 -05:00
parent 93f6dd14b0
commit d2edc6b4bb

View file

@ -91,3 +91,16 @@
});
});
</script>
<!-- Deep-linking script for Twitter follow button -->
<script>
document.getElementById("follow-button").addEventListener("click", function() {
if (navigator.userAgent.match(/iPhone|iPad|iPod/i)) {
window.location.href = "twitter://user?screen_name=teaxyz";
} else if (navigator.userAgent.match(/Android/i)) {
window.location.href = "twitter://user?screen_name=teaxyz";
} else {
window.location.href = "https://twitter.com/teaxyz";
}
});
</script>