You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: trash enabled by default, restart button, dashboard sort, base64 XHR, Firefox support
- Default trashMode to 30 days so deleted scripts go to trash instead of permanent delete
- Add restart message handler so the settings restart button works
- Dashboard defaults to sorting by most recently updated
- Encode arraybuffer XHR responses as base64 for efficient message passing
- Add Firefox manifest and build script
- Add CWS cookies justification doc
# ScriptVault - Cookies Permission Justification (Chrome Web Store)
2
+
3
+
## Permission: `cookies` (optional)
4
+
5
+
### Single Purpose Description
6
+
7
+
ScriptVault is a userscript manager that allows users to install and run custom JavaScript userscripts on web pages. The `cookies` permission is listed as an **optional permission** and is only activated when a user installs a userscript that explicitly declares `@grant GM_cookie` or `@grant GM.cookie` in its metadata.
8
+
9
+
### Why the `cookies` permission is needed
10
+
11
+
ScriptVault implements the `GM_cookie` API, which is part of the standard Greasemonkey/Tampermonkey userscript API specification. This API provides three functions:
12
+
13
+
-**`GM_cookie.list()`** — Reads cookies for a specific domain (calls `chrome.cookies.getAll()`)
14
+
-**`GM_cookie.set()`** — Sets a cookie on a specific domain (calls `chrome.cookies.set()`)
15
+
-**`GM_cookie.delete()`** — Removes a cookie from a specific domain (calls `chrome.cookies.remove()`)
16
+
17
+
These functions are required for compatibility with existing userscripts that depend on cookie access for legitimate purposes such as:
18
+
19
+
- Managing login sessions across subdomains
20
+
- Clearing tracking cookies from specific sites
21
+
- Reading site preferences stored in cookies
22
+
- Automating cookie consent workflows
23
+
24
+
### How it is used
25
+
26
+
1. The `cookies` permission is declared as an **optional permission** in `manifest.json` — it is never granted at install time.
27
+
2. When a user installs a userscript containing `@grant GM_cookie`, ScriptVault requests the permission via `chrome.permissions.request()` with an explicit user prompt.
28
+
3. Cookie operations are gated by a per-script `@grant` check — scripts without the `GM_cookie` grant cannot access cookie functions even if the permission has been granted.
29
+
4. An additional user-facing setting ("Allow scripts to access cookies") in the dashboard provides a global toggle for cookie access.
30
+
5. The extension does not read, modify, or transmit cookies for its own purposes. All cookie operations are initiated exclusively by user-installed userscripts.
31
+
32
+
### User control
33
+
34
+
- Users choose which userscripts to install and can review `@grant` declarations before installation.
35
+
- The optional permission prompt gives users an explicit opt-in at the browser level.
36
+
- The dashboard settings panel provides a global cookie access toggle.
37
+
- Users can revoke the optional permission at any time via Chrome's extension settings.
38
+
39
+
### Privacy
40
+
41
+
ScriptVault does not collect, store, or transmit any cookie data. Cookie operations occur entirely on the user's device between the userscript and the browser's cookie store. No cookie data is sent to any remote server by the extension itself. See our [Privacy Policy](https://github.com/SysAdminDoc/ScriptVault/blob/main/PRIVACY.md) for full details.
42
+
43
+
---
44
+
45
+
## CWS Submission Form — Suggested Text
46
+
47
+
**"Why does your extension need the `cookies` permission?"**
48
+
49
+
> ScriptVault is a userscript manager. The `cookies` permission is declared as optional and is only requested when a user installs a userscript that uses the standard GM_cookie API (`@grant GM_cookie`). This API allows userscripts to list, set, and delete cookies for specific domains — a standard feature of userscript managers (Tampermonkey, Violentmonkey). The permission is never used by the extension itself; it is exclusively used to fulfill userscript API calls initiated by user-installed scripts. Users must explicitly opt in via Chrome's permission prompt, and a dashboard toggle provides additional control. No cookie data is collected or transmitted by the extension.
0 commit comments