Chrome HypeMachine Extension
UPDATE: I posted a cleaned up version of the extension on the chrome gallery. Check it out here.
After finishing the hypemachine batch downloader script, I decided to see if I can leverage my investigation into their website into making an extension for a popular browser. I decided to make a Google Chrome Extenson simply because it is the browser of my choice. From what I was told, aparantly a lot of the headaches I encountered writing the script could've been avoided writing a Firefox script instead and using greasemonkey instead.
I know there was a version of this for greasemonkey before and possibly chrome. I couldn't find it however (saw it mentioned on some sites) and they noted that they were no longer working.
So please download the extension and alpha test it for me. I already know of some improvements to make and will update it and throw it up on the extension gallery once its solid.
Hacking the Isolated World
You can however perform crossite Http Requests which coupled with my workaround is pretty crazy.
The workaround to the isolated wold is really hacky but works. You can easily append to the HTML contents of the page, so simply append a string that contains the script tag as well as the script!
I largely did this knowing very little jQuery as well as web programming.
Most Some of it is still lost on me. For instance, I am confused about the return values from the .each() function performed on the $$('ul.tools').
- index returns a HTMLElement
- $(this) returns the DOM object
I am confused about why I get back the DOM object...
It was super annoying writing the whole script embedded within a string because it was confusing remembering whether I needed to single, double or triple escape quotes that are nested since I had strings in strings...
You can download the HypeExtension here.