Perfect password according to firefox

I was going through bits of firefox code, and I found the algorithm used by firefox to measure password strength. You can find it in function setPasswordStrength() in this file : chrome://mozapps/content/preferences/changemp.js.
So point schema for password strength:

For length :       password-length*10 – 20   (Max 30)
For Numbers:    no-of-numerics * 10          (Max 30)
For Symbols:     no-of-symbols * 15           (Max 45)
For UpperCase: no-of-Uppercase * 10        (Max 30)

Your password strength is sum of all these points. So smallest password that would get 100 on password meter can be : AAA@@@ or something similar. But there should also be some criterion for the uniqueness of the characters.

Interesting read-on how to choose good passwords. that are also easy to remember. Please share your tips on choosing passwords [but yeah dont share passwords :) ]

Extra Cookie:
Type resource: in your location bar to directly go to firefox installation directory.

Related:
Choose and remember great passwords.
Firefox about pages

View page source trick in firefox, flock

You may have read about firefox’s special about: pages like about:config, about:cache etc. Or you can go through Firefox about: pages to have an idea about them. There is one similar functionality in firefox which allows you to view page source of a page. You can type

view-source:http://www.google.com/

this in location bar to view page source of google.com.
So i have made this Bookmarklet to view page source: View Source (So you can drag this to your bookmark toolbar to have quick access).

Similarly you can type javascript: in your location bar to open java script error console.

Update1:
Key Board Shortcut: Use Ctrl+U to view page source

Related Post:
Firefox About Pages
Little tweaks with javascript : Bookmarklets.
Open webpages in sidebar

My Del.icio.us Toolbar 2.0

Yesterday I was working late night till 3AM, to update my extension ‘My Del.icio.us Toolbar’ which I made long back in October 2006. Reason was to make it work for newer versions of firefox. But then I added some new features too :

Try My Del.icio.us 2.0 (Right now you may have to login to access the extension as it’s in Sandbox.)

I also noticed that mozilla has redesigned the extension page. They have also added a nice statistics Dashboard for extension, provided graphical representation of number of downloads, active daily users etc. I was surprised to see that older version of My Del.icio.us has reached a total download of 11,200 (not that a big number but still surprising for me) and number of active user around 1000.

Try My Del.icio.us 2.0 and provide feedback.

Also Try: Del.icio.us SearchER
Related Post:

Adobe AIR: Web to Desktop

Past few days, I have came across Adobe AIR through digg, techmeme, delicious and so today i thought i should try this. Adobe AIR lets us their existing web development skills in HTML, AJAX, Flash and Flex to build and deploy rich Internet applications to the desktop. For Application development you will need two things:

Having Adobe AIR extension for Dreamweaver CS3 can be very helpful as it facilitates to package and preview .air application files directly within Adobe Dreamweaver CS3.

As my first AIR application, I ported my rubiks cube timer as a desktop application (RubikTimer.air). Its very easy using dreamweaver extension, have a look here : Create your first HTML-based AIR application with the AIR SDK (great tutorial for beginners).

One problem I faced: Usually setInterval(“display()”,500) works with Firefox/IE but it was not starting with no error message to look into but then i found out about using Adobe CommandLine tool. (via Three ways to debug Adobe javascript Application). It´s called ADL and resides in the /bin folder of the SDK. ADL showed the Error: “Unsafe javascript”. Then after some random changes when i change it to “setInterval(display,500)”, It started working. Another problem I faced was related to keypress events in javascript, were not working with AIR (still have to resolve this issue)

Download RubikTimer.air here
Web Based Rubik Cube Timer

Related Post:

Sample Adobe AIR Applications
Trying hands on Google gadgets

Trying hands on Google gadgets

Tonight i tried creating some google gadgets (actually its quite easy using Google Gadget Creator). You can check out them here: Google gadgets . You can use html / javascript (as in any other webapage) to create gadgets.Rubik timer gadget So i converted my Rubiks Cube Timer to a gadget. Other one is a gadget to search stock, scripts on bombay stock exchange.

You can also create gadgets using : Make your Own Gadget (Which is as simple as filling out forms)

