Last active
May 18, 2019 20:10
-
-
Save heavyLobster2/77c55e7574af635dc0df359199b231c7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Redirect Tumblr Safe Mode | |
// @description Redirects Tumblr safe mode blogs to Tumbex | |
// @version 1.0.0 | |
// @author heavyLobster2 | |
// @namespace github.com/heavyLobster2 | |
// @downloadURL https://gist.github.com/heavyLobster2/77c55e7574af635dc0df359199b231c7/raw/RedirectTumblrSafeMode.user.js | |
// @match *://*.tumblr.com/safe-mode?* | |
// @run-at document-start | |
// @grant none | |
// ==/UserScript== | |
(function () { | |
"use strict"; | |
var originalUrlString = (new URL(window.location.href)).searchParams.get("url"); | |
if (originalUrlString && originalUrlString.length > 0) { | |
var blogName = (new URL(originalUrlString)).hostname.split(".")[0]; | |
window.location.replace("https://www.tumbex.com/" + blogName + ".tumblr"); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment