ACK-J / Port_Authority

Blocks websites from using javascript to port scan your computer/network and dynamically blocks all LexisNexis endpoints from running their invasive data collection scripts.
GNU General Public License v2.0
130 stars 10 forks source link

GUI breaks after opening a private browsing window #11

Closed ACK-J closed 3 years ago

ACK-J commented 3 years ago

Describe the bug When opening a private browsing window with Port Authority the GUI switches don't work but functionality of the addon still works.

To Reproduce Steps to reproduce the behavior:

  1. Open a private browsing window in FF
  2. Open the Port Authority GUI

Expected behavior The GUI to function normally and the switches to work

Screenshots image

Desktop (please complete the following information):

laniakea64 commented 3 years ago

Hi, I can reproduce this problem and it is caused by the code from https://github.com/ACK-J/Port_Authority/pull/6 -

TypeError: can't access property "isListening", bg is null switch.js:12:12
TypeError: can't access property "isNotifying", bg is null notifications.js:8:12

In case I can't find the time to make a pull request: the fix is to not use runtime.getBackgroundPage at all, but instead use runtime.sendMessage in the popup and do the background page stuff in a runtime.onMessage listener in the background page.

ACK-J commented 3 years ago

Thank @laniakea64, nice find. If you have the time to make a PR that would be appreciated but if not one of these days I will find time to get to it.