---
slug: "disqus-twitter-javascript"
title: "If You Use Disqus, There Might Be Issues with External Site Links When Displaying Pages in the iOS Twitter App"
description: "If you are using Disqus for your blog's comment system"
url: "https://www.ytyng.com/en/blog/disqus-twitter-javascript"
publish_date: "2016-09-14T09:50:23Z"
created: "2016-09-14T09:50:23Z"
updated: "2026-02-26T19:06:36.242Z"
categories: []
keywords: ""
featured_image_url: "https://media.ytyng.com/resize/20230812/aa3e3081390e40eeb9c8de31c780cd22.png.webp?width=768"
has_video: false
has_music: false
video_urls: []
music_urls: []
lang: "en"
---

# If You Use Disqus, There Might Be Issues with External Site Links When Displaying Pages in the iOS Twitter App

<p>If you are using Disqus for your blog's comment system</p>
<p>When viewing the page in an iOS Twitter client app and clicking on a link to an external site, it resulted in a blank page without transitioning properly.</p>
<p>Initially, I couldn't figure out the cause, but it seemed that the Disqus JS was the problem. (When Disqus JS is loaded, it attaches strange methods to the link event handlers)</p>
<p>Since I wanted to continue using Disqus, I decided to disable Disqus JS only when accessed from the Twitter client.</p>
<p>You can determine if the client is Twitter by checking the User-Agent. Here's a simple way to do it:</p>
<p>var isTwitter = navigator.userAgent.match(/Twitter/);</p>
<p></p>
