fix: an open popup follows a network switch the background saves (closes #650)
When the background saves a network switch after the user approves a site's request, or another popup page saves one, an open popup takes the new network from the stored record inside a save, holding the lock, and checks the record once at start-up for a switch saved before it listened. The network it takes is not counted as the popup's own change, even when that save fails to write. It then leaves the page as a switch in Settings does. A switch in Settings is now made inside its own save too, so one picked while a follow waits for the lock is made after it. The popup never switches the network itself. Model: opus-5-5
This commit was merged in pull request #654.
This commit is contained in:
@@ -311,7 +311,7 @@ async function bootPopup(stored, options) {
|
||||
const windowListeners = {};
|
||||
|
||||
globalThis.chrome = {
|
||||
storage: { local: storage.local },
|
||||
storage: { local: storage.local, onChanged: storage.onChanged },
|
||||
runtime: {
|
||||
sendMessage: jest.fn(async () => ({})),
|
||||
getURL: (p) => "chrome-extension://autistmask/" + p,
|
||||
|
||||
Reference in New Issue
Block a user