Compact Reddit

One of my User Scripts.

Everyone knows about, but I suspect that interface will eventually be removed. There's another interface called the "compact" interface that can be accessed by appending any reddit URL with .compact. I don't know if they'll remove it, but it's what I tend to use, and this script automates it.

// ==UserScript==
// @name               Compact Reddit
// @namespace
// @description        Redirect to the little-known "compact" interface for Reddit
// @include            *://*
// @version            0.1
// @run-at             document-start
// @author             rpdillon
// @grant              none
// @icon     
// ==/UserScript==

if (!window.location.pathname.endsWith(".compact")) {
  window.location.replace(window.location.origin + 
                          window.location.pathname + 
                          ".compact" +