[Userscript]: Double-Check (Version 2.x)

:point_right: [ v2.2.3 ]

  • Fix SRS popup for lightning+wrong
  • Fix green bar flicker in lightning.

Although I couldn’t replicate the green-bar flicker, I took another look at how the old Lightning Mode worked, and I think I figured out a reasonable cause for it. In Double Check, I was using a 1ms timeout between Submits. I’ve re-engineered Double Check now to remove those delays.

Functionally speaking, this is a pretty significant change. I’ve tested tons of combinations of settings, and everything looks like it’s working. But, of course, bugs happen. Let me know if anything seems broken.


No, I am on Chrome. If it’s about rendering speed could my graphic cards affect anything? They’re quite old.

Works perfectly! Thanks! So glad to be rid of the green bar flashes

1 Like

Quite possibly. Chrome may even be making decisions about whether to use hardware rendering. There’s also a setting for that.

Looking at my flags I see that Accelerated 2D Canvas is enabled.
I tried disabling this and downgrading to 2.2.1 and 2.1.3 but I still got the flicker.
Anyway, 2.2.3 works.

1 Like

I added a simple setting to my local copy that disables retyping on burn reviews. Maybe this would be something other people would be interested in?



@Kumirei Not sure I’d use it, but it seems like a feature worth adding.

@rfindley There’s a small issue related to retyping when you go too fast. If in quick succession you do:

  1. Get answer wrong
  2. Hit backspace
  3. Type correct answer
  4. Hit enter

then the box turns grey instead of green. Then you have to hit enter again to turn it green, then two more times to move to the next question.

This script seems to be completely broken for me (latest version).

  1. On getting an answer wrong, it doesn’t display anything, it simply clears the entry field and lets
    you try again without even giving you a chance to mark it correct. For example, the answer was
    “じせい” and I accidental typed in “ひせい”, it deducted a few percent of my score and let me try again
    without letting me correct it.

  2. Using the “Delay when wrong” option fixes that but introduces and even worse bug. Whenever I get something wrong, it will show that I’ve been wrong and let fix my answer, but as soon as I try to re-type
    my new answer, nothing happens, I can’t even click in the answer box anymore. The only way to continue
    from that is to reload the page.

  3. Using the “Show Item Info” and “Incorrect answers” option doesn’t work either, even though I click on the save button, the option is always unchecked when I go back into the menu.

The only thing that works really well is the option to warn me on typos, which is exactly what I wanted from this scrip, it’s really needed since WK will allow “intransitive verb” when the answer is “transitive verb” or “na adjective” when the answer is “adjective”, which is ridiculous.

Edit: I’ve disabled the built-in “lightning mode” options and haven’t had a problem since, seems like the lightning mode script that I use clashed with the built-in lightning mode of your script. I’ll keep you posted in case the problems return.

Thank you for all your awesome scripts though, they make WK so much more enjoyable to use.

I’m interested!!!

Yep… Double-check in general isn’t very compatible with the stand-alone lightning mode script, which is actually the reason I integrated a version of lightning mode into Double-check.

@rfindley For the last week I’ve been using Double Check without the “slightly off” feature enabled to speed things up. I figured with the delay on, it would still work well enough, without slowing me down as much. However, the message alone wasn’t enough to force me to stop and check that my answer was wrong. So I’m trying to make a change to make the color yellow when your answer was accepted by was inaccurate.

It seems to work so far, but I’ll need to try it with some other configurations to be sure it’s good. I can send you the code to patch into the main branch once it’s ready, but do you want me to do anything specific config-wise? I’m thinking either

  1. Only change the color if they have delay_slightly_off set to true.
  2. Or add a new setting to include the color change when slightly off.

What do you think?

Honestly, until I just looked into editing the script I didn’t know there was a setting for auto-showing the additional info, so the color change may not even be necessary.

These are the changes I made.

Lines 44, 76, and 202, for me. Nothing removed, just those three lines added.

