Last active
August 29, 2015 13:57
-
-
Save tranch/9435334 to your computer and use it in GitHub Desktop.
豆瓣电影评论显示楼层号脚本
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
| (function($) { | |
| $('#comments').find('.comment-item').each(function(i) { | |
| var page, level, paginator = $('.paginator'); | |
| page = paginator.length ? parseInt(paginator.find('.on').text()) : 1; | |
| level = i + 1 + (page - 1) * 30; | |
| $(this).find('.author').append($('<strong>').text(level + '楼')); | |
| }); | |
| })(window.jQuery); |
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
| (function(a){a("#comments").find(".comment-item").each(function(b){var c,e,d=a(".paginator");c=d.length?parseInt(d.find(".on").text()):1;e=b+1+(c-1)*30;a(this).find(".author").append(a("<strong>").text(e+"楼"));});})(jQuery); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@shellphon 嗯,那我改下。