google chrome extension - Using REST to Invoke JSON Custom Search API -
i'm attempting json data google custom search api using javascript, have been unsuccessful @ retrieving data. this chrome extension. i've read using rest article multiple times, have still been having problems. all right results, , show json result in .html file. help/insight. popup.js file function getcurrenttaburl(callback) { var queryinfo = { active: true, currentwindow: true }; chrome.tabs.query(queryinfo, function(tabs) { var tab = tabs[0]; var url = tab.url; console.assert(typeof url == 'string', 'tab.url should string'); callback(url); }); // methods of chrome extension apis asynchronous. means // cannot this: // // var url; // chrome.tabs.query(queryinfo, function(tabs) { // url = tabs[0].url; // }); // alert(url); // shows "undefined", because chrome.tabs.query async. } function getsearchurl(searchterm, callback, errorcallback) { var mgoogleapikey = "myapikey";...