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:
@@ -1,5 +1,11 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.0.75
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
|
||||||
|
- **Remove `alarms` permission and keepalive**: Removed `chrome.alarms` keepalive added in 0.0.73. The `maintainLoop` while-loop and `setInterval(checkMemory)` already keep the service worker alive. The alarm was a no-op that required an unnecessary permission.
|
||||||
|
|
||||||
## 0.0.74
|
## 0.0.74
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
{
|
{
|
||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
"name": "Playwriter",
|
"name": "Playwriter",
|
||||||
"version": "0.0.74",
|
"version": "0.0.75",
|
||||||
"description": "Automate your Browser using Cursor, Claude, VS Code. More capable and context efficient than Playwright MCP.",
|
"description": "Automate your Browser using Cursor, Claude, VS Code. More capable and context efficient than Playwright MCP.",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"alarms",
|
|
||||||
"debugger",
|
"debugger",
|
||||||
"tabGroups",
|
"tabGroups",
|
||||||
"contextMenus",
|
"contextMenus",
|
||||||
|
|||||||
@@ -1520,18 +1520,6 @@ async function onActionClicked(tab: chrome.tabs.Tab): Promise<void> {
|
|||||||
resetDebugger()
|
resetDebugger()
|
||||||
connectionManager.maintainLoop()
|
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
|
chrome.contextMenus
|
||||||
.remove('playwriter-pin-element')
|
.remove('playwriter-pin-element')
|
||||||
.catch(() => {})
|
.catch(() => {})
|
||||||
|
|||||||
Reference in New Issue
Block a user