Chrome extensions - a short story with a happy ending
So, over the long-weekend I'm taking to visit family with my wife, I saw a tweet.
My friend @substitute suggested replacing every technobabble instance of "cloud" with "the Moon" and it's changed my life
— Pinboard (@Pinboard) January 6, 2012
Which got a tweet.
@Pinboard @substitute I would totally install a browser extension that made this a reality.
— Matt Hauger (@matthauger) January 6, 2012
Which gave me an idea (namely, "Oh, sure.").
@matthauger @Pinboard @substitute @brandonpittman Your wishes have been granted! is.gd/tIyKs3
— Steven L (@Groxx) January 7, 2012
Which lead to a frustration.
Which lead to a solution.
Which is available here: https://github.com/Groxx/Chrome-Extension-Boilerplate
Ever made a Chrome extension? It's really, shockingly easy to do most things, but the boilerplate is pretty hefty, and the documentation doesn't really give you a quick-start option. It's especially hefty if you want to have an options page, which just about every extension should have, because then you can have 'about' text, contact info (if you want it), and most importantly, an off switch. Which my extension currently lacks (sorry about that! It's coming, I promise!).
So I fixed it. Partially - it's basically all the options page right now, though a small amount of helpers are coming in time for basic stuff like script communication and one-time injection. It's also currently dependent on jQuery (which I plan on removing, but it helps with building it). The styles are pretty basic and possibly terrifyingly-poorly made. It needs more documentation and boilerplating, especially for the manifest.json file.
Though I am pretty happy with the localization setup - much, much easier than messing around with it other ways I've tried.
But it's good enough for me, and I'll be battle-testing it on some of my past (and future) projects, and will be making and pushing changes and whatnot. If you (or anyone you know) could benefit from it, or might find it interesting, or could lend a hand, I'd love input! Give it a try and leave me a comment somewhere/how!
This has been a productive vacation :)




Comments [0]