add favorite action underneath image
This commit is contained in:
@@ -13,13 +13,17 @@
|
||||
if (current_user_id == "") {
|
||||
$("#add-to-favorites").hide();
|
||||
$("#remove-from-favorites").hide();
|
||||
$("#add-fav-button").hide();
|
||||
$("#remove-fav-button").hide();
|
||||
return;
|
||||
}
|
||||
var regexp = new RegExp("\\bfav:" + current_user_id + "\\b");
|
||||
if ((favorites != undefined) && (favorites.match(regexp))) {
|
||||
$("#add-to-favorites").hide();
|
||||
$("#add-fav-button").hide();
|
||||
} else {
|
||||
$("#remove-from-favorites").hide();
|
||||
$("#remove-fav-button").hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
this.initialize_post_image_resize_to_window_link();
|
||||
this.initialize_similar();
|
||||
this.initialize_replace_image_dialog();
|
||||
this.initialize_fav_button();
|
||||
|
||||
if ((Danbooru.meta("always-resize-images") === "true") || ((Danbooru.Cookie.get("dm") != "1") && (window.innerWidth <= 660))) {
|
||||
$("#image-resize-to-window-link").click();
|
||||
@@ -248,6 +249,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
Danbooru.Post.initialize_fav_button = function() {
|
||||
}
|
||||
|
||||
Danbooru.Post.initialize_favlist = function() {
|
||||
$("#favlist").hide();
|
||||
$("#hide-favlist-link").hide();
|
||||
|
||||
Reference in New Issue
Block a user