forked from e621ng/e621ng
[Misc] Remove debug output (#885)
This commit is contained in:
parent
af6ab947d1
commit
200f064e2d
@ -6,17 +6,14 @@ Home.init = function () {
|
|||||||
|
|
||||||
const $form = $("#home-search-form");
|
const $form = $("#home-search-form");
|
||||||
const $tags = $("#tags");
|
const $tags = $("#tags");
|
||||||
console.log("init");
|
|
||||||
|
|
||||||
let isEmpty = !$tags.val();
|
let isEmpty = !$tags.val();
|
||||||
let wasEmpty = isEmpty;
|
let wasEmpty = isEmpty;
|
||||||
if (isEmpty) $form.addClass("empty");
|
if (isEmpty) $form.addClass("empty");
|
||||||
console.log("input", isEmpty, wasEmpty);
|
|
||||||
|
|
||||||
$tags.on("input", () => {
|
$tags.on("input", () => {
|
||||||
wasEmpty = isEmpty;
|
wasEmpty = isEmpty;
|
||||||
isEmpty = !$tags.val();
|
isEmpty = !$tags.val();
|
||||||
console.log("input", isEmpty, wasEmpty);
|
|
||||||
|
|
||||||
if (isEmpty && !wasEmpty) $form.addClass("empty");
|
if (isEmpty && !wasEmpty) $form.addClass("empty");
|
||||||
else if (!isEmpty && wasEmpty) $form.removeClass("empty");
|
else if (!isEmpty && wasEmpty) $form.removeClass("empty");
|
||||||
|
@ -10,7 +10,6 @@ NewsUpdate.initialize = function () {
|
|||||||
let newsOpen = false;
|
let newsOpen = false;
|
||||||
$("#news-header, #news-show").on("click", (event) => {
|
$("#news-header, #news-show").on("click", (event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
console.log("click");
|
|
||||||
|
|
||||||
newsOpen = !newsOpen;
|
newsOpen = !newsOpen;
|
||||||
$("#news").toggleClass("open", newsOpen);
|
$("#news").toggleClass("open", newsOpen);
|
||||||
|
@ -35,12 +35,10 @@ PostModeMenu.change_tag_script = function (e) {
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
const newScriptID = Number(e.key);
|
const newScriptID = Number(e.key);
|
||||||
console.log(newScriptID, LStorage.Posts.TagScript.ID);
|
|
||||||
if (!newScriptID || newScriptID == LStorage.Posts.TagScript.ID)
|
if (!newScriptID || newScriptID == LStorage.Posts.TagScript.ID)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
LStorage.Posts.TagScript.ID = newScriptID;
|
LStorage.Posts.TagScript.ID = newScriptID;
|
||||||
console.log("settings", LStorage.Posts.TagScript.ID, LStorage.Posts.TagScript.Content);
|
|
||||||
$("#tag-script-field").val(LStorage.Posts.TagScript.Content);
|
$("#tag-script-field").val(LStorage.Posts.TagScript.Content);
|
||||||
PostModeMenu.show_notice(newScriptID);
|
PostModeMenu.show_notice(newScriptID);
|
||||||
};
|
};
|
||||||
|
@ -11,21 +11,16 @@ Thumbnails.initialize = function () {
|
|||||||
// Avatar special case
|
// Avatar special case
|
||||||
for (const post of $(".simple-avatar")) {
|
for (const post of $(".simple-avatar")) {
|
||||||
const $post = $(post);
|
const $post = $(post);
|
||||||
console.log(1, $post);
|
|
||||||
|
|
||||||
const postID = $post.data("id");
|
const postID = $post.data("id");
|
||||||
if (!postID) continue;
|
if (!postID) continue;
|
||||||
console.log(2, postID);
|
|
||||||
|
|
||||||
const postData = postsData[postID];
|
const postData = postsData[postID];
|
||||||
if (!postData || !postData["preview_url"]) continue;
|
if (!postData || !postData["preview_url"]) continue;
|
||||||
console.log(3, postData);
|
|
||||||
|
|
||||||
console.log(3.55, $post.data("name"));
|
|
||||||
$("<img>")
|
$("<img>")
|
||||||
.attr("src", postData["preview_url"])
|
.attr("src", postData["preview_url"])
|
||||||
.appendTo($post.find("span.simple-avatar-image"));
|
.appendTo($post.find("span.simple-avatar-image"));
|
||||||
console.log(4, "done");
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user