Created
February 26, 2012 10:08
-
-
Save kageroh/1915799 to your computer and use it in GitHub Desktop.
ページのスクリプトが走る前にwindowオブジェクトに何か生やすGoogle Chrome用UserScriptサンプル
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 shingeki.js | |
// @namespace http://twitter.com/amasawa | |
// @include http://sp.pf.mbga.jp/12007160* | |
// @include http://sp.pf.mbga.jp/12008054* | |
// @run-at document-start | |
// ==/UserScript== | |
var script = document.createElement('script'); | |
script.textContent = '\ | |
ontouchstart = true;\ | |
orientation = true;\ | |
'; | |
document.addEventListener('DOMNodeInserted', function(event) { | |
document.removeEventListener('DOMNodeInserted', arguments.callee, false); | |
event.target.appendChild(script); | |
}, false) | |
// location.href = 'javascript:ontouchstart=true;orientation=true;void(0)'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment