deferer – Opt-Out of Reddit (and Anywhere Else)

After reading @raganwald’s post about leaving Reddit, I wanted to make an easy way for individuals to prevent their content from being submitted to, and generating profit for, Reddit. In an internet where companies are increasingly making a business of monetizing someone else’s work, it’s important to be able to choose to opt yourself out of their system if their business practices are repellent.

deferer is a tiny JS library with no external dependencies that quietly watches your HTTP referer for unwanted hosts, and redirects offending traffic elsewhere. To include it on a site, just drop this snippet into the `<head>` tag of your HTML document:

<script type="text/javascript">
  ;(function() {
    var dfrr = document.createElement('script'); dfrr.type = 'text/javascript'; dfrr.async = true;
    dfrr.src = 'https://deferer.s3.amazonaws.com/1.0.0/deferer.min.js';
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(dfrr, s);
  })();
</script>

By default, traffic from `reddit.com` will be redirected to a popular YouTube video likely to garner downvotes on the site. If you want to change which hosts are blocked, or set a different URL as your redirect, you can pass configuration in to the script as well:

<script type="text/javascript">
  var _deferer = {};
  _deferer['hosts'] = ['reddit.com', 'voat.co', 'donotlink.com'];
  _deferer['redirect'] = 'http://google.com/';

  ;(function() {
    var dfrr = document.createElement('script'); dfrr.type = 'text/javascript'; dfrr.async = true;
    dfrr.src = 'https://deferer.s3.amazonaws.com/1.0.0/deferer.min.js';
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(dfrr, s);
  })();
</script>

By making it more difficult to share deferer-ed content on Reddit and other platforms, your site will organically contribute less to their bottom line and prevent participation in communities that you don’t want to be a part of.

The source is available at dominic/deferer on GitHub under the MIT license. Feature requests welcome and desired.


Thoughts? Say hi on Twitter: @dddagradi.

deferer – Opt-Out of Reddit (and Anywhere Else)