--- Current Version
+++ New Version
@@ -40,9 +40,8 @@
         var defaults = {
             allow_retyping: true,
+	     	 disallow_retyping_burns: false,
             allow_change_correct: false,
             allow_change_incorrect: false,
             typo_action: 'ignore',
             delay_wrong: true,
@@ -72,9 +71,8 @@
             content: {
                 tabAnswers: {type:'page',label:'Answers',content:{
                     grpChangeAnswers: {type:'group',label:'Change Answer',content:{
                         allow_retyping: {type:'checkbox',label:'Allow retyping answer',default:true,hover_tip:'When enabled, you can retype your answer by pressing Escape or Backspace.'},
+                        disallow_retyping_burns: {type:'checkbox',label:'Disallow retyping burns',default:false,hover_tip:'When enabled, you can not retype your answer by pressing Escape or Backspace.'},
                         allow_change_correct: {type:'checkbox',label:'Allow changing to "correct"',default:true,hover_tip:'When enabled, you can change your answer\nto "correct" by pressing the "+" key.'},
                         allow_change_incorrect: {type:'checkbox',label:'Allow changing to "incorrect"',default:true,hover_tip:'When enabled, you can change your answer\nto "incorrect" by pressing the "-" key.'},
                     grpTypos: {type:'group',label:'Typos',content:{
@@ -198,9 +196,8 @@
                 set_answer_state(new_answer, false /* show_msgs */);
             case 'retype':
                 if (!settings.allow_retyping) return false;
+				if (settings.disallow_retyping_burns && $.jStorage.get('currentItem').srs == 8) alert('You can\'t retype burn reviews');
                 set_answer_state({reset:true}, false /* show_msgs */);

@rfindley Just wanted to make sure you saw this. I know you’re still busy, I just didn’t want it to get lost in the shuffle.

1 Like

Got it. I usually browse WK on my tablet, but it’s temporarily out of commission – I’m waiting for a replacement part in the mail – so I’ve been a bit disconnected lately.

Also, while doing a final QA check on my current project, I got a call out of the blue for a new contract wanting me to start immediately… literally. I’m still going to try to squeeze in some userscript fixes, but it’s going to be a tight squeeze. Since the new client is in Italy (and I’m in the U.S.), I’m also adjusting my sleep schedule so I can overlap with their work hours. It’s the work-from-home equivalent of jet-lag :slight_smile:


Wow! Your skills are very much in demand, huh? I knew you did contracting work, but I never even considered that it might include overseas work. Next stop, (virtual) Japan! :joy:

1 Like

I started my career at an international company, so my code is in a lot of products around the world. Sometimes they still contract me to do related work, such as customizing one of their products for an international client, or integrating their systems with other companies’ products.

1 Like

@rfindley Are you interesting in taking a patch for this? And if so, how would you like it configured, if at all (see questions above)?

Heh… I could swear I had responded to this, but I don’t see my response. :thinking:

Just analyzing the psychology of the existing interface first:
Aside from the message, there’s also the delay. Is the delay short enough that it’s not registering in your mind that there’s something it wants you to pay attention to? Or are there other [delay+message] combinations that you don’t care about, so you tend to dismiss the ones that you do care about?

Anyway, I’m okay with taking a submission.
Maybe add a “Colors” tab, with:

     When slightly off:  [ x ]
          Custom color:  [ color selection ]
When multiple meanings:  [ x ]
          Custom color:  [ color selection ]

I tend to ignore the messages because there are some I don’t care about, like multiple meanings/readings. Those are so common that they are basically noise. The delay is usually long enough to stop me from moving on accidentally. The problem is more so that the delay confuses me for a second, whereas the different color is in my face and I notice it right away.

By the way, another reason the delay doesn’t work as well for me is actually because of a longstanding (but sporadic) bug in the script. Every once in a while, submitting a correct answer locks up a few seconds before moving on. While it is sporadic, it happens almost every session, so it’s not that rare.

Sounds good. I’ll try to convert my local version to use a settings section and send you the code after I’ve tested it for a bit. I’ll probably have it to you in a week or two, depending on my free time.

1 Like

So much for a week or two… One of these days I’ll find the time…

Same boat here, so no worries :slight_smile: