Skip to content

Commit

Permalink
fix submit
Browse files Browse the repository at this point in the history
  • Loading branch information
6a67 committed Aug 28, 2024
1 parent 85e3a96 commit fef4623
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions script.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name JPDB Userscript (6a67)
// @namespace http://tampermonkey.net/
// @version 0.1.103
// @version 0.1.104
// @description Script for JPDB that adds some styling and functionality
// @match https://jpdb.io/*
// @grant GM_addStyle
Expand Down Expand Up @@ -1197,7 +1197,7 @@
}
const answerBox = document.querySelector('.answer-box');
const target =
answerBox?.querySelector('.plain') || document.querySelector('.result.kanji')?.querySelector('.plain').firstElementChild;
answerBox || document.querySelector('.result.kanji')?.querySelector('.plain').firstElementChild;
const rect = target.getBoundingClientRect();

if (target) {
Expand Down Expand Up @@ -1275,9 +1275,9 @@
await playButtonSound(button);
}
const form = button.closest('form');
// if (form) {
// form.submit();
// }
if (form) {
form.submit();
}
},
};

Expand Down

0 comments on commit fef4623

Please sign in to comment.