Created
August 1, 2013 00:31
-
-
Save 5zen/6127512 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
// ==UserScript== | |
// @name mc_busyodas_oldredraw | |
// @description MC☆あくしず ブショーダス破棄旧仕様化 | |
// @include http://*.bmcaxis.jp/busyodas/busyodas_result.php* | |
// @icon https://raw.github.com/5zen/mc_beyond/master/icon.png | |
// @version 0.01 | |
// ==/UserScript== | |
// 2013.08.01 ブラ三のツールから移植 | |
//グローバル変数 | |
var VERSION = "0.01"; //バージョン情報 | |
var d = document; | |
var $v = function(key) { return d.evaluate(key, document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); }; | |
// メイン | |
(function(){ | |
// 拠点画面なら実行 | |
if (location.pathname == "/busyodas/busyodas_result.php") { | |
var button1 = $v('//a[@class="thickbox ie6pngfix"]'); | |
var button2 = $v('//div[contains(@id,"card_draw_again_check")]//a'); | |
var clickScript = button2.snapshotItem(0).getAttribute("href").replace("javascript:",""); | |
var text = "if( confirm(\"このカードを破棄してもう一度引いてよろしいですか?\\n\\n※破棄すると、AP30を獲得します。\\n※同じカードを重複して引く場合もあります。\") ){ "+ clickScript + "; return true; } return false"; | |
button1.snapshotItem(0).removeAttribute("class",""); | |
button1.snapshotItem(0).removeAttribute("href",""); | |
button1.snapshotItem(0).setAttribute("onClick",text); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment