Hi

Browse like Xerces, the
GOD KING OF THE PERSIANS

This talk isn't:

This talk is:

Creators not consumers

Chapter 1

Darius the Wizard Slayer

Darius was an active emperor, busy with building programs in Persepolis, Susa, Egypt, and writing many Extensions in the Chrome Web Store. Wikipedia (retrieved just now)

The Story of Darius

Knowing what's real

Shapeshifting wizard ✓

Dead King ✗

Demo time

An extension

Eye Size Calc


var eyeSize =
  ( Math.sqrt(Math.pow(eyeDistanceX,2)
    + Math.pow(eyeDistanceY,2)) )
  / EYE_SIZE_TO_DISTANCE_RATIO;
  

Chapter 2

Xerces

Jumping the wall


var injectJSFile = function(file) {
  var url = chrome.extension.getURL(file);
  var script = document.createElement('script');
  script.src = url;
  document.querySelector('head').appendChild(script);
}

injectJSFile('injectme.js')

In your manifest.json:

"web_accessible_resources": ["injectme.js"]

Demo time

Chapter 3

Whipping the Sea

Soon Chrome will have keyboard shortcuts for extensions

So you can listen directly from the background app

Demo time

Chapter 4

Conquering

If only there was a programming language in the browser

Thankyou

Make an API for anything with MutationSummary


var observer = new MutationSummary({
  callback: function(summaries){
    // Only 1 query, so only one summary.
    log('summary', summaries[0])
    summaries[0].added.forEach(function(addedElement){
      …
    })
  },
  queries: [{ element: 'someelementype.someclass' }]
});

Demo time

Browsing tips from 2500 year old Zoroastrians:

Thanks.

@mikemaccana