Commit graph

95 commits

Author SHA1 Message Date
Miodec
a7b255cdc1 fixed config loading causing wrong theme tab to be shown 2022-01-08 16:58:03 +01:00
Miodec
ec04272e99 added animations to test config menu 2022-01-01 17:48:04 +01:00
swinelordvastus
daf2fe8ebd
feat: initial arrow funbox (#2203) by vastus
* feat: initial arrow funbox

* feat: arrows icons arrowkey input and non repeating arrows

Co-authored-by: Jack <bartnikjack@gmail.com>
2021-12-23 00:15:15 +01:00
Miodec
db87e59a3b setting fallback font when previewing. closes #2188 2021-12-18 19:54:56 +01:00
Ferotiq
707ffd3419
Add Capslock Indicator Settings Option (#2173) by Ferotiq
* Add Capslock Indicator Settings Option

* moved setting to a different section

* renamed to warning

* rename

Co-authored-by: Jack <bartnikjack@gmail.com>
2021-12-13 15:53:24 +00:00
Jack
5d2d0fa9b9 added mobile menu. should fix #2127 2021-11-29 23:32:18 +00:00
Jack
241cb548d2 updating active theme indicator when random theme is active. closes #2129 2021-11-29 18:17:43 +00:00
Jack
cfcc9012ee added alice keymap layout 2021-11-13 19:27:14 +00:00
Jack
8ba2863a33 fixed some popups not being styled 2021-10-14 17:48:32 +01:00
Miodec
cd7e771b95 fixed timer style switching in the middle of a test not working correctly 2021-10-12 00:36:12 +01:00
Jack
653ae1193c moved tts into its own file, added support for bcp47 codes to enable multilanguage. closes #397 2021-10-01 16:24:50 +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
Aaron
971afec8be
Made sure alternate command line shortcut is visible (#1883) by UnrealApex
* Renamed command line setting timer-progress bar

* Made ctrl+shift+p shortcut visible to the user
2021-09-19 00:01:22 +01:00
Jack
c063012e9e added lazy mode 2021-09-13 17:28:00 +01:00
Jack
5b78692921 fixed excessive number of config saves causing some users to hit the rate limit 2021-09-09 16:47:40 +01:00
Jack
ac1415a5c6 added british english mode 2021-09-08 22:30:40 +01:00
Jack
69e7bc641c fixed word highlight mode showing words in tts funbox 2021-08-24 20:35:35 +01:00
Jack
2f7212e3db refreshing the page when ad settings change 2021-08-23 19:58:59 +01:00
Jack
28044334c1 allowing to load challenges from command line, keeping track of which challenge is active 2021-08-22 17:29:40 +01:00
Jack
402744ada7 fixed double config save on changing mode2 2021-07-28 21:11:13 +01:00
Jack
c5dae38d70 url check 2021-07-23 01:31:27 +01:00
Jack
4dafb40cc5 fixed incomplete last word with a burst spike causing burst heatmap steps to be misrepresented. closes #1655 2021-07-22 17:43:01 +01:00
Miodec
a44ef62671 removing ad script if ads disabled 2021-07-19 22:09:37 +01:00
Miodec
9137858b15 moved ads to a new ad provider 2021-07-18 18:55:10 +01:00
Miodec
eb062779dd saving burst heatmap state. closes #1614 2021-07-12 13:46:34 +01:00
Miodec
75774c9fb6 added fallback to default font 2021-07-12 13:19:27 +01:00
Miodec
67c1352c0c fixed a bug where min burst has no defualt value in config 2021-07-09 23:53:45 +01:00
Alvin Zhao
87073a3700
Added min burst (#1579) started by yzAlvin
* Added min burst

* no need to calculate burst on a timer

* added a burst history and current burst trackers, added set and push functions, removed burst calculating in stats (should be done on word completion)

* burst will not be calculated on every keypress

* calculating burst and pushing to history on space
setting start time on first keypress

* verifying that burst history and input history are the same length

* bursthistory typo
added function to calculate burst speed and updated the pushing function to consider if the word was already completed once before

* removed fail condition from timer

* removed debug notification

* added fail condition

* rounding burst

* making sure to load burst config

* styling burst display

* including burst in the result

* renamed variable

* removed burst from result screen, changed wording in settings page

* reran npm i to regenerate package lock in version 2

* audit fix

* gulp update

* added two burst modes: flex and fixed

* standardized some code

* swapped classes

* updated settings page min burst input
updated min burst description

* updated the setting sections with inputs to a new, better design

Co-authored-by: Jack <bartnikjack@gmail.com>
2021-06-29 18:55:59 +01:00
Miodec
0620e1ed34 added a new loading page that will be visible instead of the test
the test will load only when everything is ready (the account data is fully loaded)
2021-06-17 16:09:38 +01:00
Estebene
d9b7331197
Styled Reset and Unlink Discord Popups by Estebene 2021-06-10 16:16:21 +01:00
Miodec
424701cff8 added font size 4 2021-06-09 15:14:24 +01:00
Jack
a0b8944f21 removed unnecessary 'unlocked' property, changed the values so config saving is not failing the regex check 2021-06-03 23:14:36 +01:00
Otard95
8ed3a9e1a8 Remove monkey power level from settings, add and rename levels 2021-06-03 21:34:06 +02:00
Otard95
fedbade8cf Hide/show setting when user locks/unlocks the feature
Also reset powerLevel on show to 9001
2021-06-03 19:35:26 +02:00
Otard95
5ce55d91e6 Unlock and power lever added 2021-06-03 17:45:16 +02:00
Otard95
22403248d2 Rename PowerMode to MonkeyPower 2021-06-03 16:43:22 +02:00
Estebene
4942cf5107 Added funbox to config 2021-05-31 13:04:23 +12:00
Miodec
4801edd1b4 added import export settings to the command line 2021-05-17 16:03:12 +01:00
Miodec
c284532e73 added separate setting for repeated pace 2021-05-17 15:36:27 +01:00
Miodec
a02a5f6862 removed pace caret style off as it didnt make sense 2021-05-16 01:00:07 +01:00
Miodec
c76db46869 changing highlight mode will now cause the current word to update to reflect the change 2021-05-14 00:40:23 +01:00
mtthwn
4ac6cd3ac2 Merge branch 'master' of github.com:mtthwn/monkeytype 2021-05-10 18:06:48 -04:00
Miodec
d1b0c3fb11 not lowercasing layouts to avoid issues 2021-05-10 13:07:52 +01:00
Miodec
086b2d20a5 lowercasing custom layoutfluid
updating settings input
2021-05-10 12:45:23 +01:00
Jack
156fb99713 Merge branch 'master' into pr/Estebene/1383 2021-05-08 19:39:56 +01:00
Estebene
9222eceb03 Added basic preset setting functionality 2021-05-08 17:03:56 +12:00
Jack
f0aebbbb33 added notification when custom layoutfluid is saved
added default layoutfluid value
changed delimiter to #
addded a validation step and reverting back if validation failed
2021-05-07 15:44:18 +01:00
Jack
7fc3b09610 storing customlayoutfluid using _ instead of spaces so that it can save the config properly 2021-05-07 15:09:03 +01:00
OctahedronV2
518ec33189 Added custom layoutfluid setting 2021-05-05 19:47:59 -04:00
Jack
4a70f7e476 carrot and banana can now be used as pace caret style 2021-04-18 22:49:16 +01:00