* added button to opt out of leaderboards
* also not allowing daily leaderboards
* also not allowing weekly lb
* added lb opt out notice on the leaderboards
* updated message
* resetting lboptout state on account reset
* showing error when fetch failed
* added function to only use an array of middlewares in production
* allowing patch configuration and get schema if user is a configuration mod
* fixed empty middleware not working as expected
* input-controller
* result
* Finishing logic
* Numbers + layoutfluid
* One interface
* Filter results
* tts error on undefined
Extencions like NoScript can partly block scripts on the page.
If speech synthesis is not loaded, notification shows up
without freezing the page
* Improved randomcase
* Prevent dublicates in command line
* Change filter logic
* Prettier
* Convert numbers
* num
* Quote and zen modes
* withWords
* Misc
* Expand funboxes list for pb saving
* Move list to backend
* Move to constants
* Async withWords, checkFunbox tweak
* Prettier
* Forbid nonexistent funboxes
* Disable speech if language is ignored
TtS's init() uses setLanguage()
* canGetPb
* Less circular imports
* Ligatures typo
* Simon says blocks word highlight
* blockWordHighlight backend
* Changed imports
* usesLayout
* JSON schema
* Display notification instead of reseting
* canGetPB
* One getWordHtml
* Dividing properties
* No sync
* blockedModes
* forcedConfig
* Infinitness parameter, list sync
* applyConfig, memory
Remove extra applyConfig somewhere;
Memory in quotes and custom modes
* I lost this code after merging
* Remove arrowKeys
* isFunboxCompatible
* Fix logic
* sync canGetPb
* remove FunboxObjectType
* baloons
* moved cangetpb function to pb utils
* updated the pb check to be easier to understand
* Refactor isFunboxCompatible
* Check modes conflicts
* Strict highlightMode type
* Only one allowed or blocked highlight mode
* More checks
* Undefined only, not false
* Prettier
* Highlight modes
* added intersect helper function
* reworked forced config
- storing allowed modes as an array, not string
- first value will be used if config is outside of the allowed values
- instead of checking if highlight mode is allowed, checking if the whole config is available
- removed the "Finite" forced config and replaced it with "noInfiniteDuration" property
- config event listener now checks every config change, not just highlight mode. this will ensure any future forced configs will work straight out of the box
* ManualRestart in commandline
* fixed funbox commands not correctly showing which funbox is active
* Upd list
* Reduce list
* split funbox into smaller files
moved funbox files into its own folder
* missing none command
* added function to convert camel case to space separated words
* changed config validation to be blocking the change rather than reacting to the change
* reduced code duplication
* allowing sub color flash
* moved keymap key higlighting and flashing into an observable event
* moved tts into a observable event
* passing funbox into config validation funcitons
* replaced getActive with get
* only keeping functions structure in the list, moved the actual function bodies to funbox.ts
done to remove a circular dependency
still need to finish the rest of the funboxes
* removed empty function definitions (typing issues)
* removed unnecessary type
* unnecessary check
* moved mode checking to config validation
* longer notification
* checking funboxes before changing mode
* moved more functions
* fixed incorrect type
* checking funboxes when setting punctuation and numbers
* Rest of funboxes
* fixed funbox commands showing tags text and icon
* checking if funbox can be set with the current config
* better error message
* validating with setting time and words
importing from a new file
* added a function to capitalise the first letter of a string
* using function from a new file
new parameters
* moved test length check to a function in a different file
* moved some funbox validation into its own file
* only showing notifications if the setWordCount returned true
* moved funbox validation to its own file
* setting manual restart when trying to set funbox to nonoe
* moving this validation to before activating the funbox
* returning forcedConfigs along side if current value is allowed
moved infinite check to checkFunboxForcedConfigs
* removed function, replaced by funox validation
* removing duplicates
* throwing if no intersection
* wrong type
* always allowing setting funbox
sometimes it might be possible to update the config
* checking forced configs first, and updating config if possible
only setting funbox to none when couldnt update config
* basic difficulty levels
* xp funbox bonus
* removed console logs
* renamed import, renamed type
* lowercase b for consistency across the codebase
* renamed variable for readability
* renamed for clarity
* converted metadata to object
* changed from beforesubgroup on the command to before list on the subgroup
* using code suggested by bruce
* renamed type
* removed console log
* merch banner fix
* important animation
* updating the icon of "none" funbox command
* removed unnecessary import
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Miodec <jack@monkeytype.com>
* Save speed stats in leaderboard update
Saves a histogram data structure of speeds for buckets rounded to the nearest 10.
Signed-off-by: Brian Evans <ebrian101@gmail.com>
* API endpoint to get public speed stats
Signed-off-by: Brian Evans <ebrian101@gmail.com>
* Add APE class for public stats (WIP)
I created an APE class for accessing public stats. Also stubbed getting and showing the public speed stats on the about page. Haven't implemented the histogram yet though.
Signed-off-by: Brian Evans <ebrian101@gmail.com>
* Draw histogram for global speed stats
On about page
Signed-off-by: Brian Evans <ebrian101@gmail.com>
* Update histogram colors on theme change
Signed-off-by: Brian Evans <ebrian101@gmail.com>
* Fixed out-of-order data in speed histogram
Data was not sorted correctly, which resulted in an incorrect histogram being drawn.
Signed-off-by: Brian Evans <ebrian101@gmail.com>
* Public speed stats PR fixes
Small fixes based on PR feedback:
- changed _req to req
- removed unnecessary client version header
Signed-off-by: Brian Evans <ebrian101@gmail.com>
* Add endpoint for typing stats
New endpoint to retrieve the public typing stats such as global count of tests completed.
Signed-off-by: Brian Evans <ebrian101@gmail.com>
* Renamed public-stats to public
Except in cases where it would cause an identifier named `public` as this is forbidden in strict mode.
Signed-off-by: Brian Evans <ebrian101@gmail.com>
* Add stats section to about page
In this commit:
- add a section above about called stats
- display typing stats in three columns
- underneath show the histogram of speeds on english time 60
- make chart responsive
Signed-off-by: Brian Evans <ebrian101@gmail.com>
* Add unit test for Public DAL
Signed-off-by: Brian Evans <ebrian101@gmail.com>
* updated styling
* only requesting data once per session
* going one column on narrow screens
* added option to specify number of decimal poitns
* just showing million instead of abbreviating
updated structure
updated styling
Signed-off-by: Brian Evans <ebrian101@gmail.com>
Co-authored-by: Miodec <jack@monkeytype.com>
* Add xp reward overrides
* edge case
* switched to defined brackets instead of just min and max
* foreach
* moved type to its own interface
* updated spec
Co-authored-by: Miodec <bartnikjack@gmail.com>
* Implement streaks
* Improve code
* Update package.json
* Store streak on the user
* Pretty-fix
* Ensure that streak is up to date
* Fix issue in streak calculation
* Revert prettier changes
* Update polish.json
* Update db.ts
* Remove initial calculation
* Write mandatory test
* using strict equality
* moved functions to the utils file
* importing utils
* adding streak to breakdown,
rounding and parsing streak modifier
* renamed variable
* renamed fields
* using correct field name
* added streaks to configuration
* showing streak during xp breakdown
* incrementing streak earlier
checking configuration before applying modifier
* returning streak to the client
* setting local streak with the number returned from the backedn
* only reading streak when updating profile instead of updating
* sending streak information in profile
* only showing streak if greater than 0
* setting to empty if no streak
* renamed config property
* updated streak calculation
* refactored isYesterday
* refactored streak update
* only displaying if streak larger than 1
* merged configuration properties into 1
* added configuration for max streak bonus
* added isToday check back (derp)
* reverted streaks back to multiplier approach
* using better maprange functin
* removed import
* moved test to dal spec
* clamping
* removed imports
* fixed test
* increased coverage
* removed angry console log
* typo
* using date now instead of dates
* mocking date now
awaiting expect
* not using date
Co-authored-by: Anonymous <110769200+fasttyperdog@users.noreply.github.com>
Co-authored-by: Rizwan Mustafa <rizwanmustafa0000@gmail.com>
Co-authored-by: Miodec <bartnikjack@gmail.com>
* Add new rate limiting flow
* Oops
* Fix nit
* Fix some bugs
* Split key generation functions
* Remove 429
* Change message for root limiter
* Flag 429 and add config
* Add status code config
* Check enabled flag
* Add custom status for ape keys
* Bump coverage
* swapped conditions around
whats the point of checking if the status code is in the array if the whole thing is turned off anyway
Co-authored-by: Miodec <bartnikjack@gmail.com>
* Fixed badges not showing on all time leaderboards
* updated types to support inventory and single badge id
* Add badge selection
* Fix bug
* Remove unnecessary prefill
* using new inventory system
* added no balloon option
* updated text color
* not showing balloon
* updated styling for showing badges selection
* Add badge selection
Co-authored-by: Bruception <bberr022@fiu.edu>
* added inventory type
* new badges
* fixed badges not showing on all time leaderboards
* sending the selected badge id to daily lb
* returning inventory in profiles
* updated types to support inventory and single badge id
* fixed all badges not showing on profile page
* removed await
* smol refactor
* profile
* rounded table corners
* rounded leaderboards corners
* wider page by default
* v3
* font changes
* new pbtables
* blank by default
* showing pb popup
* removed some quotes
* rounding displayed acc
* removed created date (will be shown in profile)
* added profile module that fills the profile element
* updating font size in the middle of the swap to make the change not noticeable
* lowered max font size
* showing if user is banned,
not displaying most details if user is banned
* pbs not selectable
* renamed global stats to time typing
* completed previous commit
* changed function parameters
* only hiding when social is missing
* smaller badge
* aligning quick results
spanning time if wide
* larger badge
* fixed function parameters
* moved to root
* media queries
* Add user profile API (#3123) bruception
* Add flattenObjectDeep
* Add user profile API
* Bump coverage
* Add user profile configuration and rate limits
* Rename profile -> profileDetails
* Simplify
* Filter personal bests
* Handle banned users
* Add banned user test
* new profile layout system
"none" layout finished
* better "none" layout
* "socials" layout
* larger gap
* bioandkey layout done
* "both" layout finished
* final touches
* Add profile editing (#3135)
* Add profile editing
* lowered font size
increased right padding
* updated configuration schema
* moved discord integration to users object in configuration
* added warning comment
* rendering new lines
* edit popup styling
* Sanitize ZAlgo text
* Use trim
* Replace more than 2 spaces with two spaces
* Trim first
* Add profanity detection
* Ass
* Removed some profanities
* Update profanity detection
Co-authored-by: Miodec <bartnikjack@gmail.com>
* Add profile routing (#3143) bruception miodec
* Add profile routing
* removed check (also fixes circular deps)
* change page in special cases
* Hydrate profiles
* Link leaderboards to profiles
* Add failed to load div
* Dont refresh page
* always calling middle callback
* moved profile css into its own file
* fixed one media query
* added preloader, changed default layout
* added reset function
changed function name
updating profile before the page is shown, not after
* resetting after the page is hidden and before its updated
* Fix logic to not delete user if DB goes down (#3171)
* Dont route to account if uid equals current user uid
* temporairly allowing quicktab
* added copy link button
* only increasing padding on the account page
* set max height
* handling copy link button
* only showing avatar if it exists
* 1000 instead of 100
* removing placeholder if image request was successful
Co-authored-by: Miodec <bartnikjack@gmail.com>
* Fix quote length field
Co-authored-by: Miodec <bartnikjack@gmail.com>
* Added `ResultFilters` to types
Added customFilters field to user
This field is an optional array of `ResultFilters`
It will store a user's custom filters
* Added Add and Remove functions for `ResultFilters` in user DAL
Also added unit tests
* Added Custom Filter configuration
Can now enable/disable the custom filters feature
Can also set a cap on the number of filters per user
* Add and Remove functions for `ResultFilters` in user controller
* Add server configuration panel
* Remove unnecessaary check
* Remove break
* styling changes
showing when configuration was saved
* changing color based on response
* Remove comment
* Changes
* Add support for arrays
* Arbitrary nesting
* Add array item controls
* added button to quickly open the configuration panel
* removed excessive padding
* text inputs same height and style as checkboxes
* monkey stylng
Co-authored-by: Miodec <bartnikjack@gmail.com>
* added auto ban if user triggers anticheat too much
* updated base configuration
* autoban is optional
* storing updated autoban array
* only checking autoban in time 15 and 60
* miliseconds
* removed unnecessary if check
* returning if already banned
* storing now in variable
greater not greater equal
* moved constant outside function
* using partial type
* renamed variables
* renamed to autoBanTimestamps
* added autoban tests
* increased coverage minimum
* slightly better test
* added autoBanTimestamps checks to other tests
* bot-commands rename
* removed bot dal
* reomoved unnecessary configuration entry
* quotes:code_javascript: Add regex-heavy quote. (#2929) markstos
* quotes:code_javascript: Add regex-heavy quote.
This quote contains a long regex that will be a workout for typing
symbols and numbers.
Source code can be confirmed to available under an open source license
here: https://github.com/markstos/parse-coordinates/blob/master/index.js
* fixed length
Co-authored-by: Miodec <bartnikjack@gmail.com>
* fixed script names
* fixed incorrect path
* definitely didnt forget about those
Co-authored-by: Miodec <bartnikjack@gmail.com>
Co-authored-by: Mark Stosberg <mark@rideamigos.com>
Co-authored-by: Jack <jack@monkeytype.com>