Permalink
Browse files

Further simplification after #1.

  • Loading branch information...
1 parent 7f2f89f commit 8e3bba36a60b25a11be8ad238b3850168387d826 @rauchg committed Mar 10, 2012
Showing with 12 additions and 17 deletions.
  1. +12 −17 indicator.html
View
@@ -4,24 +4,19 @@
chrome.extension.onRequest.addListener(function (res, sender) {
var tab = sender.tab;
- if (null == res.spdy) {
- // hide page action
- chrome.pageAction.hide(tab.id);
- } else {
- // show page action
- chrome.pageAction.show(tab.id);
+ // show page action
+ chrome.pageAction.show(tab.id);
- // change icon
- chrome.pageAction.setIcon({
- path: 'icon-' + (res.spdy ? '' : 'no-') + 'spdy.png'
- , tabId: tab.id
- });
+ // change icon
+ chrome.pageAction.setIcon({
+ path: 'icon-' + (res.spdy ? '' : 'no-') + 'spdy.png'
+ , tabId: tab.id
+ });
- // change icon tooltip
- chrome.pageAction.setTitle({
- title: tab.url + (res.spdy ? ' is SPDY-enabled' : ' is NOT SPDY-enabled')
- , tabId: tab.id
- });
- }
+ // change icon tooltip
+ chrome.pageAction.setTitle({
+ title: tab.url + (res.spdy ? ' is SPDY-enabled' : ' is NOT SPDY-enabled')
+ , tabId: tab.id
+ });
});
</script>

0 comments on commit 8e3bba3

Please sign in to comment.