Created
May 10, 2012 09:43
-
-
Save kageroh/2652176 to your computer and use it in GitHub Desktop.
神撃のバハムート,戦国サーガ,バトルスピリッツ 覇者の咆哮を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* | |
// @include http://sp.pf.mbga.jp/12009496* | |
// @include http://sp.pf.mbga.jp/12008982* | |
// @run-at document-start | |
// ==/UserScript== | |
var script = document.createElement('script'); | |
script.textContent = '\ | |
(function () {\ | |
window.ontouchstart = function () {};\ | |
window.orientation = 0;\ | |
document.createTouch = function () {};\ | |
document.ontouchstart = function () {};\ | |
window.chrome = null;\ | |
Object.defineProperty(navigator, "platform", { get: function () { return "iPhone"; } });\ | |
}());\ | |
'; | |
if (!/tutorial/.test(location.href) || /12008982/.test(location.href)) { | |
document.addEventListener('DOMNodeInserted', function (event) { | |
document.removeEventListener('DOMNodeInserted', arguments.callee, false); | |
event.target.appendChild(script); | |
script.parentNode.removeChild(script); | |
}, false); | |
} else { | |
location.href = 'javascript:' + script.textContent; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment