- From: Melvin Carvalho <melvincarvalho@gmail.com>
- Date: Sat, 25 Aug 2012 09:06:44 +0200
- To: public-rww <public-rww@w3.org>
Received on Saturday, 25 August 2012 07:07:15 UTC
I came across a cute html5 app called doodle jump: http://cssdeck.com/labs/full/dlvkjwcn/63 Since the code was open, I thought I'd add WebID authentication (at this point I just added WebID, but OAuth, OpenID Connect, Facebook Connect are possible too). It only took a few minutes and you can go into more detail, if you are so inclined, but the simple technique was to add: var script = document.createElement('script'); script.src = 'https://data.fm/user.js' + '?callback=displayUser'; document.body.appendChild(script); function displayUser(val) { webIDText = document.getElementById('webid'); webIDText.innerHTML = val; } And a little <span> element in the HTML next to score. The app lets you post your high score to twitter, but perhaps it would be a cool exercise, for the RWW, to post to MyProfile, ODS or bergnet ...
Received on Saturday, 25 August 2012 07:07:15 UTC