Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Kimono Chrome Extension (GLG 2015.02.11)

Avatar for Andy Zeldis Andy Zeldis
February 11, 2015

Kimono Chrome Extension (GLG 2015.02.11)

Avatar for Andy Zeldis

Andy Zeldis

February 11, 2015

Other Decks in Technology

Transcript

  1. Bookmarklet • Wrap and serve pages with our UI injected.

    • Subject to cross-domain security restrictions • Can break internal links • Difficult to sandbox UI
  2. Chrome Extension • Maintain state in browser, between pages •

    Permits access to page DOM • Framework support for overlay UI • Session sandbox (Incognito)
  3. Goals • Incremental changes to existing code • Add features

    enabled by Chrome’s privileged APIs • Continue to support other browsers via bookmarklet
  4. Anatomy of a Chrome Extension • .crx: specially constructed zip

    file • manifest.json defines metadata and structure • Special powers exposed through chrome.* APIs • background script runs at application level - e.g. manage use of incognito window • browser action adds our button to Chrome’s chrome • content script to inject our code when necessary
  5. Anatomy of our Chrome Extension • background script runs at

    application level • browser action adds our button to Chrome’s chrome • content script to inject our code into page • toolbar code is loaded via XSS Toolbar
  6. Test // enable incognito driver.extend.enableIncognito(2); // wait for load driver.get("http://localhost:8000/reddit");

    driver.extend.exists("#kim-Toolbar"); // switch to incognito window driver.extend.toNextWindow();
  7. Publish • Generally not needed • Use Chrome Developer Dashboard

    to publish to Chrome Web Store • Ties in to Google Analytics