Index: chrome/common/extensions/docs/examples/api/devtools/resources/chrome-firephp/background.html |
diff --git a/chrome/common/extensions/docs/examples/api/devtools/resources/chrome-firephp/background.html b/chrome/common/extensions/docs/examples/api/devtools/resources/chrome-firephp/background.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4e382a6ff14972da14f409f8c2cd9f9b30bfabad |
--- /dev/null |
+++ b/chrome/common/extensions/docs/examples/api/devtools/resources/chrome-firephp/background.html |
@@ -0,0 +1,18 @@ |
+<html> |
+<head> |
+<script type="text/javascript"> |
+const tab_log = function(json_args) { |
+ var args = JSON.parse(unescape(json_args)); |
+ console[args[0]].apply(console, Array.prototype.slice.call(args, 1)); |
+} |
+ |
+chrome.extension.onRequest.addListener(function(request) { |
+ if (request.command !== 'sendToConsole') |
+ return; |
+ chrome.tabs.executeScript(request.tabId, { |
+ code: "("+ tab_log + ")('" + request.args + "');", |
+ }); |
+}); |
+</script> |
+</head> |
+</html> |