Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Further simplification after #1.

  • Loading branch information...
commit 8e3bba36a60b25a11be8ad238b3850168387d826 1 parent 7f2f89f
@rauchg authored
Showing with 12 additions and 17 deletions.
  1. +12 −17 indicator.html
View
29 indicator.html
@@ -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>
Please sign in to comment.
Something went wrong with that request. Please try again.