1
2
3
4
5
6
7
8
9
10
11
chrome.tabs.getSelected(null, function(tab) {
  var param = "v";  //"v" is the param i am searching for
  param = param.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+param+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( tab.url );
  if( results == null )
    //param not found
  else
    //param found -> results[1]
});