The most customizable typing website with a minimalistic design and a ton of features. Test yourself in various modes, track your progress and improve your speed.
Find a file
torturado 44a67db9fc
feat(commandline): add download screenshot command (@torturado) (#6532)
### Description

This Pull Request introduces the functionality to download the result
screenshot directly as a PNG file, in addition to the existing option to
copy it to the clipboard.

This is achieved by:
1.  Refactoring the screenshot logic in `test-ui.ts`.
2. Adding a new `Download screenshot` command to the result screen
command list.

**Changes Made:**

*   **`frontend/src/ts/test/test-ui.ts`**:
* Created an internal function `generateScreenshotCanvas` that
encapsulates UI preparation, canvas generation with `html2canvas`, and
UI restoration.
* Modified the exported `screenshot` function to use
`generateScreenshotCanvas` and **only** handle copying the resulting
Blob to the clipboard (with the fallback of opening in a new tab).
* Added a new exported function `getScreenshotBlob` that uses
`generateScreenshotCanvas` and returns the resulting image Blob.
*   **`frontend/src/ts/commandline/lists/result-screen.ts`**:
* Renamed the `saveScreenshot` command to `copyScreenshot` (updating
`id`, `icon`, and `alias`) to more accurately reflect its action. It
still uses `TestUI.screenshot()`.
* Added a new `downloadScreenshot` command (`id`, `display`, `icon`,
`alias`) that:
        *   Calls `TestUI.getScreenshotBlob()` to get the image data.
        *   If a Blob is obtained, creates a temporary object URL.
* Creates a temporary `<a>` element, sets the `href` to the object URL,
and the `download` attribute with a filename (e.g.,
`monkeytype-result-TIMESTAMP.png`).
        *   Simulates a click on the link to initiate the file download.
        *   Revokes the object URL.
        *   Displays success or error notifications.

### Checks

- [ ] Adding quotes?
- [ ] Make sure to include translations for the quotes in the
description (or another comment) so we can verify their content.
- [ ] Adding a language or a theme?
- [ ] If is a language, did you edit `_list.json`, `_groups.json` and
add `languages.json`?
  - [ ] If is a theme, did you add the theme.css?
- Also please add a screenshot of the theme, it would be extra awesome
if you do so!
- [ ] Check if any open issues are related to this PR; if so, be sure to
tag them below.
- [x] Make sure the PR title follows the Conventional Commits standard.
(https://www.conventionalcommits.org for more info)
- [ ] Make sure to include your GitHub username prefixed with @ inside
parentheses at the end of the PR title. <!-- Remember to add your
username here! -->

---------

Co-authored-by: fehmer <3728838+fehmer@users.noreply.github.com>
Co-authored-by: Miodec <jack@monkeytype.com>
2025-05-07 16:21:30 +02:00
.github docs: update pull request template (@fehmer) (#6538) 2025-05-07 15:48:13 +02:00
.husky chore: update master pre-push script 2024-07-25 11:13:25 +02:00
backend refactor: move languages to contracts (@fehmer) (#6497) 2025-05-07 14:02:27 +02:00
docker chore: update mongodb version to 5.0.13 (@fehmer) (#6364) 2025-03-12 15:29:19 +01:00
docs refactor: move languages to contracts (@fehmer) (#6497) 2025-05-07 14:02:27 +02:00
frontend feat(commandline): add download screenshot command (@torturado) (#6532) 2025-05-07 16:21:30 +02:00
packages feat(language): add Thai 1K, 5K, 10K, 50K, and 60K (@jnx03) (#6498) 2025-05-07 15:30:26 +02:00
.dockerignore chore: update backend out dir 2024-07-25 19:59:05 +02:00
.editorconfig Add .editorconfig (#1976) 2021-10-10 16:09:32 +01:00
.eslintignore fix(docker): fix configuration endpoint, add configuration export (@fehmer) (#6317) 2025-02-27 10:48:59 +01:00
.gitignore chore: add sentry 2025-04-29 17:36:23 +02:00
.npmrc chore: switch from npm to pnpm (#5690) 2024-07-30 22:36:19 +02:00
.nvmrc chore: upgrade node to 20.16.0 (#5688) 2024-07-30 18:44:35 +02:00
.prettierignore feat(languages): add portuguese 320k and 550k (@jeffersonjpr) (#5698) 2024-08-02 14:13:31 +02:00
.prettierrc TypeScript FrontEnd: Add Account Files (#2494) 2022-02-19 17:44:27 +01:00
commitlint.config.cjs chore: update file extension 2024-07-22 16:58:49 +02:00
LICENSE Create LICENSE 2020-05-30 00:30:54 +01:00
monkeytype.code-workspace chore: add oxlint (@miodec) (#6455) 2025-04-16 17:18:50 +02:00
package.json refactor: move languages to contracts (@fehmer) (#6497) 2025-05-07 14:02:27 +02:00
pnpm-lock.yaml build(deps-dev): bump vite from 6.3.0 to 6.3.4 in /frontend (#6510) 2025-05-02 19:50:40 +02:00
pnpm-workspace.yaml chore: switch from npm to pnpm (#5690) 2024-07-30 22:36:19 +02:00
README.md docs: order oxlint badge correctly (@fehmer) (#6470) 2025-04-19 13:33:09 +02:00
turbo.json chore: only add sentry plugin when building from release package 2025-04-30 14:13:51 +02:00
vitest.config.js chore: fix test coverage not working with vitest workspaces (@fehmer) (#5764) 2024-08-11 17:50:26 +02:00
vitest.workspace.json chore: add vitest workspace configuration file 2024-08-11 00:14:39 +02:00


ChartJs Eslint Express Firebase Fontawesome HTML5 JQuery MongoDB OXLint PNPM Redis SASS TsRest Turborepo TypeScript Vite Vitest Zod

About

Monkeytype is a minimalistic and customizable typing test. It features many test modes, an account system to save your typing speed history, and user-configurable features such as themes, sounds, a smooth caret, and more. Monkeytype attempts to emulate a natural typing experience during a typing test by unobtrusively presenting the text prompts and displaying typed characters in place, providing straightforward, real-time feedback on typos, speed, and accuracy.

Features

  • minimalistic design, with optional advertisements and focus mode while typing
  • type what you see, see what you type
  • live errors, wpm, and accuracy displays
  • a variety of test lengths and languages
  • punctuation and numbers modes
  • quotes
  • themes
  • smooth caret
  • account system
  • challenges and just-for-fun test modifiers
  • and much more

Discord bot

On the Monkeytype Discord server, we added a Discord bot to auto-assign optional roles based on typing performance and challenge completion. You can find its code over at https://github.com/monkeytypegame/monkeytype-bot.

Bug report or Feature request

If you encounter a bug or have a feature request, send us an email, create an issue, create a discussion thread, or join the Discord server.

Want to Contribute?

Refer to CONTRIBUTING.md.

Code of Conduct

Before contributing to this repository, please read the code of conduct.

Security

To report a security vulnerability, please refer to SECURITY.md.

Credits

Montydrei for the name suggestion.

Everyone who provided valuable feedback on the original Reddit post for the prototype of this website.

All of the contributors have helped implement various features, add themes, fix bugs, and more.

Support

If you wish to support further development and feel extra awesome, you can donate, become a Patron or buy a t-shirt.