Reverberations

News, Views, Rants and Raves About Technology and More

Archive for the ‘javascript’ Category

Google Chrome Promoted on the Most Valuable Online Property

with one comment

Google’s new browser Google Chrome is being promoted on arguably the most valuable property on the web – Google Homepage.

The browser itself is “google cool” with Javascript applications performing much better. Flash performance seems a bit sluggish. Need a password manager and status bar perhaps, and a Linux version of course.

The open source project behind Chrome is called Chromium. The rendering engine is Webkit, and Javascript “monkey” is a new JS virtual machine V8.

Advertisements

Written by Brajesh

September 3, 2008 at 7:57 am

Internet Explorer’s Trailing Comma Woes

with 8 comments

Internet Explorer is notorious for breaking on trailing commas in JavaScript array declaration. e.g.

var obj = {
     a: 1,
      b: 2,
};

fails on IE, while all other browsers just ignore the innocuous trailing comma after second element.

Weeding out these commas from JavaScript code is absolute PITA. However, here is a regular expression search string I wrote to search such instances in the code.

,\s*\n+\s*[\}\)\]]

Even better,
,\s*\n+(\s*\/\/.*\n)*\s*[\}\)\]]
matches multiple new lines and comments.

Written by Brajesh

March 18, 2008 at 10:31 pm

Safari on Windows Crashes Too Often

with 6 comments

I’m not much of a fan of Apple softwares on Windows. I like iTunes though, even if it’s a bit bulky. I’ve tried using Safari on Windows for its super pleasing font rendering, aesthetics and, of late, some testing on WebKit/KHTML. However, it crashes just too often to be of any serious use and, of course, doesn’t have any DOM inspector. It has a barely usable JavaScript console though.
On a side-note, I’ve read that Safari can work on Linux under Wine. I’ll give it a try sometime. Now, if only I could run iTunes under Wine 🙂 .

safaricrashonwindows2.png

Written by Brajesh

January 23, 2008 at 10:25 am

Compiling Greasemonkey Scripts to xpi (Firefox Extension)

leave a comment »

Written by Brajesh

November 28, 2007 at 4:36 am

Bulls**t

leave a comment »

This fscking awesome greasemonkey script to uncensor the Internet. Ingenious.

Written by Brajesh

April 28, 2007 at 1:15 pm

Need Firefox extension to open xls in Google Spreadsheet

leave a comment »

I need one Firefox extension/greasemonkey script to add an option to open xls/doc links directly in Google docs & spreadsheets. This is something Google itself should be providing like they do in Gmail. Perhaps, I’ll write one myself in case I can’t find it.

[Update]– Whooaa! Same day Google releases its Firefox toolbar (beta) with this exact same functionality I’m looking for and have blogged. Now, is it just one wish a day, or – I want to be king 😀 , please.

Written by Brajesh

December 13, 2006 at 4:52 pm

Quick Proxy Browsing

with 8 comments

When: Your ISP is stupid enough to block sites it shouldn’t.

How: Create a bookmarklet of the following JavaScript code. All the line breaks below needed to be removed for this to work.

javascript:void((function(){window.location.href=
'http://www.boxofprox.com/index.php?q='+base64_encode(window.location.href);})());
function%20base64_encode(str){
var%20alnum='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._';
var%20out='';var%20t,x,y,z;for(var%20i=0;i<str.length;i+=3){t=Math.min(3,str.length-i);
if(t==1){x=str.charCodeAt(i);out+=alnum.charAt((x>>2));
out+=alnum.charAt(((x&0X00000003)<<4));out+='--';}
else%20if(t==2){x=str.charCodeAt(i);y=str.charCodeAt(i+1);
out+=alnum.charAt((x>>2));out+=alnum.charAt((((x&0X00000003)<<4)|(y>>4)));
out+=alnum.charAt(((y&0X0000000f)<<2));out+='-';}
else{x=str.charCodeAt(i);y=str.charCodeAt(i+1);z=str.charCodeAt(i+2);
out+=alnum.charAt((x>>2));out+=alnum.charAt((((x&0x00000003)<<4)|(y>>4)));
out+=alnum.charAt((((y&0X0000000f)<<2)|(z>>6)));out+=alnum.charAt((z&0X0000003f));}}
return%20out;}

This little code lets one browse with a base64 encoded url to bypass any phrase blocks. Use it on your own risk etc. Thanks ‘someone unknown’ for base64 encoding function.

Written by Brajesh

August 10, 2006 at 5:53 pm

Posted in Coding, javascript