自分の使い方が、ランキング一覧ページではじめに一覧をざっとみて、その後、個別のページを開いていく、という感じなので、書いてみた。
順位の書いてあるあたりをクリックすると、その行全体の背景色が変わります。もう一度クリックすると、白の背景に変わります。
つーか、jQueryが便利すぎる。
bookmarklet版
javascript:(function(){document.body.appendChild(document.createElement('script')).src='http://www.ne.jp/asahi/shrkw/shrkw/jquery-latest.min.js'; setTimeout(function(){ $j = jQuery.noConflict(); $j('a.video').attr('target', '_blank'); $j('table.mb16auto td.rank_num').toggle(function(){$j(this).parent().css('background-color','#ffbbff')}, function(){$j(this).parent().css('background-color','white')});}, 2000)})();
GreaseMonkeyスクリプト版
http://www.ne.jp/asahi/shrkw/shrkw/nicovideo_watchafter.user.js
// ==UserScript== // @name NicoVideo_WatchAfter // @namespace d.hatena.ne.jp/shrkw // @include http://www.nicovideo.jp/ranking/* // ==/UserScript== (function () { function exec() { // copy from http://www.nabble.com/Greasemonkey-+-jquery-+-functions-t3890929s15494.html var GM_JQ = document.createElement('script'); GM_JQ.src = 'http://www.ne.jp/asahi/shrkw/shrkw/jquery-latest.min.js'; GM_JQ.type = 'text/javascript'; document.getElementsByTagName('head')[0].appendChild(GM_JQ); // Check if jQuery's loaded function GM_wait() { if (typeof unsafeWindow.jQuery == 'undefined') { window.setTimeout(GM_wait, 100); } else { $j = unsafeWindow.jQuery.noConflict(); letsJQuery(); } } GM_wait(); function letsJQuery() { $j('a.video').attr('target', '_blank'); $j('table.mb16auto td.rank_num').toggle(function(){$j(this).parent().css('background-color','#ffbbff')}, function(){$j(this).parent().css('background-color','white')}); }; }; // delayed execute for except conflict of executing setTimeout(exec, 500); } )();