| OLD | NEW | 
 |   1 <!doctype html> | 
|   1 <html> |   2 <html> | 
|   2 <head> |   3   <head> | 
|   3 <script type="text/javascript"> |   4     <title>Background Page</title> | 
|   4 const tab_log = function(json_args) { |   5     <script src="./background.js" type="text/javascript"></script> | 
|   5   var args = JSON.parse(unescape(json_args)); |   6   </head> | 
|   6   console[args[0]].apply(console, Array.prototype.slice.call(args, 1)); |   7   <body> | 
|   7 } |   8   </body> | 
|   8  |  | 
|   9 chrome.extension.onRequest.addListener(function(request) { |  | 
|  10   if (request.command !== 'sendToConsole') |  | 
|  11     return; |  | 
|  12   chrome.tabs.executeScript(request.tabId, { |  | 
|  13       code: "("+ tab_log + ")('" + request.args + "');", |  | 
|  14   }); |  | 
|  15 }); |  | 
|  16 </script> |  | 
|  17 </head> |  | 
|  18 </html> |   9 </html> | 
| OLD | NEW |