development with Yeoman • Building a Firefox extension • Building a Chrome extension • Building reusable code for both browsers • Conclusions • Next Steps • Links • Credits
Extensions lets you quickly set up an extension with the basic file structure and recommended settings. https://github.com/dgil/generator-firefox-extension
extension and then run: $ yo firefox-extension What would you like to call this extension? RSS Lector How would you like to describe this extension? My Firefox Extension Would you like to see a popup when toolbar's button is clicked? Yes Would you like to use a content script? No
file and load it from popup.html • We need to define a container where the items in the feed will be included • Tip: use templates to simplify code • Tip: we can add dependencies with Bower like Lodash, jQuery or Bootstrap
out there, but I suggest using Google Feed API: The Google Feed API takes the pain out of developing mashups in JavaScript because you can now mash up feeds using only a few lines of JavaScript, rather than dealing with complex server-side proxies. This makes it easy to quickly integrate feeds on your website. https://developers.google.com/feed/v1/
extension and then run: $ yo chrome-extension ? What would you like to call this extension? RSS Lector Chrome ? How would you like to describe this extension? My Chrome Extension ? Would you like to use UI Action? Browser ? Would you like more UI Features? ? Would you like to use permissions?
up all of your dependencies. http://browserify.org This is what we need We can use the modules defined using the CommonJS style in Chrome with Browserify + Grunt. Easy to implement We can load all modules using Browserify in the Grunt’s Watch task so we only need to include the compiled file in the manifest.json
about extensions. Here are some ideas: • Use a background script to retrieve items for your RSS Reader while the user is navigating • Store the fetched items from RSS feeds in a local storage system • Use a Content Script to modify some website • Use a Content Style to modify the design of a website • Learn and use MutationObservers