fixes #2454: Add a new popular posts page for view counts

This commit is contained in:
r888888888
2015-07-24 15:55:24 -07:00
parent cb57b08d54
commit cc6da3ff89
8 changed files with 145 additions and 3 deletions

View File

@@ -299,7 +299,13 @@
Danbooru.Post.initialize_title_for = function(post) {
var $post = $(post);
var $img = $post.find("img");
$img.attr("title", $post.attr("data-tags") + " user:" + $post.attr("data-uploader") + " rating:" + $post.data("rating") + " score:" + $post.data("score"));
var score = null;
if ($post.data("views")) {
score = " views:" + $post.data("views");
} else {
score = " score:" + $post.data("score");
}
$img.attr("title", $post.attr("data-tags") + " user:" + $post.attr("data-uploader") + " rating:" + $post.data("rating") + score);
}
Danbooru.Post.initialize_post_image_resize_links = function() {