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

Side by Side Diff: chrome/common/extensions/docs/examples/api/devtools/network/chrome-firephp/background.js

Issue 8309001: Adding `content_security_policy` to a few sample extensions. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: pageAction/pageaction_by_url Created 9 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <html> 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 <head> 2 // Use of this source code is governed by a BSD-style license that can be
3 <script type="text/javascript"> 3 // found in the LICENSE file.
4
4 const tab_log = function(json_args) { 5 const tab_log = function(json_args) {
5 var args = JSON.parse(unescape(json_args)); 6 var args = JSON.parse(unescape(json_args));
6 console[args[0]].apply(console, Array.prototype.slice.call(args, 1)); 7 console[args[0]].apply(console, Array.prototype.slice.call(args, 1));
7 } 8 }
8 9
9 chrome.extension.onRequest.addListener(function(request) { 10 chrome.extension.onRequest.addListener(function(request) {
10 if (request.command !== 'sendToConsole') 11 if (request.command !== 'sendToConsole')
11 return; 12 return;
12 chrome.tabs.executeScript(request.tabId, { 13 chrome.tabs.executeScript(request.tabId, {
13 code: "("+ tab_log + ")('" + request.args + "');", 14 code: "("+ tab_log + ")('" + request.args + "');",
14 }); 15 });
15 }); 16 });
16 </script>
17 </head>
18 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698