Add JSON definition subscriptions
This commit is contained in:
parent
7e17470356
commit
bedeb8495d
15 changed files with 321 additions and 37 deletions
|
|
@ -11,7 +11,7 @@
|
|||
"96": "icons/logo96.png",
|
||||
"128": "icons/logo128.png"
|
||||
},
|
||||
"permissions": ["storage", "tabs", "offscreen"],
|
||||
"permissions": ["storage", "tabs", "alarms", "offscreen"],
|
||||
"host_permissions": ["<all_urls>"],
|
||||
"background": { "service_worker": "background.js", "type": "module" },
|
||||
"content_scripts": [{ "matches": ["<all_urls>"], "js": ["content.js"], "run_at": "document_idle" }],
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
"128": "icons/logo128.png"
|
||||
},
|
||||
"browser_action": { "default_icon": "icons/logo32.png", "default_popup": "popup.html" },
|
||||
"permissions": ["storage", "tabs", "<all_urls>"],
|
||||
"permissions": ["storage", "tabs", "alarms", "<all_urls>"],
|
||||
"background": { "scripts": ["background.js"], "persistent": true },
|
||||
"content_scripts": [{ "matches": ["<all_urls>"], "js": ["content.js"], "run_at": "document_idle" }],
|
||||
"options_ui": { "page": "options.html", "open_in_tab": true },
|
||||
|
|
|
|||
|
|
@ -42,10 +42,21 @@
|
|||
<fieldset class="field">
|
||||
<legend class="label">Site definitions</legend>
|
||||
<div class="content">
|
||||
<p>VibeGuard includes <code>mastodon</code> for the official Mastodon web interface. Add a custom definition with the same ID to override it, or add its ID to <code>disabledDefinitionIds</code> to disable it.</p>
|
||||
<p>Definitions are loaded from subscriptions weekly. The bundled collection remains available when a subscription is unavailable.</p>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="label" for="definitions">Custom definitions (JSON)</label>
|
||||
<label class="label" for="subscription-url">Add JSON subscription URL</label>
|
||||
<div class="field has-addons">
|
||||
<div class="control is-expanded"><input class="input" id="subscription-url" type="url" placeholder="https://example.com/definitions.json"></div>
|
||||
<div class="control"><button class="button" type="button" id="add-subscription">Add</button></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="subscriptions" class="content"></div>
|
||||
<div class="buttons">
|
||||
<button class="button" type="button" id="refresh-subscriptions">Update subscriptions now</button>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="label" for="definitions">Advanced local overrides (JSON)</label>
|
||||
<div class="control">
|
||||
<textarea class="textarea vibeguard-json" id="definitions" rows="18" spellcheck="false"></textarea>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue