1var myLoc = window.prompt('Please enter a web site address', 'http://');
2getHttp = myLoc.substring(0, 7);
3
4if ( getHttp == "http://")
5{
6finalUrl = myLoc;
7} else {
8finalUrl = 'http://' + myLoc;
9}
10
11window.location = 'view-source:' + finalUrl;
12