This script removes the input length limit which can trip up Plover users.
Simply install the script into TamperMonkey (Chrome) or GreaseMonkey (Firefox) and get racing.
The script was created by community member nimble
// ==UserScript== | |
// @name Typeracer - No input limit | |
// @namespace https://opensteno.org/ | |
// @version 0.2 | |
// @description no more TypeRacer length limit | |
// @author nimble | |
// @match https://play.typeracer.com/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
let inputBox = document.getElementsByClassName('txtInput'); | |
const inputOptions = { | |
attributes: true, | |
attributeList: ['maxLength'], | |
}; | |
const bodyOptions = { | |
childList: true, | |
subtree: true, | |
}; | |
const maxLengthObserver = new MutationObserver(mutations => { | |
mutations.forEach(mutation => { | |
mutation.target.removeAttribute('maxlength'); | |
}); | |
}); | |
new MutationObserver(() => { | |
for (let node of inputBox) { | |
maxLengthObserver.observe(node, inputOptions); | |
} | |
}).observe(document.body, bodyOptions); | |
})(); |
subTree
should besubtree
. JavaScript is case-sensitive. (however the current script still works because it isn't necessary to listen for subtree changes)