forked from e621ng/e621ng
[Posts] Prevent the wiki excerpt from briefly being on the screen when hidden (#899)
This commit is contained in:
parent
a7a2d37a6b
commit
11cc763ee4
@ -30,16 +30,9 @@ PostSearch.initialize_input = function ($form) {
|
||||
|
||||
PostSearch.initialize_wiki_preview = function ($preview) {
|
||||
let visible = LStorage.Posts.WikiExcerpt;
|
||||
switch (visible) {
|
||||
case 1: {
|
||||
$preview.addClass("open");
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
$preview.addClass("hidden");
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (visible == 2) return; // hidden
|
||||
if (visible == 1) $preview.addClass("open");
|
||||
$preview.removeClass("hidden");
|
||||
|
||||
window.setTimeout(() => { // Disable the rollout on first load
|
||||
$preview.removeClass("loading");
|
||||
|
@ -1,6 +1,6 @@
|
||||
<div id="posts" class="post-index-gallery user-disable-cropped-<%= Danbooru.config.enable_image_cropping? && CurrentUser.user.disable_cropped_thumbnails? %>">
|
||||
<% if @wiki_text.present? %>
|
||||
<section class="wiki-excerpt loading">
|
||||
<section class="wiki-excerpt loading hidden">
|
||||
<h3 role="button" class="wiki-excerpt-toggle">
|
||||
<%= svg_icon(:chevron_right) %>
|
||||
<span><%= @wiki_page.pretty_title %></span>
|
||||
|
Loading…
Reference in New Issue
Block a user