Use custom text from query parameters #3998
-
Adding the ability to pass in custom text in the URL will enable creating web extensions that pass on the text to monkeytype. Example: An extension which lets you select the text you want to read from any website and import it into monkeytype so you can type it while reading. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You can encode the custom text settings into the URL by pressing esc > share test settings. If you want to create such extension just check how the encoding works and creating the links should not be a problem. |
Beta Was this translation helpful? Give feedback.
-
Thanks @Miodec this helped! const getMonkeyTypeLink = (text) => {
const settings = JSON.stringify([
"custom",
null,
{
text: text.split(" "),
isWordRandom: false,
isTimeRandom: false,
word: -1,
time: -1,
delimiter: " ",
},
null,
null,
null,
null,
null,
]);
return "https://monkeytype.com/?testSettings=" + compressToURI(settings);
}; |
Beta Was this translation helpful? Give feedback.
You can encode the custom text settings into the URL by pressing esc > share test settings. If you want to create such extension just check how the encoding works and creating the links should not be a problem.