Skip to content

Instantly share code, notes, and snippets.

@kageroh
Created May 10, 2012 09:43
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kageroh/2652176 to your computer and use it in GitHub Desktop.
Save kageroh/2652176 to your computer and use it in GitHub Desktop.
神撃のバハムート,戦国サーガ,バトルスピリッツ 覇者の咆哮をGoogle Chromeで遊ぶためのUserScript(チュートリアル対応版)(ついでにモンハン カードマスターもできる)
// ==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