I want to disable the ability of all webpages to auto-highlight the contents of text input form fields via a greasemonkey script (for FF3.6). This is my first attempt:
// ==UserScript==
// @name Prevent Auto-highlight
// @namespace quintopia
// ==/UserScript==
HTMLInputElement.prototype.select = function() {
//do nothing
}
But this doesn't work. Is it because it loads after the rest of the page and so doesn't get applied to the input fields after they are created? Do I need to manually loop over the DOM, find every input field, and override its select manually to get this to work? (I haven't tried this because I don't want to do it this way unless it truly is the best way. I ask in order to learn the "best" or "standard" way of doing this sort of thing.)