P.S. : My first post on wordpress blog. (I imported my previous posts from blogger)

Open webpages in sidebar

Yesterday i found this great way to store some imp bookmarks in your sidebar. And you can create different sidebar for each such collection. Like for my bookmarks click here.
Now you can save this bookmark (may be in bookmark toolbar folder) and use it.

This link is a javascript :

javascript:window.sidebar.addPanel('title of sidebar','url of sidebar panel','');

So now you can point to any URL. and that URL will open in sidebar with given title.
atleast Works with Firefox

Update: Run google talk in firefox sidebar

A bookmarklet to bookmark websites to open in sidebar. click here

You can click here: Add google chat to sidebar
Add Digg|River
Update: 25-apr-2008
Add Facebook Chat

Also read : Webpages for Sidebar

Play with html using javascript

Javascipt can be very fruitful and flexible when it comes to modifying webapges dynamically (though client side). Javascript can be helpful in creating response to browser events like mouseup, mouseover etc, veryfying of form values prior to submitting them, changing style and value of html elements dynamically.
Examples i disscuss here are being user by me in developing Paint Chat !! So here I go..
You can write javascript functions and code in section as:

<script type="text/javascript">function test(){alert("test javascript");}</script>

Action on events:

Example of events can be mouseclick, keystroke, submitting form etc.
With onload()

 <body onload="init()">

Now init() function will be called when this html page is being loaded.
For links, javascript function can be evoked when clicking, mouseover over links like

 <a href="javascript:replay()" mce_href="javascript:replay()">Refresh ! </a>

Now function replay() will be called when Refresh! is clicked. For input text box

<input type="text" size="30" id="search" onchange="suggest()">; 

Now whenever content of textbox changes the function suggest() will be called. It can be useful when feature like google suggest has to be implemented or so.

On submitting forms:

<form method="post" action="some.php" onsubmit="return checkForm()">

So whenever this form is being submitted checkForm() function will be called and can be helpful in verifying values of form elements.

onMouseOver and onMouseOut:

<a href="http://www.aburad.com/blog" mce_href="http://www.aburad.com/blog" onmouseover="fade()"><img src="image.gif" mce_src="image.gif"> </a>

Now when mouse is over image fade() function will be called and can be used for animate and styling purposes.

Registering of events

A simple way can be:
Conside the html code : <div id="sample"> ..... some... html..text.. </div>
Now using javascript you can register event for this div by:

 var div_sample = document.getElementById('sample');div_sample.onmousedown=sampleMouseDown ; 

Now whenever mouseover ocours over this div html element sampleMouseDown() function will be called. Events can also be registered using addEventListener() . Find more information baout it here:Advanced event registration models

Modify Style and values for html elements

Within some javascript function, you can first get the element object by getElementByID() getElementsByName() for example conside the javascript code:

document.getElementById("colorcode").innerHTML = "#000000";
document.getElementById("bgtest").style.backgroundColor= "green";

The first line find the html element with id colorcode and then set its value to “#000000″ using innerHTML. In second line, it sets the background of html element with id “bgtest” to green.

Some other tweaks which were useful :

var intervalID = setInterval(drawCurve, 100);

So the drawCurve() function will be called repeatedly after 100ms. You can cancel this process( removing repeatedly calling) by clearInterval(intervalID);

var testImg = new Image();
testImg.src="form.php?name=form_value" mce_src="form.php?name=form_value";

Now here in form.php you can fetch value of variable name using $_GET and can perform appropriate action.

Some links:

Related Posts:

funky javascript

Just paste the JavaScript given in you address bar after visiting any website.
Copy this to location bar & press enter.
——————————————————————————————–
javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.getElementsByTagName(“img”); DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position=’absolute’; DIS.left=(Math.sin(R*x1+i*x2+x3)*x4+x5)+”px”; DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+”px”}R++}setInterval(‘A()’,5); void(0);
———————————————————————————————
This is what you get when you try it on search result from google images:

Related Links : Play with html using javascript
Little tweaks with javascript bookmarklet

Source : Digg.com