Twitter share button renders as hypertext link


This happens when certain extensions are enabled. The URL shared by this hypertext is also incorrect as it does not share what I ask it to share (shares current url). Below is what I see in developer tools


Can I detect this in my code somehow ?


A quick search for “net::ERR_BLOCKED_BY_CLIENT” and JavaScript mention AdBlock clients may block Twitter’s JavaScript.

Adding an Easylist filter list subscription to your ad blocker configuration may block Twitter’s widget JavaScript from loading in your browser.

Adding an exception rule through your ad blocking software’s should allow you to override the choices made by your subscribed, auto-updating filter list. Examples for Adblock Plus:

Based on those documents the following additional filter should allow content:

You may attach an event to the script element or the resource loader on your page to detect when Twitter’s widgets JavaScript has loaded or has failed to load within your expected timeframe.

If your webpage uses JavaScript factory functions you may want to insert your own fallback content or message in the expected render area if the JavaScript fails to load.

Note: Twitter’s JavaScript may fail to load for reasons similar to an ad blocker such as an entire country blocking access to Twitter.


How can I detect whether Twitter’s widgets js has loaded or not ? What will be the best indicator ? I am unable to pin point a particular event which when fired tells widgets js has loaded.


You may record when Twitter’s widgets JavaScript has cleared the twttr.ready asynchronous JavaScript function queue by passing your callback to twttr.ready().

You can attach events to the script element you use on the page to track the load event on the resource or other customizations for your specific use.

closed #5