> 2013/07/05 (金) 20:56:28 ◆ ▼ ◇ [qwerty]> > 楽天市場の糞長いページを短縮してくれるアドオンをお願いします
> 検索結果のリストトップにゴミが一覧化される奴なら対処する奴を昔書いた
void hanakusoman( void ) {
> // ==UserScript==
> // @name 楽天の検索結果をキレイにする
> // @namespace jp.x5890veg725b4eet0q6owswmefn7nyfkk59yclbz2cnh64v55uo3dold
> // @include http://search.rakuten.co.jp/search/*
> // @include https://search.rakuten.co.jp/search/*
> // @include https://auction.item.rms.rakuten.co.jp/*
> // @version 1.2
> // @grant none
> // ==/UserScript==
> // memo
> // http://ja.wikipedia.org/wiki/XML_Path_Language
> (function () {
> var i = 0;
> var count = 0;
> var node = null;
> // 検索に引っかかる広告を消す(その要素自体を消す)
> var ads = document.evaluate(
> "//div[@id='rsrSkyscraper'] | \
> //span[@id='adsDisplayArea'] | \
> //a[contains(@href, 'http://kobo.rakuten.co.jp')]",
> document.documentElement,
> null,
> XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,
> null
> );
> count = ads.snapshotLength;
> console.log("LOG>>ads counts: " + count);
> for(i=0; i<count; i++) {
> node = ads.snapshotItem(i);
> node.style.display = "none";
> }
> })();
}
hanakusoman();
参考:2013/07/05(金)20時54分22秒