Skip to content

Instantly share code, notes, and snippets.

@edvakf edvakf/jaro.user.js forked from snaka/jaro.user.js
Created Jul 23, 2009

Embed
What would you like to do?
// ==UserScript==
// @name jaro
// @namespace http://d.hatena.ne.jp/edvakf/
// @include http://www.google.co.jp/search*
// @include http://www.google.com/search*
// @license MIT license (http://www.opensource.org/licenses/mit-license.php)
// ==/UserScript==
// original script : https://gist.github.com/149474/35164ef7a57b2505097ca19e2af81d20f7ad00a6
// modified by : edvakf
// modified to use window.AutoPagerize.addDocumentFilter
(function(fun) {
if (!window.opera) fun(document);
else window.addEventListener('DOMContentLoaded', function(){
fun(document)
}, false);
if (window.AutoPagerize) window.AutoPagerize.addDocumentFilter(fun);
window.addEventListener('GM_AutoPagerizeLoaded', function(){
window.AutoPagerize.addDocumentFilter(fun);
}, false);
window.addEventListener('AutoPatchWork.DOMNodeInserted', function(e){
fun(e.target);
}, false);
})(function(doc) {
var sites = [
/^http:\/\/\w+\.designlinkdatabase\.net\//,
/^http:\/\/\w+\.thumbnailcloud\.net\//,
/^http:\/\/\w+\.rightclicksright\.(net|org|biz|info)\//,
/^http:\/\/\w+\.designiddatabase\.net\//,
/^http:\/\/\w+\.designrecipedatabase\.net\//,
/^http:\/\/\w+\.basefeed\.net\//,
/^http:\/\/buzzurl\.jp\//,
/^http:\/\/b\.hatena\.ne\.jp\//,
/^http:\/\/k\.hatena\.ne\.jp\/keywordblog\//,
/^http:\/\/d\.hatena\.ne\.jp\/keyword\//,
/^http:\/\/clip\.livedoor\.com\//,
/^http:\/\/\w+\.pg-feed\.com\//,
/^http:\/\/clip\.nifty\.com\//,
/^http:\/\/bookmark\.fc2\.com\//,
/^http:\/\/bookmarks.yahoo.co.jp\//,
/^http:\/\/www\.blogpet\.net\/bookmark\//,
/^http:\/\/swik\.net\//,
/^http:\/\/www\.choix\.jp\//,
/^http:\/\/pookmark\.jp\//,
/^http:\/\/faves\.com\//,
/^http:\/\/mark\.jolt\.jp\//,
/^http:\/\/.*?\.clipp\.in\//,
/^http:\/\/twib\.jp\//,
/^http:\/\/tech\.newzia\.jp\//,
/^http:\/\/okyuu\.com\//,
/^http:\/\/www\.wdclip\.com\//,
/^http:\/\/www\.soukyu-mugen\.com\//,
/^http:\/\/script-scrap\.com\//,
/^http:\/\/www\.cssclip\.com\//,
/^http:\/\/www\.tarikin\.net\//,
/^http:\/\/www\.marici\.com\//,
/^http:\/\/tyudon\.com\/blog\//,
/^http:\/\/newsing\.jp\//,
/^http:\/\/i\.pecipeci\.net\/hb\//,
/^http:\/\/\w+\.pg-feed\.com\//,
/^http:\/\/script-scrap\.com\//,
/^http:\/\/1470\.net\//,
/^http:\/\/friendfeed\.com\//,
/^http:\/\/d\.hatena\.ne\.jp\/f-star\//,
/^http:\/\/synclick\.jp\//,
/^http:\/\/tweetbuzz\.jp\/entry\//,
/^http:\/\/www\.tagli\.org\/entry\//,
/^http:\/\/www\.honjala\.net\//,
/^http:\/\/(?:\w+.)?atpedia\.jp\//,
/^http:\/\/wadainfo\.jp\//,
/^http:\/\/hatenatunnel\.appspot\.com\//,
/^http:\/\/ceron\.jp\//,
/^http:\/\/ja\.efreedom\.com\//,
/^http:\/\/ja\.w3support\.net\//,
/^http:\/\/www\.megajoin\.com\//,
/^http:\/\/vidtaker\.com\//,
/^http:\/\/ja\.nulledzone\.info\//,
// English Google
/^http:\/\/www\.fixya\.com\//,
/^http:\/\/en\.kioskea\.net\//,
/^http:\/\/www\.recipester\.org\//,
/^http:\/\/www\.wordnik\.com\//,
/^http:\/\/efreedom\.com\//,
/^http:\/\/(\w+?\.)?recipester\.org\//,
/^http:\/\/www\.questionhub\.com\//,
/^http:\/\/www\.expert\.tc\//,
/^http:\/\/(\w+?\.)?generation-nt\.com\//,
/^http:\/\/www\.nujk\.com\//,
// OKWave spam
/^http:\/\/oshiete\.goo\.ne\.jp\//,
/^http:\/\/(.+?\.)?okwave\.jp\//,
/^http:\/\/oshiete\.sponichi\.co\.jp\//,
/^http:\/\/oshiete\.searchina\.ne\.jp\//,
/^http:\/\/questionbox\.jp\.msn\.com\//,
/^http:\/\/oshiete\.homes\.jp\//,
/^http:\/\/oshiete1\.goo\.ne\.jp\//,
/^http:\/\/qa\.moura\.jp\//,
/^http:\/\/qa\.cyzo\.com\//,
/^http:\/\/oshiete\.gogaku-ryugaku\.net\//,
/^http:\/\/ziddy\.japan\.zdnet\.com\//,
/^http:\/\/soudan1\.biglobe\.ne\.jp\//,
/^http:\/\/oshiete1\.watch\.impress\.co\.jp\//,
/^http:\/\/soudan\.qa\.excite\.co\.jp\//,
/^http:\/\/nandemo\.fruitmail\.net\//,
/^http:\/\/qanda\.rakuten\.ne\.jp\//,
/^http:\/\/otasuke\.goo-net\.com\//,
/^http:\/\/oshiete\.home4u\.jp\//,
/^http:\/\/www\.mag2qa\.com\//
];
var forEach = Array.prototype.forEach;
forEach.call(doc.querySelectorAll('li h3>a:nth-child(1)'),
function(ele) {
sites.forEach(function(site) {
if (site.test(ele.href)) {
var par = ele.parentNode;
while ((ele = par, par = par.parentNode) && !(ele instanceof HTMLLIElement)) {
forEach.call(par.children, function(sibling) {
if (sibling != ele) {
sibling.style.display = 'none';
}
});
}
ele.style.opacity = '0.3';
}
});
}
)
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.