How to set value of input in Tapermonkey script

This Tapermonkey script will find <input id="myinput"> and set its value to newvalue.

(function() {
    'use strict';
    document.querySelector("input#myinput").value = "newvalue";
})();

You’ll need to add a suitable header – it’s often best just to use the default template and modify only the URL.