Chrome HypeMachine Extension; Finally got around to it.

Published 2011-05-25 on Farid Zakaria's Blog

Fixed.

Seems like it's a continous battle between me having to fix my extension and Anthony Volodkin breaking it.

Rightfully so as I guess they really don't want users to easily download the music from their site.

The Chrome Extension for Hype Machine was broken around 2 weeks ago, and I finally had gotten around to fixing it!

Click the image below to get the extension.

Chrome Web Store Picture

My Inexperience

Took me longer to find the reason for it being broken than I'd like to care to admit. As I've mentioned earlier, I don't have much experience with Javascript,HTTP ,CSS and Web-development in general. Finding the culprit was more from my determination at prodding and learning as I go. Turns out the fix was really simple, and I missed it easily because I have no experience specifically with CSS. Here was the culprit for those that are interested:


function ext_load(ext, vis) {
    if (ext && (/Firefox/.test(navigator.userAgent) || /Chrome/.test(navigator.userAgent))) {
        setTimeout(function () {
            if ($$('.gmlink').length || $$('.cext').length || $$('.tri').length) {
                var head;
                var script;
                head = $$('head')[0];
                if (head) {
                    script = new Element('script', {
                        id: "ext_adview",
                        type: 'text/javascript',
                        src: '/js/ext_adview.js'
                    });
                    head.appendChild(script);
                }
                pageTracker._setVar('ext_check');
            }
        }, 5000);
    }
}

Although a number of fixes were possible, I took the laziest. I just renamed my CSS attribute names.