Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Disqus comments widget: on-demand
! Title: Disqus click-to-load
# Copy-paste the static filters below into your "My filters" pane in the
# dashboard.
# Purpose is to load Disqus comments on demand only, so that no connection
# to `disqus.com` occurs by default when you land on a site which uses
# Disqus comments widget.
# Not connecting to Disqus by default is a good thing for such a
# ubiquitous server as `disqus.com`, which can be used to build a
# profile of your browsing habits, even if you have no account with
# Disqus. This also helps web pages containing the Disqus widget to
# load faster.
# These filters will cause a button labeled:
# "Disqus blocked by uBlock Origin: click to unblock" to be embedded
# where Disqus comments would normally be loaded. Click the button
# to force the comments to be loaded.
# Be sure your filter lists are up to date, new resources have been
# added today to make these filters work.
||disqus.com/forums/*/embed.js$script,redirect=disqus.com/forums/*/embed.js
||disqus.com/embed.js$script,redirect=disqus.com/embed.js
||disqus.com/count.js$script
@@||disqus.com/embed.js?_=1457540*$script
@gorhill

This comment has been minimized.

Copy link
Owner Author

commented Mar 9, 2016

a

@gorhill

This comment has been minimized.

Copy link
Owner Author

commented Mar 9, 2016

You can also simply use the URL to the raw version of the current Gist as an external filter list:
https://gist.github.com/gorhill/ef1b62d606473c68d524/raw/90edb7864ee40d49c8f29ad4f2f1aded08e60c6c/gistfile1.txt

a

@collinbarrett

This comment has been minimized.

Copy link

commented Apr 14, 2016

I've been using this gist as an external subscription for a few weeks, and it works really well. I love having Disqus blocked by default. Is the plan to roll this into one of the other primary lists? Maybe it already has been and I missed it?

@gorhill

This comment has been minimized.

Copy link
Owner Author

commented Apr 28, 2016

Is the plan to roll this into one of the other primary lists?

That would be the ideal, but I want to think long and hard about how this could be best implemented.

@gitarra

This comment has been minimized.

Copy link

commented Aug 28, 2016

This does not work on the Ubuntu MATE blog:

https://ubuntu-mate.org/blog/ubuntu-mate-yakkety-beta1/

The Disqus comments on the bottom of the page load automatically.

@gitarra

This comment has been minimized.

Copy link

commented Dec 30, 2016

Here is a page where the comments cannot be viewed at all. The button to load them does not show up.

https://atlee.ca/blog/posts/2016-releng-retrospective.html

@gitarra

This comment has been minimized.

Copy link

commented Jan 27, 2017

Here is a page that is broken completely, infinite spinner, the page does not load at all.

https://sietch-tabr.tumblr.com/post/156437385832/thunderbird-testing-effort

@dsedivec

This comment has been minimized.

Copy link

commented Apr 2, 2017

Medium mode users: I had to add * disqus.com * noop to my dynamic rules, otherwise the * * 3p-script block rule would just block the new script element inserted by these rules. (I welcome a better dynamic rule, perhaps one that isn't so permissive!)

And in case anyone else is interested, here is the JavaScript run by the above redirect rule (as of this writing).

@Alexdiff

This comment has been minimized.

Copy link

commented May 8, 2019

not work on igg-games.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.