Skip to content

Commit

Permalink
fix: EN reset button in JP
Browse files Browse the repository at this point in the history
  • Loading branch information
peter50216 committed May 31, 2022
1 parent 59462d7 commit 46c6c83
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/js/i18n/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,5 @@ mapCharacterName = (s) => {
formatCharacterNames = (characters) => {
return characters.map((c) => mapCharacterName(c)).join(", ");
};

RESET_BUTTON = "Reset";
2 changes: 2 additions & 0 deletions src/js/i18n/jp.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,5 @@ mapCharacterName = (s) => {
formatCharacterNames = (characters) => {
return characters.map((c) => mapCharacterName(c)).join("、");
};

RESET_BUTTON = "リセット";
2 changes: 1 addition & 1 deletion src/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ function generateImage() {
`<a href="${dataURL}" download="${filename}">${DOWNLOAD_IMAGE}</a><br><br>`
);

resetButton.insertAdjacentText("beforeend", "リセット");
resetButton.insertAdjacentText("beforeend", RESET_BUTTON);
resetButton.addEventListener("click", (event) => {
imgButton.addEventListener("click", preGenerateImage);
imgButton.innerHTML = GENERATE_IMAGE;
Expand Down

0 comments on commit 46c6c83

Please sign in to comment.