Monday, May 25, 2009
Inside the dragon fish login demo
On top of this div are the masks for the four corners and the four sides. These have images with semitransparent pngs that are respinsible for the glow effect. There is also a mask in the middle that masks the majority of the background.
It is above this layer that regular fieldset containing the username and password fields. You can see this effect if you move the third element with "map" classname with to an absolute position and 200 px left. The javascript constantly move the huge image to left, creating the effect.
Thursday, May 21, 2009
Weave Identity : The auto login feature
If you unzip the xpi file, you can look for the LoginManager.js file. This is the file that is responsible for saving user credentials, retrieving them when required and submitting the form. Most functions are self explanatory. An observer is called whenever a form is submitted. The credentials are then picked up and saved to the store.
The _fillForm function is looks for matching logins saved for the login form and fills in the details. There is some complex logic that determines if a password is correct or not, but it can be ignored for now. It is something like the form.submit() function that I was searching for, but unable to find. I was also wondering how the extension handled password submission for sites like meebo.com that hash the password before sending it across. Watch out this space for updates on how these login form oddities have been handled.
Saturday, May 16, 2009
Reddit Bar :: adjusting the extra space
The addition was a change to the style of the footer. The div with class ("footer-parent") had a padding-top set to 40px.
A single line to set this to 0px did the trick and the extra space is now gone.
Wednesday, May 13, 2009
Weave Identity : in contrast to cardspace
This seems to look exactly same the like Windows Cardspace initiative. The similarities are interesting. Here is the workflow laid out side by side.
| Steps | Cardspace | Weave Identity |
| 1 | User loads the login page with Cardspace enabled. | User loads a login page that accepts OpenId Credentials. |
| 2 | User selects the “Login with cardspace” button on the page. | User selects the “Sign in with Weave”, or the button on the address bar. |
| 3 | Cardspace UI is displayed and the user selects the card that best represents the identity for the site. | There is just one weave identity for now. It gets automatically selected. |
| 4 | A request is made to the identity provider site to get details by Cardspace. | A browser redirect takes the user to the OpenId identity provider page (services.mozilla.com). |
| 5 | If the identity provider requires credentials, a dialog box shows up. | Since the user is already logged in using weave, no credentials are requested for. |
| 6 | Credentials are sent to the Identity provider and if authentication succeeded, positive reply is received. | A redirect by the OpenId provider to the original page with reply. |
| 7 | User is logged in successfully | User is logged in successfully |
It is the second part of weave is the way the login manager works. The way it saves usernames/passwords and auto submits forms is interesting.
More about it, and analysis in the next post.
Saturday, May 9, 2009
Facebook Konami Lens Flare Effect
First, there is the handler that catches the secret key. You can find it in this file. Just search for
[38,38,40,40,37,39,37,39,66,65,13] which represent the character codes for the secret key combination. The function is called onloadRegister which typically registers a key handler on the window. The function effectively loads this response that in turn loads the file responsible for the lens flare javascript file.
The lens flare is initialized using the following code after the required javascript file is loaded.
var lf = new LensFlare("http:\/\/static.ak.fbcdn.net\/images\/lensflare\/*?8:162521");LensFlare.flareClick(lf).flareScroll(lf).flareKeyPress(lf);This is done after some variable are set in the win.Env object, the use of which is still a mystery to me. To execute this in our page, we need to initialize some objects, defined in this file. To get lens flare running, this file also has to be included. Here is the consolidated code that you need to use.
Paste this in the browser URL first,
and then, after sometime, to activate the flares, paste this.
You can try the code on this very blog window.
To include this in your page, you have to include the following script in your page.
The interesting part in this is the animation of the images to create the lens flare, another example of fine javascript wizadary !!
Wednesday, May 6, 2009
Reddit Bar :: Self links fixed
I have changed the code to reflect the change and you can find it here. The change was trivial. Just find out the target URL that would open the iFrame, and if it equals the document's url, the bar will not load, letting the page stay as it is.
Swaroop also had pointed out that the reddit bar shows up twice and I am taking a look at it. If you have seen errors, please do sent me the URL to help me fix the error.