klickr/klickr-chrome — pull request #1 by lramsey (2014-04-10 04:52:56+00:00)
Title: Multi page

1) refactored player so that data can be passed throughout and passed to createNewKlick. playKlick accepts an action called playNextKlick, which is the same as playStagedKlick
2) createNewKlick function alters the data object, sends the data to the sendToBackground function and then redirects to new url
3) sendToBackground sends the data to the background in a nextKlick message.
4) make listener in background.js for nextKlick. stores klick received from player in window.nextKlick, which would be false if nextKlick does not hold an object
5) in player send a message called domReady to background.js, to signal background that the nextKlick can be sent down
6) in background.js, listen for domReady. if nextKlick is an object, then send nextKlick down to player with the playNextKlick action.