Created
May 3, 2012 12:14
-
-
Save j3tm0t0/2585265 to your computer and use it in GitHub Desktop.
NicoNico Ranking Filter (switch view all or newly uploaded with 'v' key)
This file contains hidden or 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== | |
// @name NiconicoToggleNew | |
// @namespace j3tm0t0.gmail.com | |
// @description Toggle Showing All or New | |
// @include http://www.nicovideo.jp/ranking/* | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js | |
// ==/UserScript== | |
(function(){ | |
var onKeyDown = function(event) | |
{ | |
var code = event.keyCode; | |
if (code == 86) // 'v' | |
{ | |
for (i = 1; i <= 100; i++) { | |
$span = $("#item" + i).find('table tbody tr td div p.font12 span[style="color:#C00;"]'); | |
if ($span.length == 0) { | |
$("#item" + i).parent().toggle(); | |
} | |
} | |
} | |
} | |
document.addEventListener('keydown', onKeyDown, false); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment