10

2

Currently, in order to get the installer for the latest version of FogBugz, I have to do this:

  • click on the "A newer version of FogBugz is available." link which takes me to the "Newer Version Available" page
  • click on the "Fog Creek Online Store:"
  • go find my order number
  • log into the "Manage Your Orders" page
  • click the "Download the latest version" link
  • click the "Download FogBugz x.x.x for X" link

If I'm logged into FogBugz, you know I am a licensed user, so couldn't you just add another link to the new version notification that lets me download it? For example:

A newer version of FogBugz is available. Click here to download installer. (Dismiss this message)

Fog Creek Case FC2037504

flag

1 Answer

1

Until FogBugz adds that feature, you can fake this functionality by using the following bugmonkey script (for logged in admins):

(function() {
    var newer = $("span.messageBar:contains(A newer version of FogBugz)");
    if (!newer.length) return;

    var email = "YOUR EMAIL HERE";
    var orderNumber = "YOUR ORDER NUMBER HERE";
    var msg = "Click <a>here</a> to download the installer.";

    newer
    .html(newer.html().replace("available.", "available.  " + msg))
    .find("a:not([src])")
    .attr("href", "javascript:void(0)")
    .click(function() {
        var div = $("<div>").css("display", "none").appendTo("body");

        var frm = $("<form>").attr({
            method: "POST",
            // target: "_blank", // Uncomment if it should open in a new window 
            action: "https://shop.fogcreek.com/FogBugz/status.asp"
        }).appendTo(div);

        var data = {
            sEmail: email,
            ixOrderNum: orderNumber,
            cmd: "cmdListOrders"
        };
        for (var name in data)
            $("<input>").attr("name", name).val(data[name]).appendTo(frm);

        frm.submit();
    });
})();

This simulates you filling out and submitting the order lookup form; clicking the link will send you straight to the download page. (It's not the actual download link, but it's pretty close.)

Warning: If you don't say the script is for logged in admins only, then you'll be exposing your email/password to any users that the script is available to.

link|flag
Pretty cool. That makes it a bit easier. Thanks. – Greg Saven May 21 2010 at 17:14
I just discovered it breaks the links. I can't open them in a new tab. I can't live with that. – Greg Saven Jun 3 2010 at 15:46
@Greg: When you say "it breaks the links" are you saying that you can't open the "here" link (to download the installer) in a new tab? – Daniel LeCheminant Jun 3 2010 at 18:13
I don't like the fact that it changes all of the links to javascript:void(0). Because of this the other 'normal' links do not work so you can not dismiss the message. – Grik Nov 9 2010 at 15:39

Your Answer

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