Created
January 3, 2014 21:00
-
-
Save arantius/8246475 to your computer and use it in GitHub Desktop.
Test script for Greasemonkey issue 1836
This file contains hidden or 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 testttt | |
// @namespace testtt | |
// @match http://www.greasespot.net/* | |
// @grant unsafeWindow | |
// ==/UserScript== | |
unsafeWindow.history.EXreplaceState = unsafeWindow.history.replaceState; | |
unsafeWindow.history.EXXreplaceState = history.replaceState; | |
function myf() | |
{ | |
window.history.EXXXreplaceState = window.history.replaceState; | |
window.history.EWreplaceState = history.replaceState; | |
history.EWWreplaceState = history.replaceState; | |
} | |
function inject(func) | |
{ | |
var source = func.toString(); | |
var script = document.createElement('script'); | |
script.text = "("+ source +")()"; | |
document.head.appendChild(script); | |
} | |
inject(myf); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment