extension: remove chrome.alarms keepalive and alarms permission
The alarm added in 0.0.73 was a no-op — the maintainLoop while(true) + sleep(1000) and setInterval(checkMemory, 5000) already keep the service worker alive. Removing it drops the unnecessary alarms permission from the manifest. Bumps extension to 0.0.75.
This commit is contained in:
@@ -1520,18 +1520,6 @@ async function onActionClicked(tab: chrome.tabs.Tab): Promise<void> {
|
||||
resetDebugger()
|
||||
connectionManager.maintainLoop()
|
||||
|
||||
// MV3 service workers can be terminated by Chrome despite setInterval.
|
||||
// chrome.alarms is the only reliable way to keep a service worker alive.
|
||||
// Without this, the maintainLoop stops, the WebSocket closes, and the
|
||||
// extension silently disconnects from the relay server.
|
||||
chrome.alarms.create('keepalive', { periodInMinutes: 0.25 })
|
||||
chrome.alarms.onAlarm.addListener((alarm) => {
|
||||
if (alarm.name === 'keepalive') {
|
||||
// No-op — the alarm firing is enough to wake the service worker.
|
||||
// The maintainLoop will handle reconnection if needed.
|
||||
}
|
||||
})
|
||||
|
||||
chrome.contextMenus
|
||||
.remove('playwriter-pin-element')
|
||||
.catch(() => {})
|
||||
|
||||
Reference in New Issue
Block a user