4 var exceptionHandler = function(exc) {
5 if (exc) alert(exc.name +
": " + exc.message);
7 var sendToSelectedTab = function(data, responseHandler) {
8 chrome.tabs.getSelected(null, function(tab) {
9 chrome.tabs.sendRequest(tab.id, data, responseHandler)
12 var execute = function(code) {
13 sendToSelectedTab({code: code}, exceptionHandler);
14 //sendToSelectedTab({code: function(){ alert('alertingddd'); }}, exceptionHandler);
16 var reload = function() {
17 sendToSelectedTab({reload: true});