Closed dhowe closed 7 years ago
Every time the menu is open, it is getting the current tab id/url and try to find the blocking status of the current tag. Both this issue and https://github.com/dhowe/ChinaEye/issues/58 are caused by clicking recheck on blocked pages that are blocked by keyword and allowed by the servers.
The current way of setting getBlockStatus will overwrite all the information and since recheck button only checks the server, it will update the blockStatus to allow, which disables the whitelist buttons.
This is pretty confusing -- do you have a solution in mind?
A quick and easy solution would be to call checkPage instead of checkServer when clicking "recheck now" button. Though it actually recheck everything instead of just the server.
A more proper fix would be to pass trigger(either from check search keyword or from existing BlockingStatus) to checkServer, and if trigger != undefined, status is block.
This should be fixed in the latest PR: https://github.com/dhowe/ChinaEye/pull/63, please check.
are we checking the location of the current tab every time the menu is opened?