4 ms·
Kudos for "shipping" something. That is the hardest part sometimes. As per your request for feedback (though I wouldn't say I'm smarter than you), some thoughts
by WesleyJohnson 16y ago
Kudos for "shipping" something. That is the hardest part sometimes. As per your request for feedback (though I wouldn't say I'm smarter than you), some thoughts:
1) The link to your github repo is broken on your blog post.
2) In your manifest.json, you're setting permissions to "tabs", "www.google.com", "http://*/* http://*/* and "https://*/* https://*/*. If I'm not mistaken, the urls listed in the permissions field are for urls you'd like your extension to be able to call out to when doing AJAX requests, posts, etc. Enabling your app to make cross-site request to every domain, when you really only need google.com for the calendar, might throw up a red flag to more security-conscious users.
3) You're injecting a blank css document into every url the user visits. I would remove this unless you're planning on adding some styles into the css file.
4) The only other thing I see is more preference: You're doing a lot of work with the browser's dom api to create elements in your content script. Since you're already including jQuery in your extension, it would be trivial to inject the jQuery.js file into the page via your content script and use the power of jQuery to create your dom elements in far less code. Of course, there is nothing wrong with doing it in using raw JavaScript since it's targeted at a single browser and you don't need to worry about being cross browser compatible.
Thanks for posting, I'm always curious to see how other extensions are put together and might take away some ideas on interacting with google services.
- joshholat 16y agoWesleyJohnson, Thanks for the feedback! 1) The link should be fixed now. Thanks for informing me about that. I think I had a return character in it accidentally. 2) Okay, that makes sense. I think you are correct because when the user installs the extension it says something along the lines of needing access to basically any data. Obviously, my extension wouldn't need all that data. That must be the issue then. 3) Ahh, right. I had some stuff in there at one point but then decided to not use it. Must've forgot to delete it. 4) I had thought during the process that there was probably a better way to do it. However, for sake of just getting something out there I've left this code as is. Believe it or not, it was worse at one point. I'll look into other ways of doing it, though. Thanks again.