 
var queryBlockChain = function(e) {

var blockChainUrl = " https://blockchain.info/address/";

if (e.selectionText) {
	blockChainUrl += e.selectionText;	
	}

   chrome.tabs.create(
          {"url" : blockChainUrl });

}
  
 chrome.contextMenus.create({
    "title" : "Check BTC Address",
    "contexts" : ["selection"],
	 "onclick" : queryBlockChain
  });
  
  
@@ -1,10 +1,8 @@
- %0A
 var quer
@@ -30,16 +30,20 @@
 n(e) %7B%0A%0A
+    
 var bloc
@@ -91,17 +91,25 @@
 ress/%22;%0A
-%0A
+    %0A    
 if (e.se
@@ -123,16 +123,18 @@
 Text) %7B%0A
+%09%09
 %09blockCh
@@ -165,12 +165,16 @@
 t;%09%0A
+%09
 %09%7D%0A%0A
+  %0A
    c
@@ -195,185 +195,929 @@
 ate(
-%0A          %7B%22url%22 : blockChainUrl %7D);%0A%0A%7D%0A  %0A chrome.contextMenus.create(%7B%0A    %22title%22 : %22Check BTC Address%22,%0A    %22contexts%22 : %5B%22selection%22%5D,%0A%09 %22onclick%22 : queryBlockChain%0A  
+%7B%22url%22 : blockChainUrl %7D);%0A%0A%0A%7D%0A%0A %0Avar queryBlockChainJSON = function(e) %7B%0A%0A    var blockChainUrl = %22 https://blockchain.info/address/%22;%0A    %0A    if (e.selectionText) %7B%0A%09%09%09blockChainUrl += e.selectionText += %22?format=json%22;%09%0A%09%09%7D%0A%0A  %0A%09var test =getJSON(blockChainUrl);%0A%09%0A%09//return a random value here to test %09%0A %09alert(test%5B'hash160'%5D);%0A%0A%7D%0A%0A%0Afunction getJSON(blockChainUrl) %7B%0A%09%0A%09var resp;%09%0A%09%0A   var req = new XMLHttpRequest();%0A    %0A   req.open('GET', blockChainUrl, false);%0A   %0A   req.onreadystatechange = function () %7B%0A%0A   if (req.readyState == 4)%7B%0A%09%09%09resp = JSON.parse(req.responseText);%0A%09%09%09%7D      %0A%09%09%7D%0A    %0A   req.send();%0A    %0A   return resp;%0A%09%0A%7D%0A%0A%0Achrome.contextMenus.create(%7B%0A    %22title%22 : %22Check BTC Address%22,%0A    %22contexts%22 : %5B%22selection%22%5D,%0A%09 %22onclick%22 : queryBlockChain%0A%7D);%0A%0Achrome.contextMenus.create(%7B%0A    %22title%22 : %22JSON Check BTC Address%22,%0A    %22contexts%22 : %5B%22selection%22%5D,%0A%09 %22onclick%22 : queryBlockChainJSON%0A
 %7D);%0A
+%0A
   %0A 

add getJSON function