aboutsummaryrefslogtreecommitdiffstats
path: root/background_page.html
diff options
context:
space:
mode:
authorPhil Crosby2009-09-20 00:09:05 -0700
committerPhil Crosby2009-09-20 00:09:44 -0700
commitaff9db2640db9aa02858d0a98a75919b67cfc61d (patch)
treeb891be713fd38d8bf5be64a8fc7688ada4e56708 /background_page.html
downloadvimium-aff9db2640db9aa02858d0a98a75919b67cfc61d.tar.bz2
Initial project commit
Diffstat (limited to 'background_page.html')
-rw-r--r--background_page.html32
1 files changed, 32 insertions, 0 deletions
diff --git a/background_page.html b/background_page.html
new file mode 100644
index 00000000..7ea906fa
--- /dev/null
+++ b/background_page.html
@@ -0,0 +1,32 @@
+<html>
+<head>
+<script type="text/javascript" charset="utf-8">
+ chrome.extension.onConnect.addListener(function(port, name) {
+ if (port.name == "nativeCommand")
+ port.onMessage.addListener(handleNativeCommand);
+ });
+
+ function handleNativeCommand(args) {
+ console.log("received native command:", args);
+
+ switch(args.command) {
+ case "tabs.create":
+ chrome.tabs.create({});
+ break;
+ case "tabs.remove":
+ console.log("removing");
+ chrome.tabs.getSelected(null, function(tab) {
+ chrome.tabs.remove(tab.id);
+ });
+ break;
+ }
+ }
+</script>
+
+</head>
+
+<body>
+ howdy
+</body>
+
+</html> \ No newline at end of file