I'm trying to auto-change the maximum value of an input field automatically using a tampermonkey script, this is the code of said input feild:
<input id="nick" class="form-control" placeholder="Nick" maxlength="15" autofocus>
The maximum value of the input field is 15, im trying to have it auto-change it to 100 every time i reload the page by using this code:
document.getElementById("nick").value = "100";
For some reason this does not work, i tried setting the "id" to "maxLength" instead but then i get this error, "Cannot set property 'value' of null" How can I get it to change the input field to 100 every time but not get this error? Thanks for your time.