Created
September 6, 2015 19:35
-
-
Save nsuan/d37703798d7d4b68f323 to your computer and use it in GitHub Desktop.
auto redirect for tumblr url changes
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
<script> | |
var oldname = 'barkentin'; | |
var newname = 'tevruden'; | |
var page = document.URL; | |
if(page.indexOf("/post/") > -1) { | |
var url = page.replace(oldname, newname); | |
setInterval(function () { window.location.href = url;}, 2000); | |
} | |
if(page.indexOf("/tagged/") > -1) { | |
var url = page.replace(oldname, newname); | |
setInterval(function () { window.location.href = url;}, 2000); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment