Skip to content

Commit

Permalink
Removed popup.html and added a background.js for the new manifest 2.0…
Browse files Browse the repository at this point in the history
… support
  • Loading branch information
AntonNguyen committed Sep 13, 2012
1 parent 254c5da commit 7276d37
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
14 changes: 14 additions & 0 deletions background.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
chrome.browserAction.onClicked.addListener(function() {

var extensionKey = document.URL.split("/")[2];
var url = 'chrome-extension://' + extensionKey + '/interact.html';

chrome.tabs.query({url : url}, function(tab) {
if (tab.length === 0) {
chrome.tabs.create({url:'interact.html'});
} else {
chrome.tabs.update(tab[0].id, {selected: true});
}
});

});
9 changes: 0 additions & 9 deletions popup.html

This file was deleted.

0 comments on commit 7276d37

Please sign in to comment.