Menu
i am trying to write this simple script for use in greasemonkey that will not allow me to login to a website with a certain screen name. this is what i have, there seems to be a problem with the ‘if’ part of the script.
function newsubmit(event) {
var target = event ? event.target : this;
if (window.getElementById(‘userid’).inputtext.value = “someid101”) {
alert(‘Can’t login with someid101’);
}
else {
this._submit();
}
}
window.addEventListener(‘submit’, newsubmit, true);
HTMLFormElement.prototype._submit = HTMLFormElement.prototype.submit;
HTMLFormElement.prototype.submit = newsubmit;