Created
January 25, 2014 17:30
-
-
Save Ventero/8620099 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
<!DOCTYPE html> | |
<html> | |
<head><title>GM #1494 test</title></head> | |
<body> | |
<button onclick="sendEvent();">Click</button> | |
<script> | |
var div = document.createElement("div"); | |
function sendEvent() { | |
div.click(); | |
} | |
window.addEventListener("load", function(){ | |
// this call goes through | |
div.addEventListener("click", sandbox.GM_openInTab, false); | |
// this is blocked by apiLeakCheck | |
div.addEventListener("click", function(){ | |
sandbox.GM_openInTab("foo"); | |
}, false); | |
},false); | |
</script> | |
</body> | |
</html> |
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 GM #1494 test | |
// @namespace ventero.de | |
// @include http://localhost/gm1494.html | |
// @version 1 | |
// @grant GM_openInTab | |
// ==/UserScript== | |
unsafeWindow.sandbox = this; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment