yangshun/facebook-usage-stats — pull request #3 by BenMQ (2014-09-25 14:24:09+00:00)
Title: Use background page to handle blocking logic and like tracking

The motivation to use a content page are:

1. Be able to inspect the outgoing `POST` request for (un)likes, since unlikes can't be differentiated from likes due to internationalisation of the button label.
2. Be able to sync and update like counts on multiple tabs when a like (or unlike) is fired in one tab.

Note currently likes is tracked in `storage.local`. This can be changed to `storage.sync` to support cross-device syncing.

Time spent is still tracked by content script and stored in localStorage. This can be updated in the future.