@Kumi the IDs and classes you’re selecting still look right to me, but my console is giving an error that points to the required “Bunpro; Helpful Events” script:
userscript.html?name=Bunpro%3A%20Auto-show%20Info.user.js&id=3d52e4c5-63e8-4765-8242-1e5ed53565cb:13 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'wait')
at eval (userscript.html?name=Bunpro%3A%20Auto-show%20Info.user.js&id=3d52e4c5-63e8-4765-8242-1e5ed53565cb:13)
at Window.eval (userscript.html?name=Bunpro%3A%20Auto-show%20Info.user.js&id=3d52e4c5-63e8-4765-8242-1e5ed53565cb:40)
at <anonymous>:4:80
at eval (userscript.html?name=Bunpro%3A%20Auto-show%20Info.user.js&id=3d52e4c5-63e8-4765-8242-1e5ed53565cb:1)
at eval (userscript.html?name=Bunpro%3A%20Auto-show%20Info.user.js&id=3d52e4c5-63e8-4765-8242-1e5ed53565cb:1)
at eval (userscript.html?name=Bunpro%3A%20Auto-show%20Info.user.js&id=3d52e4c5-63e8-4765-8242-1e5ed53565cb:78)
at eval (userscript.html?name=Bunpro%3A%20Auto-show%20Info.user.js&id=3d52e4c5-63e8-4765-8242-1e5ed53565cb:80)
at eval (<anonymous>)
at <anonymous>:4:80
at Object.t [as F_c] (<anonymous>:3:191)
Seems like a problem with wfs
being undefined, though I’m not sure why. The #show-grammar
selector you have in the required script should be fine too.
Edit: if I enter the following from your script into the console, it works, so it’s definitely something in the waiting/loading/promise process rather than the listeners themselves:
function openIfWrong() {
if ($('.oops-button')[0].style.display == "block" || $('#learn-new-grammar-page').length) {
$('.show-grammar-text').click();
}
}
$('#study-answer-input').on('keydown', function(event) {
if (event.which == 13) {
openIfWrong();
}
});
$('#submit-study-answer').on('click', function() {
openIfWrong();
});