This is a javascript implementation of a TOTP generator, using the browser's crypto API. It should do the exactly same thing as the google authenticator or any other TOTP generating app.
The javascript code does not send to or fetch any data from anywhere remotely, and the demo page should work the same when served over https, saved locally or used inside a browser extension.
I have also packaged this into an xpi firefox browser extension, which offers the convenience of generating the TOTP (for a key you have saved) directly from a toolbar popup instead of having to switch to another tab. The xpi does not do anything more than that and does not include any content scripts or filters.