Index: chrome/common/extensions/docs/examples/extensions/mappy/background.html |
diff --git a/chrome/common/extensions/docs/examples/extensions/mappy/background.html b/chrome/common/extensions/docs/examples/extensions/mappy/background.html |
index ff6f7c9cfa16895446c8c1672d45c8003cfd92e5..6de21588c8118b2b1acb3d954898662526139282 100644 |
--- a/chrome/common/extensions/docs/examples/extensions/mappy/background.html |
+++ b/chrome/common/extensions/docs/examples/extensions/mappy/background.html |
@@ -1,42 +1,9 @@ |
-<script> |
-// Global accessor that the popup uses. |
-var addresses = {}; |
-var selectedAddress = null; |
-var selectedId = null; |
- |
-function updateAddress(tabId) { |
- chrome.tabs.sendRequest(tabId, {}, function(address) { |
- addresses[tabId] = address; |
- if (!address) { |
- chrome.pageAction.hide(tabId); |
- } else { |
- chrome.pageAction.show(tabId); |
- if (selectedId == tabId) { |
- updateSelected(tabId); |
- } |
- } |
- }); |
-} |
- |
-function updateSelected(tabId) { |
- selectedAddress = addresses[tabId]; |
- if (selectedAddress) |
- chrome.pageAction.setTitle({tabId:tabId, title:selectedAddress}); |
-} |
- |
-chrome.tabs.onUpdated.addListener(function(tabId, change, tab) { |
- if (change.status == "complete") { |
- updateAddress(tabId); |
- } |
-}); |
- |
-chrome.tabs.onSelectionChanged.addListener(function(tabId, info) { |
- selectedId = tabId; |
- updateSelected(tabId); |
-}); |
- |
-// Ensure the current selected tab is set up. |
-chrome.tabs.getSelected(null, function(tab) { |
- updateAddress(tab.id); |
-}); |
-</script> |
+<!doctype html> |
+<html> |
+ <head> |
+ <title>Background Page</title> |
+ <script src="background.js"></script> |
+ </head> |
+ <body> |
+ </body> |
+</html> |