Skip to content

Commit

Permalink
show prev/next btn only on def load
Browse files Browse the repository at this point in the history
  • Loading branch information
SandeepKrSuman committed Mar 30, 2022
1 parent ce5276f commit 61d120f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion popup/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h1 id="word"></h1>
<p id="phonetic"></p>
<div id="definition"></div>
<p id="example"></p>
<div class="navigate-container">
<div id="navigatecontainer" class="navigate-container hidenavigator">
<span class="navigator previous">&laquo;</span>
<span class="navigator next">&raquo;</span>
</div>
Expand Down
3 changes: 3 additions & 0 deletions popup/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ async function dictionary(query) {
"example"
).innerHTML = `Example: ${json[0].meanings[0].definitions[0].example}`;
}
document
.getElementById("navigatecontainer")
.classList.remove("hidenavigator");
} else if (json.title) {
document.getElementById("error").innerHTML = "⚠ " + json.title;
}
Expand Down
4 changes: 4 additions & 0 deletions popup/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ div {
padding: 6px 14px;
}

.hidenavigator {
display: none;
}

.navigator:hover {
cursor: pointer;
background-color: #ddd;
Expand Down

0 comments on commit 61d120f

Please sign in to comment.