Revert "Revert "Check pageAction visibility on history.pushState""

This reverts commit 80183fcef5ed5d9ca5fdc349a3dd0323ebc2adcd.