Luckily, the example you link to is fairly simple and does not use any app-specific API.
Thus, it should be easy to convert it to an extension by slightly modifying the manifest:
// Replace that:
"app": {
...
},
// With this:
"browser_action": {
"default_title": "Test Extension",
//"default_icon": {
// "19": "img/icon19.png",
// "38": "img/icon38.png"
//},
"default_popup": "main.html"
},
(I haven't tested it myself, but it should work...)