Created
July 7, 2012 14:54
-
-
Save Ventero/3066765 to your computer and use it in GitHub Desktop.
location.replace test for GM
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 location.replace test | |
// @namespace test | |
// @include * | |
// @version 1 | |
// @grant GM_addStyle | |
// ==/UserScript== | |
if(window.location.href.indexOf("anchor") == -1) { | |
alert("Replacing location"); | |
window.location.replace('#anchor'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment