1

We're up to seven digits in our bug IDs; past the point of easily memorizing them. Since they are links, they're difficult to select for copy/paste. Is there an easier way to select them?

flag

1 Answer

4

There sure is! This BugMonkey script automatically highlights the bug ID link when you right-click it, so copying is as easy as right-clicking the link and choosing "Copy" from the context menu.

name:          Highlight ixBugs
description:   Eases copying of bugids.
author:        Kevin Gessner
version:       1.0.0.0

js:

    // on right click, highlight the text of bug links. This happens before the context
    // menu appears, making copying the bugid easy.
    $('a.headline-inverse, a.vb, a.uvb, .ixBug a').live('mousedown', function(e) {
        var s = $(this).text().trim();
        if (!/^\d+$/.test(s)) return;
        if (getButtonCode(e) == MOUSE_BUTTON_LEFT) return;
        if (!document.createRange) return;
        var range = document.createRange();
        var textNode = this.firstChild;
        range.setStartBefore(textNode);
        range.setEndAfter(textNode);
        var selection = getSelection();
        selection.removeAllRanges();
        selection.addRange(range);
        return false;
    });
link|flag

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.