Update how content display is changed

This commit is contained in:
toasted-nutbread 2019-12-27 18:19:49 -05:00
parent 97f7df3302
commit d512c111f6
3 changed files with 4 additions and 9 deletions

View File

@ -30,7 +30,7 @@
</div>
</div>
<div id="error-orphaned">
<div id="error-orphaned" hidden>
<div class="entry">
<h1>Yomichan Updated!</h1>
<p>

View File

@ -62,10 +62,6 @@ ol, ul {
height: 2.28571428em; /* 14px => 32px */
}
#error-orphaned {
display: none;
}
.invisible {
visibility: hidden;
}

View File

@ -456,15 +456,14 @@ class Display {
}
setContentOrphaned() {
const definitions = document.querySelector('#definitions');
const errorOrphaned = document.querySelector('#error-orphaned');
if (definitions !== null) {
definitions.style.setProperty('display', 'none', 'important');
if (this.container !== null) {
this.container.hidden = true;
}
if (errorOrphaned !== null) {
errorOrphaned.style.setProperty('display', 'block', 'important');
errorOrphaned.hidden = false;
}
this.updateNavigation(null, null);