Commit | Line | Data |
---|---|---|
21c4e167 H |
1 | <html> |
2 | <head> | |
3 | <script> | |
4 | var exceptionHandler = function(exc) { | |
5 | if (exc) alert(exc.name + ": " + exc.message); | |
6 | }; | |
7 | var sendToSelectedTab = function(data, responseHandler) { | |
8 | chrome.tabs.getSelected(null, function(tab) { | |
9 | chrome.tabs.sendRequest(tab.id, data, responseHandler) | |
10 | }); | |
11 | }; | |
12 | var execute = function(code) { | |
13 | sendToSelectedTab({code: code}, exceptionHandler); | |
14 | //sendToSelectedTab({code: function(){ alert('alertingddd'); }}, exceptionHandler); | |
15 | }; | |
16 | var reload = function() { | |
17 | sendToSelectedTab({reload: true}); | |
18 | }; | |
19 | </script> | |
20 | </head> | |
21 | <body> | |
22 | </body> | |
23 | </html> |