Skip to content

Commit

Permalink
Add a background.js file.
Browse files Browse the repository at this point in the history
  • Loading branch information
bwinton committed Sep 15, 2015
1 parent 8d51055 commit ea4b9fc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
catgifs.xpi
catgifs.xpi
*.swp
11 changes: 11 additions & 0 deletions background.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
'use strict';

/*global chrome:false */

chrome.browserAction.setBadgeText({text: '(ツ)'});
chrome.browserAction.setBadgeBackgroundColor({color: '#eae'});

chrome.browserAction.onClicked.addListener(function(aTab) {
chrome.tabs.create({'url': 'http://chilloutandwatchsomecatgifs.com/', 'active': true});
});

5 changes: 5 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
}
},

"background": {
"scripts": ["background.js"],
"persistent": false
},

"browser_action": {
"default_title": "Cat Gifs!"
}
Expand Down

0 comments on commit ea4b9fc

Please sign in to comment.