Stanley Shilov

Ubiquity Rapidshare Extension

July 4th, 2009

If you use Ubiquity, this simple extension makes it easy to grab and open any number of Rapidshare links:

CmdUtils.CreateCommand({
name: "rapidshare",
  preview: function(pblock){
    var selection=context.focusedWindow.getSelection();
    selection=selection.toString();
    selection=selection.match(/http:\/\/rapidshare[^\s]*/gi);
    var links='';
    for(var i=0; i<selection.length; i++){
      links=links+selection[i]+"<br />";
    }
    pblock.innerHTML=links;
  },
  execute: function(){
    var selection=context.focusedWindow.getSelection();
    selection=selection.toString();
    selection=selection.match(/http:\/\/rapidshare[^\s]*/gi);
    if(selection!=null){
      var links=selection.length;
      for(var i=0; i<links; i++) Utils.openUrlInBrowser(selection[i]);
    }
  }
})

The code examines the selected block of text, extracts URLs which resemble Rapidshare links and opens each link in a new tab.

To use: select the block of text, ctrl + alt to open ubiquity, then start typing “rapidshare”

PS: The code can be easily modified to work with other sites, simply replace any mention of “rapidshare” with the applicable site.

How to: Running Multiple Firefox Instances

November 9th, 2008

Setting up multiple instances of Firefox is a 5 minute task which is made possible by the creation of separate profiles, whereby each instance of Firefox will use its own profile. A few key points about profiles:

  • Every profile has its own set of bookmarks, extensions, themes and browsing history.
  • If one instance of Firefox crashes, it will not bring down other instances of Firefox running under different profiles.
  • The only thing shared between profiles are the plugins (Java, Flash, etc).
  • Separate profiles can be used to run different versions of Firefox at the same time.

Read the rest of this entry »

© 2010 Stanley Shilov   |   Blog   |   Contact

divide et impera

Stanley Shilov