GeoFS-Extensions / autoland

Accessible plugins for GeoFS, an online flight simulator.
https://geofsautoland.wixsite.com/autoland
GNU General Public License v3.0
6 stars 2 forks source link

BUG: Scripts are being injected multiple times #70

Closed Guy-Adler closed 3 years ago

Guy-Adler commented 3 years ago

Describe the bug When loading geofs, the scripts are being inejcted four times

To Reproduce

  1. Rebuild autoland, adding console.log(name) to the function defined in background.ts#141
  2. Open the console and see each name appearing four times.

Expected behavior Each Script should only load once.

Actual behavior The scripts are loading multiple times, which might cause this bug to happen

Screenshots image

Desktop (please complete the following information):

nicolas377 commented 3 years ago

So somewhere, we've accidentally called the addScripts function multiple times.

Guy-Adler commented 3 years ago

The tab is causing a tab update 4 times taken from changeInfo:

1: {
  status: "loading"
  url: "https://www.geo-fs.com/geofs.php"
}

2: {
  favIconUrl: "https://www.geo-fs.com/favicon.ico"
}

3: {
  title: "GeoFS - Fly in Your Web Browser"
}

4: {
  status: "complete"
}

We can filter it and make only the last tab update triggers the scripts injection process, and it might fix the issue. trying it now.

nicolas377 commented 3 years ago

Thanks! I'll work on a fix for this.

geofsautoland commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.