Imgur Old Design

Restores the old imgur Home page

Click here to install Browse More Scripts
// ==UserScript==
// @name         Imgur Old Design
// @namespace    24e9d0d286ee3808d404284e82e564c49c6704bb
// @version      0.2
// @description  Restores the old imgur Home page
// @author       /u/AyrA_ch
// @match        https://imgur.com/
// @grant        none
// @run-at       document-start
// ==/UserScript==

// Changelog
// 0.2: Support new "frontpagebetav2" cookie
// 0.1: Support "frontpagebeta" cookie

(function () {
	'use strict';
	//Extract all cookies
	var cookies = document.cookie.split("; ").map(function (v) {
			var eq = v.indexOf('=');
			return {
				name: v.substr(0, eq),
				value: decodeURIComponent(v.substr(eq + 1))
			};
		});

	var setCookie = function (name) {
		//Get frontpage cookie
		var fp = cookies.filter(function (v) {
				return v.name === name
			})[0];
		//Overwrite/create cookie if needed
		if (fp === undefined || fp.value !== "0") {
			document.cookie = name + "=0; domain=.imgur.com; expires=" + (new Date(2032, 0, 1)).toUTCString();
			return true;
		}
		return false;
	}
	if (setCookie("frontpagebeta") || setCookie("frontpagebetav2")) {
		if (window.stop) {
			window.stop();
		}
		location.reload();

	}
})();

/*
LICENSE:
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
The full license text can be found here: http://creativecommons.org/licenses/by-nc-sa/4.0/
The link has an easy to understand version of the license and the full license text.

DISCLAIMER:
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
*/

Copyright © 2018 by Kevin Gut 📧 | More services | Generated for 44.192.54.67