Commit graph

84 commits

Author SHA1 Message Date
Estebene
d6d64366e5
Added functionality so that you fail on incorrect opposite shift for master and expert mode (#2190) by Estebene
* Added fail on incorrect opposite shift for master and expert mode

* Changed so the test only fails on master mode
2021-12-19 16:41:15 +01:00
Jack
7f2d5b7465 ignoring events when loading. closes #2109 2021-11-23 14:56:55 +00:00
Jack
593031e188
Revert "Incement accuracy even for trailingComposeChars (#2062)" (#2070)
This reverts commit 4ba3324240.
2021-11-07 23:13:20 +00:00
pooooooooods
4ba3324240
Incement accuracy even for trailingComposeChars (#2062)
Co-authored-by: Aditya Pudipeddi <aditya.pudipeddi@postman.com>
2021-11-07 22:28:36 +00:00
Jack
47654d6a9e not updating accuracy ui if accuracy is nan 2021-11-05 15:15:49 +00:00
Jack
0006fb47a5 fixed max confidence not working. closes #2028 2021-10-24 01:34:25 +01:00
Jack
c0ac8162a3 added opposite shift "keymap" closes #1199 2021-10-20 16:03:55 +01:00
Jack
c27efc1545 typo causing quick tab to not work 2021-10-11 00:45:53 +01:00
Jack
b7d5e64239 allowing tab in quote submit 2021-10-11 00:26:04 +01:00
Jack
34277e2098 checking if new quotes are visible 2021-10-10 23:30:55 +01:00
Jack
aa51808777 removed console log 2021-10-10 23:02:57 +01:00
Jack
cf8d258400
Quote submission (#1984)
* added new-quotes get and add routes

* added new-quotes/approve route to api

* Added front-end for quote submission

* fix language typo, force lowercase language

* Check for duplicate quote

* added unknown language handling to quote-submit

* npm i

* npm i

* language dropdown instead of input field

* mouse down instead click

* styling changes

* moved quotemod check to the controller,
added refuse endpoint,
added ability to approve and edit

* limiting quotes

* added log to quote approve

* added approve quotes button

* typo

* using the correct function, lowered limit

* added quote approve popup

* getting quotes and showing them

* error checking

* error checking

* removed console log

* stylng changes,
added refresh list button

* added disabled class

* styling changes

* handling button clicks
showing langauge and timestamp

* check if user is a quote mod

* approve button handling

* handling quote edit

* showing short quotes in red

* post, not get

* not parsing quote id to int

* parsing to objectid

* updated styling

* fixed lint warnings

* fixed up new quotes dao

* showing loader

* calling function correctly

* typo fix

* fixed wrong path,
fix broken newid,
saving file when file exists,
searching for the quote correctly when attempting to delete

* showing message

* blocking buttons and inputs when waiting for response,
unlocking after response

* deleted workflow

Co-authored-by: lukew3 <lukew25073@gmail.com>
2021-10-10 22:46:35 +01:00
Miodec
a5b4b433cc fixed backspace deleting 2 characgters when layout emulator was enabled. closes #1972 2021-10-09 13:03:26 +01:00
Jack
dc3fc3eafe defused the bomb planted by @SeerLite 2021-10-07 19:24:35 +01:00
SeerLite
4234cb3c1c
Layout emulator: Ignore forced compose input and keys with modifiers (#1965)
* Undo forced compose input when using emulator

* Don't emulate keys with modifiers

Ctrl everywhere and Alt only on Linux (because Firefox uses Alt shortcuts
on Linux).
2021-10-07 18:52:40 +01:00
SeerLite
57f6eec430
Always reset #wordsInput with layout emulator (#1960) 2021-10-07 14:33:42 +01:00
SeerLite
a6f1e62c7c
Fix layout emulator issues (#1957) by seerlite
* Reset #wordsInput when using layout emulator too

* Refactor input and fix emulation live acc
2021-10-06 16:05:20 +01:00
Jack
9a0026a1ab disabling autofocus when restart button is focused. should help with #1941 2021-10-06 13:34:13 +01:00
Jack
32e93f8da8 revert revert merge input-rewrite 2021-10-05 15:36:37 +01:00
SeerLite
acc6a699d6
Update keymap when using layout emulator too (#1947) by SeerLite
Fixes #1945
2021-10-05 14:40:12 +01:00
Jack
223d7d4757 fixed keymap not working correctly when backspacing. closes #1942 2021-10-04 17:11:26 +01:00
Jack
c81e1ef004 fixed words jumping to the same line. closes #1940 2021-10-03 22:55:50 +01:00
Jack
ac798ed2d1 fixed zen mode not working completely 2021-10-03 15:20:30 +01:00
Jack
2a06111e78 enter cant start the test 2021-10-02 22:56:10 +01:00
Miodec
d2a3ed9fc6 Revert "Merge branch 'input-rewrite'"
This reverts commit 4f13f32d7f, reversing
changes made to 7a6b9090ec.
2021-10-02 22:21:03 +01:00
SeerLite
8009ff0570 fix previous commit 2021-10-01 22:11:16 -03:00
SeerLite
5d52e41932 Don't modify input when it's already the wanted value 2021-10-01 22:06:03 -03:00
Jack
a62ccd20a7 fixed lint warnings 2021-10-01 16:41:05 +01:00
Miodec
65b3c1c1e4 fixed enter inserting a ghost character when typed incorrectly 2021-10-01 14:02:08 +01:00
Jack
62040c8099 fixed tab characters not working correctly 2021-09-30 20:19:23 +01:00
Jack
1cb0c8d2a2 fixed sound not playing on backspace 2021-09-30 13:50:44 +01:00
Jack
7ef93b6f22 fixed enter key support 2021-09-30 13:41:28 +01:00
Jack
164ea185d4 fixed hide extra letter breaking input highlighting 2021-09-30 00:39:07 +01:00
SeerLite
c323efea26
Rewrite input system to use <input> content (#1325)
* Rewrite input system to use <input> content

* Tab/Escape, Backspace and Enter are always handled by
  $(document).keydown.
* The rest of characters are handled by either $("#wordsInput").on("input")
  (default) or $(document).keydown (layout emulation).
* New special handling for dead keys, compose keys and diacritics in
  general with the new regex Misc.trailingComposeChars.

input-controller.js has been updated to use the above changes:
* handleBackspace() replaced with simplified backspaceToPrevious().
  On PC, a space is immediately re-added to the end of the input to make
  use of the browser/OS's Backspace. This lets the browser handle input-
  specific things like ctrl+backspace.
* handleSpace() refactored a bit to repeat less logic when word is correct
  or incorrect.

* test-ui.js updated to highlight the Misc.trailingComposeChars
correctly, and also refactored a bit to make logic easier to follow.

* AFK checking has also been simplified, now just set with a boolean
flag (TestStats.) setKeypressNotAfk() instead of checking every key and
modifier press (so incrementKeypressMod() was removed as it wasn't used
for anything else).

* Refactor input controller

New function isCharCorrect().

* Remove caps lock backspace setting

Not supported with the input rewrite anymore because we're relying on the
browser's/OS's actual backspace effects. There's no way to emulate this
keypress.

* Refactor input controller

* Reimplement opposite shift mode

* Reimplement the layout emulator

* Fix replay events for input rewrite

Now it's more flexible for a variable amount of backspacing or letter
replacing.

* Pad input with space to handle backspace on mobile

Backspace isn't fired as an event on current mobile browsers, so I worked
around that by adding a permanent space at the start of the input and
treating its removal as a fallback to Backspace to the previous word.

* Force caret to end of input on focus

Fixes initial selection on iOS.

* Use offsetTop from the DOM instead of TestUI

I didn't wanna mess too much with what happens in test-ui.js. Basically,
on a restart after having completed a test, TestUI.activeWordTop is always
wrong for some reason. This caused swipe/instant input after a restart to
always drop the first few characters.

* Prevent pasting on the input

* Revert "Reimplement opposite shift mode"

This reverts commit 9a716ad39b004f0719b05f486465ea03060430ca.

* Use key code to check opposite shift usage

Today I learned what closure actually meant.

* Accept all whitespace as word space
2021-09-30 00:22:38 +01:00
Jack
cd77779475 quotes now use the words bound system, fixes plus one and two funboxes not working for quotes 2021-09-27 00:55:16 +01:00
Jack
c00dfc2385 only checking active word when needed 2021-09-27 00:00:48 +01:00
Miodec
18bc8297ab made sure left quotation mark can be used interchangeably with right quotation mark and the apostrophe. fixes #1814 2021-09-05 14:48:52 +01:00
Jack
5a17c46275 fixed master mode bug where pressing space on the last word would freeze the website 2021-08-29 14:51:07 +01:00
Miodec
8d1558086a disabled tab when tags or preset popup is visible 2021-08-21 13:22:08 +01:00
Miodec
bc0c435d49 added a special key to ignore list. closes #1716 2021-08-16 22:59:01 +01:00
Miodec
cd1697bfc5 stopping quick restart from working on long tests 2021-08-06 14:25:25 +01:00
Miodec
72e70219a0 updated the way interchangable characters are handled to consider more cases 2021-08-01 13:07:32 +01:00
Jack
4dd2ada0d1 fixed input getting out of sync after pressing ctrl+backspace with a special character as the only input. closes #1688 2021-07-28 21:29:43 +01:00
Jack
ba7e5c9460 fixed double cltr backspace causing a bug. closes #1657 2021-07-24 15:04:35 +01:00
Jack
cdaa15c7c0 fixed ctrl backspace not working when the first character was a special character
fixed ctrl backspace not reacting to \ correctly
fixes #1624
2021-07-16 16:05:51 +01:00
Jack
54ced5539c missing escape character causing issues with ctrl backspace and numbers fixed #1620 2021-07-12 01:02:41 +01:00
shishberg
08ad5728db
Add weakspot mode. (#1606) by shishberg
* Add weakspot mode.

This keeps track of a per-character "weakness" score, basically a
moving average of the spacing duration with a penalty for incorrect
letters. The weakspot funbox mode uses this to bias towards words
with lots of weak letters.

* Comment about keeping weaknessScores

* Move weakspot to its own module.

* prettier
2021-07-10 01:23:47 +01:00
Jack
9d467f5959 fixed backspace not working as intended. closes #1598 2021-07-07 00:41:00 +01:00
Jack
77f5277419 fixed a bug where you could type while leaderobards are visible 2021-07-06 01:16:38 +01:00
Jack
c5783c3f5d disabled pace caret jumping forward when stop on error is enabled 2021-07-05 19:17:27 +01:00