Refactor togglePageAction function (DRY)
Refactor togglePageAction function (DRY)

There might actually be ways to clean that up a bit more but since the API calls in Chrome are asynchronous, this tends to make this a mess. So I guess it wouldn't clean it up more :)
Timothee/LogMeOutThx,Timothee/LogMeOutThx