Old Reddit button

Provides a button to go to the same page on old.reddit when accidentally ending up on new Reddit.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Old Reddit button
// @version      1.0
// @description  Provides a button to go to the same page on old.reddit when accidentally ending up on new Reddit.
// @author       Phoenix
// @include      https://*.reddit.com/*
// @exclude	     https://old.reddit.com/*
// @grant        none
// @license      MIT
// @namespace https://greasyfork.org/users/952476
// ==/UserScript==

(function() {
  'use strict';
  var node;
  node = document.createElement("DIV");
  node.style = `
  	    display: flex;
		justify-content: center;
		align-items: center;
		position: fixed;
		top: 9px;
		left: 135px;
		width: 160px;
		height: 30px;
		background-color: red;
		border-radius: 15px;
		z-index: 1000;
		cursor:pointer;
		color: #fff;
		font-weight: bold;`;
  node.textContent = "Switch to old.reddit";
  node.addEventListener("click", function() {location.href = location.href.replace('https://www.','https://old.').replace('https://new.','https://old.'); });
  document.body.appendChild(node);
})();