Skip to content

Commit

Permalink
hide button when dict not loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
khaitruong922 committed Sep 20, 2024
1 parent 26c0887 commit 34a5601
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ <h1 id="header">Kanji Search (based on JPDBv2 frequency list)</h1>
</select>
</div>
</div>
<button type="button" id="search">Search</button>
<button type="button" id="search" hidden>Search</button>
<div id="stats"></div>
<div id="stats-note" hidden>*having at least 1 kanji</div>
<div id="export-txt" hidden>Export TXT</div>
Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ let readingHighlightRegex = undefined;
const loadDict = async () => {
const data = await fetch('dict.json');
dict = await data.json();
searchBtn.hidden = false;
console.log('dict loaded');
};
loadDict();
Expand Down

0 comments on commit 34a5601

Please sign in to comment.