0086名無しさん@お腹いっぱい。
2014/01/15(水) 06:21:44.92ID:dWiOquod0JSなんかまったくわからなかった俺がグーグル先生だけを頼りに書いてみた結果。
Fx25以外未確認。
// yahooauc_noyp.js
function createAlert() {
var s = document.createElement('p');
s.style.cssText = 'color:red; font-weight:bold;';
s.innerHTML = 'かんたん決済非対応';
return s;
}
function isAcceptYP() {
var p = document.evaluate('id("modTitBar")/descendant::td[2]/img', document, null, 7, null);
for (var i = 0; i < p.snapshotLength; i++) {
if (p.snapshotItem(i).title == 'Yahoo!かんたん決済') return true;
}
return false;
}
window.onload = function() {
if (isAcceptYP()) return;
var p = document.evaluate('id("modSellInfo")/descendant::a[@rel="auction:PaymentLink"]', document, null, 9, null).singleNodeValue;
p.parentNode.appendChild(createAlert());
p = document.evaluate('//a[@name="aboutpayment"]/following-sibling::div[@class="untBody"][1]', document, null, 9, null).singleNodeValue;
p.insertBefore(createAlert(), p.firstChild);
}