Update comments

Old comment bug was fixed a while back in Chrome.

Signed-off-by: Nick Semenkovich <semenko@alum.mit.edu>
Faster escape from onBeforeRequest when nothing applies

Signed-off-by: Nick Semenkovich <semenko@alum.mit.edu>
Don't try to update the URI() object unless needed (rare)

Signed-off-by: Nick Semenkovich <semenko@alum.mit.edu>
Remove useless displayPageAction handlers

We call displayPageAction all the freaking time.

It's called in chrome.tabs.onUpdated which takes care of 99.9% of all cases.

These two are unnecessary.

Signed-off-by: Nick Semenkovich <semenko@alum.mit.edu>
Add some comments explaining functions

Signed-off-by: Nick Semenkovich <semenko@alum.mit.edu>
Move displayPageAction out of the hot onBeforeRequest

displayPageAction is called (unnecessarily) potentially /hundreds/ of times per tab.

It only needs to be called /once/ when a page updates and has applicable rules.

We'd be fine just removing it from onBeforeRequest (and depending on chrome.tabs.onUpdated) except for the super-edge case where a tab:
- Meets zero potentially applicable rulesets
- Has absolutely no rulesets that apply to dependencies (included JS, etc.)
- Makes a request we /can/ apply rules to, but it happens after DOM document complete when tabs.onUpdated has already fired

In practice, I was unable to find *any* sites that met this criteria, but I can make a localhost test case.

This adds a 10 sec. timer to check if active tabs are missing the pageAction icon.

Signed-off-by: Nick Semenkovich <semenko@alum.mit.edu>
Merge pull request #29 from semenko/remove-http-header-listener

Remove onHeadersReceived listener
Merge branch 'background-perf-changes' of github.com:semenko/https-everywhere into semenko-background-perf-changes

Conflicts:
	chromium/background.js
Revert "Move displayPageAction out of the hot onBeforeRequest"

This reverts commit 1d5df8f3204aac85618a1b8b21629dc9fbaaa791.
Merge pull request #32 from jsha/newrelic_assets

Add exclusion for blog-assets.newrelic.com.
Merge pull request #35 from semenko/fix-washu-physicians

Drop broken WashU physicians SSL rule
Merge pull request #34 from cbuechler/master

pfsense.org now supports HTTPS for www and blog subdomains. Update rules...
Fire pageAction only from tabs.onUpdated/onReplaced

pageAction is responsible for adding the HTTPS Everywhere icon next to the URL bar. We used to display this only on pages w/ applicable rules (almost every page), but that logic was messy and slow. Now we display the icon all the time.

This might get called once or twice per-tab, but it's relatively low cost. At least we're no longer calling it multiple times for every request :)

Signed-off-by: Nick Semenkovich <semenko@alum.mit.edu>
Merge branch 'background-perf-changes' of github.com:semenko/https-everywhere into semenko-background-perf-changes
Merge branch 'semenko-background-perf-changes'
Reload the selected tab when a rule is toggled

This mimics the behavior of the Firefox addon.
Usually someone is trying to test whether disabling
a rule fixes some bug on the site, in which case
they would want to reload it anyway. We should
just do it automatically.
Merge branch 'master' of https://github.com/EFForg/https-everywhere into switchplanner

Conflicts:
	chromium/background.js
Add platform=mixedcontent for HuffPo.
Simplify onBeforeRequest a little bit and remove call into the DOM.
Merge branch 'master' into simplify_onbeforerequest

Conflicts:
	chromium/background.js