Created
February 13, 2014 01:55
-
-
Save gozen-bro3/8968322 to your computer and use it in GitHub Desktop.
1件のみの敵襲ランプを非表示にする
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== | |
// @id bro3_noAlarm | |
// @name 1件のみの敵襲ランプを非表示にする | |
// @version 1.01 | |
// @include http://m*.3gokushi.jp/village.php* | |
// @run-at document-end | |
// ==/UserScript== | |
// 2013.04.26 要望があったので作成 | |
(function(){ | |
var action1 = xpath('//div[@id="action"]/div[@class="floatInner"]/ul/li', document); | |
var action4 = xpath('//div[@id="action"]/div[@class="floatInner"]/ul/li', document); | |
var len = action1.snapshotLength; | |
for (var i=0;i<len;i++){ | |
if (action4.snapshotItem(i).innerHTML.replace(/\n/g, "").replace(/\r/g, "").indexOf("敵襲</a>1 ") > 0){ | |
xpath('//div[@id="statusIcon"]/a/img', document).snapshotItem(0).src = "./20130426-01/extend_project/w760/img/common/icon_header_status_no.gif"; | |
} | |
} | |
})(); | |
function xpath(query,targetDoc) { | |
return document.evaluate(query, targetDoc, null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment