[Feature Request] Optimizing TPAM therbligs w/ simple UI script change

A simple suggestion, from a user of TPAM Version: 2.5.914.0190:

The HCI usability of the TPAM web interface could be improved by auto-selecting the text of the password <SPAN> element (ie. class="coloredPassword").  This would save users a few (irritatingly unnecessary) mousing and occasional browser quirks, also increasing accessibility in the process.  Users would then simply click the "Password" button/tab, and have the password displayed, already selected.  Out of the (dare I call it "clunky"?) multi-step process of submitting a password request, manually selecting the password text is one of the "clunkiest" steps.  Making it more streamlined would return a small fraction of my soul to me, every day.

Based on some examples from http://stackoverflow.com/questions/985272/selecting-text-in-an-element-akin-to-highlighting-with-your-mouse, the implementation might look something like this:

function selectElementText(el, win) {
    win = win || window;
    var doc = win.document, sel, range;
    if (win.getSelection && doc.createRange) {
        sel = win.getSelection();
        range = doc.createRange();
        range.selectNodeContents(el);
        sel.removeAllRanges();
        sel.addRange(range);
    } else if (doc.body.createTextRange) {
        range = doc.body.createTextRange();
        range.moveToElementText(el);
        range.select();
    }
}

selectElementText(document.getElementsByClassName("coloredPassword"));

Parents Reply Children
No Data