Your First Chome Extension
I made my first browser extension recently. Turns out that it is refreshingly easy.
I use Google Chrome. One of my favorite websites is SlickDeals.net, which I must admit to occasionally browsing at work. The problem is that SlickDeals makes its money via referrals. i.e. if I post a link to newegg.com, SlickDeals parses the URL and generates a redirect via a referral URL.
So:
http://www.newegg.com/Product/Product.aspx?Item=N82E16889005129
becomes:
http://slickdeals.net/?sdtid=2702819&sdfpid=47595&sdop=1&sdfid=9&u2=http://www.newegg.com/Product/....
This would be fine, however my work blocks all the intermediate sites the modified link redirects via, so it is necessary to copy the http://www.newegg.com/…. URL, which fortunately is in plaintext, from the modified URL and paste it into a new window.
After doing this 100 times or so I was pretty fed up so I wrote an extension to parse the modified URLs and return them to their original form.
Creating a Chrome extension to parse and modify page content