OLD | NEW |
1 <!-- | 1 <!-- |
2 * Copyright (c) 2010 The Chromium Authors. All rights reserved. Use of this | 2 * Copyright (c) 2010 The Chromium Authors. All rights reserved. Use of this |
3 * source code is governed by a BSD-style license that can be found in the | 3 * source code is governed by a BSD-style license that can be found in the |
4 * LICENSE file. | 4 * LICENSE file. |
5 --> | 5 --> |
6 <html> | 6 <script src="background.js"></script> |
7 <head> | |
8 <script> | |
9 chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) { | |
10 chrome.tabs.executeScript(tabId, {file: "execute_script.js"}); | |
11 }); | |
12 | |
13 chrome.extension.onRequest.addListener( | |
14 function(request, sender, sendResponse) { | |
15 // Let the extension know where the script ran. | |
16 var url = sender.tab ? sender.tab.url : 'about:blank'; | |
17 chrome.test.sendMessage('execute: ' + url); | |
18 }); | |
19 </script> | |
20 </head> | |
21 </html> | |
OLD | NEW |