Home » Code, Hacker's Approach

Chrome Extension to Fix Orkut Width Problem

25 March 2009 2 Comments

Orkut Fluid Width on Chrome by Using extension developed by Gaurav Verma

Orkut Fluid Width on Chrome after using extension developed by Gaurav Verma

Google has introduced a basic extensions feature in its popular Chrome browser, although its still availble in developer release.So, i thought i should try to write my popular Orkut 99% width greasemonkey script for chrome because normally i use chrome. I am in love with the speed and responsiveness of chrome,only thing that make me open firefox is use of firebug,web developer toolbox or yslow.I miss my extensions for firefox, but speed matters most for me.

Anyways, here i will show you how to enable extensions for google chrome,and to install this extension.Purpose of this extension is to change the width of orkut pages,which leaves lot of space unused if you are using a widescreen monitor.Here is the step by step process :

  1. Install the developer-channel version of Google Chrome : Since extension feature is still in development you need a developer version of chrome,You can read instructions on how to switch to the developer version here.It will take 3-4 minutes depending on you internet speed. Developer version has many more new features than public one like full screen mode (by pressing ‘F11′), new faster javascript engine etc.
  2. Now create a directory somewhere in your computer, you can create directory anywhere but for the purpose of this example we will be using C:myextension .Chrome requires a manifest file which contains the information about extension like name,description, which URL patterns should be matched,which file to load and a unique ID of the extension.Create a file manifest.json inside the directory with following contents.
    {
      "format_version": 1,
      "id": "31f6da32730aca7203c1fb8636444a6e2607551b",
      "version": "1.0",
      "name": "Orkut 99% width",
      "description": "Converts orkut container width to 99% ,useful for users having widescreen.",
      "content_scripts": [
        {
          "matches": ["http://*.orkut.com/*","http://*.orkut.co.in/*"],
          "js": ["orkut-fix-width.js"]
        }
      ]
    }

    Also create another file orkut-fix-width.js in the same directory with following content :

    (function() {
    function do_widen(id, min) {
        var container = document.getElementById(id);
        if (!container)
          return;
        if (min)
          container.style.minWidth = min;
    }
    try {
        do_widen("headerin", "99%");
        do_widen("container", "99%");
    } catch (e) {
        console.log( 'Orkut99percent exception: ' + e );
    }
    })();
  3. Edit your chrome shortcut and add these flags to it:

    chrome.exe –enable-extensions –load-extension=”c:myextension”

    Start Chrome and navigate to

    chrome-ui://extensions

    This page lists all installed extensions. It also shows any errors that have occured in the extension system since it started up.

  4. Go to http://www.orkut.com and you should see the difference.

For more information on extensions on chrome visit this howto

Related posts:

  1. How to find Out User’s Geolocation with Javascript on Firefox, Chrome, Safari and IE Few days back i shifted to Windows 7 from...

1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 5.00 out of 5)
Loading ... Loading ...

2 Comments »

  • vikash said:

    cool :)

  • christian said:

    Hey Nice blog here I’m adding it to my rss feeder, hope you update often!