feat: add location picker and persistent cache

This commit is contained in:
Darío Sevilla committed 2026-10-15 07:33:43 +00:00
1 parent fcea6cf7b7
commit 3811ae9cfc
16 files changed
+163 -39

No files matched your search

+9 -6
View File
@@ -1,15 +1,18 @@
<!doctype html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>X GeoBlock settings</title><link rel="stylesheet" href="options.css"></head>
<body><main>
<h1>X GeoBlock</h1><p class="lead">Hide posts based on the country shown in an account's About page.</p>
<div class="brand"><img src="../icons/icon.png" alt=""><div><h1>X GeoBlock</h1><p class="lead">Hide posts based on the country shown in an account's About page.</p></div></div>
<form id="settings">
<label class="check"><input id="enabled" type="checkbox"> Enable filtering</label>
<label for="blacklist">Blocked countries</label>
<p class="hint">Enter one country per line, exactly as X displays it.</p>
<textarea id="blacklist" rows="10" spellcheck="false"></textarea>
<label for="ttl">Cache duration (hours)</label><input id="ttl" type="number" min="1" max="8760">
<fieldset>
<legend>Blocked countries and regions</legend>
<p class="hint">X may show a country such as “United Kingdom” or a broader region such as “West Asia”. Nothing is blocked by default.</p>
<div class="country-tools"><input id="country-search" type="search" placeholder="Search countries and regions…" autocomplete="off"><button type="button" class="link-button" id="clear-selection">Clear selection</button></div>
<p id="selection-count" class="selection-count"></p>
<div id="country-list" class="country-list"></div>
</fieldset>
<label class="check"><input id="placeholder" type="checkbox"> Show a clickable placeholder for hidden posts</label>
<div class="actions"><button type="submit">Save settings</button><button type="button" class="secondary" id="clear">Clear user cache</button></div>
<p id="status" role="status"></p>
</form>
</main><script src="../lib/config.js"></script><script src="options.js"></script></body></html>
</main><script src="../lib/config.js"></script><script src="../lib/countries.js"></script><script src="options.js"></script></body></html>