Re-merging pull request #18 (Basic changes required for Typo.js works in other places than in Chrome extension). Looks like it got clobbered with the last commit.