// ==UserScript==
// @name        URL conversion | new reddit -> old reddit
// @namespace   https://localhost/
// @description simple regex based reddit redirection snippet
// @match       *://www.reddit.com/*
// @version     1
// @run-at      document-start
// @grant       none
// ==/UserScript==

(function fuckyoutube() {
    var url = window.location.toString();

    var findanddestroy = function (url) {
        if (url.indexOf('www.reddit.com') !== -1)
            return true;
        return false;
    }

    if (findanddestroy(url)) {
        unsafeWindow.window.location.replace(url.replace('www.reddit.com', 'old.reddit.com'));
    }
})();
