Backspace would be enough^^ It’s most of the time kind of a reflex…
Here ya go. I think this should work.
https://greasyfork.org/en/scripts/396170-bunpro-disable-backspace-undo
Also, did you see the mistake delay script? That one just disables the undo for a short time after answering. Might be enough if it’s just reflex
edit: apparently I did not add that functionality to the mistake delay script
edit2: Btw if you want the buttons gone completely that’s super easy to do, so if you would prefer that and just tried to be modest I can put it together in a minute
Wow, really cool!! Thanks a lot
I had to create a small fix:
(function() {
var $ = window.jQuery;
$(‘html’)[0].addEventListener(‘quiz-page’, function() {
$(‘body’).keydown((event)=>{
var input_elem = $(’#study-answer-input’);
if (event.keyCode == 8 && input_elem.css(‘background-color’) == ‘rgb(229, 115, 115)’) {
event.stopPropagation();
input_elem.attr(‘disabled’, ‘’);
}
});
});
})();
(the color and $ variable)
Thanks a lottttt <3
I just realized that the textfield is disabled now >.> I can’t type anymore
Oh, using global variables work fine for me without defining them. May I ask what browser you are using that it doesn’t?
Ahaha oops! I disabled it so you wouldn’t delete any text when pressing backspace, but I only tested it on one item so I forgot to enable the textfield again. I’ll fix it, haha
@joda it’s updated now. I changed it to just unfocus the input element. Also defined the jquery variable, since you seemed to need it.
Anyone that wants to remove the button completely can use this:
As I said, much simpler
// ==UserScript==
// @name Bunpro: Remove Undo Button
// @namespace http://tampermonkey.net/
// @version 1.0.0
// @description Disables the backspace functionality in reviews
// @author Kumirei
// @include *bunpro.jp/*
// @exclude *community.bunpro.jp*
// @require https://greasyfork.org/scripts/5392-waitforkeyelements/code/WaitForKeyElements.js?version=115012
// @require https://greasyfork.org/scripts/370623-bunpro-helpful-events/code/Bunpro:%20Helpful%20Events.js?version=615700
// @grant none
// ==/UserScript==
(function() {
var $ = window.$;
$('html')[0].addEventListener('quiz-page', ()=>{
$('.oops-button').remove();
});
})();
You will reconsider when you realize that I accidentally disabled not only backspace at first, but also reviews themselves
Well the number of scripts I use on WK made by you more than make up for this.
All hail @Kumi
You look different! Did you get a haircut?
I’m using chromium + tampermonkey! Tampermonkey has some syntax parser included and told me that the $ variable is unknown^^
@Kumi Its working now^^ Thank you a lot The only thing i needed to change is the color value which is somehow different for me.
Mine is: rgba(255, 77, 77, 0.8)
Ah, yeah the editor says that but it’s not an issue when it runs.
AH!!! I completely forgot that there are themes on BP. Gosh darn it, I will have to update the script again. I wish BP would just change the color with a class instead.
Ok, I think I fixed it. Changed the condition to the R value being above 200.
Hi Kumi, I found one small bug^^ The backspace button keeps disabled, even if I continue to the next item. So if I type something, I can’t press backspace anymore (to correct some spelling mistake; haven’t pressed submit yet). Is it possible to change this behaviour?
Hmm, what theme are you using? That shouldn’t be happening unless the redness value is above 200, which I (perhaps naively) assumed would only happen for when the answer was incorrect.
Also maybe double check that you’re on version 1.0.2?
https://greasyfork.org/en/scripts/396170-bunpro-disable-backspace-undo
Edit: @joda just published something which might fix it. Try updating to 1.0.3
Wow, you are fast Thx a lot! I will check it as soon as I’m back from my business trip^^
As far as I know, I never changed something related to the theme…so I probably have the default one >.>
edit:// just checked…I use the lightmode!
I just tried light mode and it should work. Tell me if you have any issues with 1.0.3
Works! <3