Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5922)

Unified Diff: chrome/common/extensions/docs/examples/api/devtools/resources/chrome-firephp/background.html

Issue 6948003: Add chrome-firephp sample extensions; add sample references to devtools pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments addressed Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698