Commit graph

66 commits

Author SHA1 Message Date
Miodec
57b9216586 moved contributors and supporters to json files
they are only requested and filled when needed
elements are removed once page is changed
2022-01-29 21:40:37 +01:00
Miodec
2e9c4291f0 moved function 2022-01-21 17:28:51 +01:00
Miodec
4528f85bdf added function to convert rem to pixels 2022-01-14 19:34:14 +01:00
Miodec
b2b9d4c0f0 reduced code repetition by adding functiont to get mode2 2022-01-11 20:11:54 +01:00
Miodec
9980e2129f fixed arrows
- moved arrow generation to a misc function
- script funboxes will be disabled with zen and quote
- fixed arrows after 100 "words"
- added arrows back to the funbox list
2022-01-01 21:48:28 +01:00
Estebene
5d66c3f6b8
Fixed Errors (#2034)
* fixed-errors

* Readded whitespace to regex as unicode to prevent linter errors

* Readded key to value conversion

Co-authored-by: Estebene <49330942+TheWanderingRanger@users.noreply.github.com>
2021-11-17 19:52:29 +00:00
Estebene
1dda06bf70
Added Custom Color Inputs that you can Paste into (#1881) by Estebene
* First commit

* Fixed color popup placement and added easy paste colors

* Fixed color popup placement and added easy paste colors

* updated the color of the first button to provide more contrast

* fixed color picker position

* fixed laggy color picker drag

* safari fix for picker position

Co-authored-by: Jack <bartnikjack@gmail.com>
2021-10-24 12:10:20 +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
65f1143158 fixed lint warnings 2021-09-14 14:06:40 +01:00
Jack
c60dec25fd added no-break space to the text cleaning function. closes #1848 2021-09-14 13:45:13 +01:00
Jack
222e7988d7 adde figure space and narrow non-breaking space to remove fancy typography. closes #1848 2021-09-14 00:16:40 +01:00
Jack
c09dd2018a updated function 2021-09-10 14:44:59 +01:00
Jack
fa7ad4581e added a last seen version tracker
showing notification when new version is released
2021-08-29 15:05:38 +01:00
Miodec
374b1a19b0 fixed themes being in the wrong order in the command line 2021-08-18 13:18:02 +01:00
Miodec
8cbbe51ba7 Merge branch 'master' into mongo 2021-07-24 23:17:58 +01:00
Jack
85a2035261 fixed footer links 2021-07-24 14:55:10 +01:00
Miodec
0be16ac467 fixed verification email resending 2021-07-12 22:56:12 +01:00
Miodec
7689086503 merged master into mongo 2021-07-07 14:24:44 +01:00
Miodec
cf9e29db65 added today tracker 2021-07-05 15:59:10 +01:00
Miodec
43fcaf5950 added burst heatmap to the result screen 2021-07-04 23:58:11 +01:00
Jack
3a3a215245 fixed control backspace not interacting properly with punctuation 2021-07-01 16:52:13 +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
0eac486bd6 fixed asynchronous langauge loading and getting to fix funboxes initially not working on the first load 2021-06-20 15:16:53 +01:00
lukew3
11caa57eeb replaced /api/ with api subdomain in production, added helmet middleware 2021-06-03 11:19:27 -04:00
lukew3
e36a349dc4 Fetch upstream 2021-06-03 10:35:20 -04:00
Jack
ffcd0c9545 fixed the result filters problem all button sometimes not working as intended 2021-06-01 19:35:51 +01:00
lukew3
fd30b5aa36 brought back firebase analytics and authentication 2021-05-31 23:47:58 -04:00
lukew3
e2920fbec2 email verification 2021-05-27 11:08:40 -04:00
lukew3
0be490bf39 created axiosInstance with refresh tokens 2021-05-14 21:09:22 -04:00
lukew3
3978b7a106 firebase completely disconnected, working at restoring all functionality 2021-05-14 13:56:08 -04:00
Jack
9611ca9b98 added punctuation support for 58008 mode 2021-04-24 17:40:00 +01:00
Mariusz Gumienny
bc2b45224b escape regexp special characters in words filter 2021-04-14 21:16:01 +02:00
SeerLite
18141a52a6 Clear each cookie after migrating it 2021-04-06 12:01:47 -04:00
SeerLite
2945416609 Try to migrate from cookies to localStorage 2021-04-06 12:01:47 -04:00
SeerLite
a907d1e584 Use localStorage instead of cookies
Cookies are sent to the server on each request and are not recommended for
storing large amounts of data.
2021-04-06 12:01:44 -04:00
Jack
239e3e61d6 lots of little code refactoring #495
relocated smaller functions and most events
divided code into small modules (layout emulator, support popup, version popup)
2021-03-29 00:19:17 +01:00
Mariusz Gumienny
f6a21d5e18 added ability to copy words to the clipboard 2021-03-28 07:52:05 +02:00
Miodec
f9f4eb097c removed dom util, moved functions into relevant modules #495 2021-03-28 02:20:55 +01:00
BuildTools
c422e0c548 Merge branch 'master' of https://github.com/Smithster/monkeytype 2021-03-13 19:59:52 +00:00
BuildTools
0202a26dbf Added quote search 2021-03-13 19:51:35 +00:00
Miodec
8089580406 moved out of focus to a module 2021-03-12 21:00:15 +00:00
Miodec
0423577456 moved custom text to a module 2021-03-10 06:07:19 +00:00
Miodec
41dd0ace1f moved quote geting to misc file 2021-03-07 17:12:38 +00:00
Miodec
181cd58666 grouping languages on the setttings page 2021-02-18 01:34:32 +00:00
Miodec
44f0094be4 added helper function for checking if the test can be restarted,
stopping zen mode quick restarting
2021-02-13 22:50:15 +00:00
Miodec
ae2ce11eb7 monkey saving to config,
monkey going more insane when typing faaaaast
2021-02-05 18:31:43 +00:00
Miodec
355517ac53 fixed account page not loading properly,
added sign in with google,
added name check
2021-01-29 20:34:10 +00:00
Miodec
432b915806 moved fonts list file 2021-01-13 03:40:59 +00:00
Miodec
4645def6e3 renamed list.json files to _list.json so they appear at the top 2021-01-13 03:32:38 +00:00
Miodec
0b99ccdaff added a try catch to getlastchar function 2021-01-10 15:26:59 +00:00