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> </div>
<div id="error-orphaned"> <div id="error-orphaned" hidden>
<div class="entry"> <div class="entry">
<h1>Yomichan Updated!</h1> <h1>Yomichan Updated!</h1>
<p> <p>

View File

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

View File

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