diff --git a/README.md b/README.md index a853504..04b43b9 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,13 @@ X GeoBlock is a Manifest V3 browser extension for Chromium and Firefox. While yo - Processes posts already on the page and posts loaded by infinite scrolling. - Performs authenticated About-page requests in the background. If X returns only its empty application shell, an isolated invisible extension frame renders the account data without opening tabs or windows. -- Caches account results locally without expiration until you clear the cache. +- Caches account results locally for 30 days, with manual clearing available. - Coalesces duplicate lookups and spaces network requests to reduce load on X. - Skips followed accounts. - Provides a searchable country and region checklist with flags, an enable switch, and optional hidden-post placeholders. -- Stores all settings and lookup results in browser extension storage. No data is sent to third parties. +- Includes opt-in debug logging for every lookup and filtering decision. +- By default, stores all settings and lookup results only in browser extension storage. No data is sent to third parties unless cloud contribution is explicitly enabled. +- Supports an optional, self-hosted Cloudflare Worker + D1 collaborative cache with signed opt-in contributions and three-installation consensus. ## Install from source in Chromium @@ -41,7 +43,7 @@ npm run check npm run build ``` -After editing a file, reload the extension and refresh the X tab. See [Architecture](docs/architecture.md), [Releases](docs/releases.md), [Privacy](docs/privacy.md), and [Contributing](CONTRIBUTING.md). +After editing a file, reload the extension and refresh the X tab. See [Architecture](docs/architecture.md), [Cloud cache](docs/cloud-cache.md), [Releases](docs/releases.md), [Privacy](docs/privacy.md), and [Contributing](CONTRIBUTING.md). ## Limitations diff --git a/background.js b/background.js index 728588d..f4e403b 100644 --- a/background.js +++ b/background.js @@ -1,9 +1,10 @@ -if (typeof XGeoConfig === "undefined") importScripts("lib/config.js"); +if (typeof XGeoConfig === "undefined") importScripts("lib/config.js", "lib/cloud-cache.js"); const extensionApi = globalThis.browser || chrome; const CACHE_KEY = "userCache"; const FRAME_RULE_ID = 1; +const LOCAL_CACHE_TTL_MS = 30 * 24 * 60 * 60 * 1000; const activeRequests = new Map(); const pendingFrameLookups = new Map(); let queueTail = Promise.resolve(); @@ -17,7 +18,9 @@ extensionApi.runtime.onInstalled.addListener(async () => { extensionApi.runtime.onMessage.addListener((message, sender, sendResponse) => { if (message?.type === "lookup-user") { - lookupUser(message.username).then(sendResponse).catch((error) => { + lookupUser(message.username, message.followingHint, sender?.tab?.id).then(sendResponse).catch(async (error) => { + const { debugMode } = await extensionApi.storage.sync.get({ debugMode: false }); + emitDebug(sender?.tab?.id, debugMode, "Lookup failed", { username: message.username, error: error.message }); sendResponse({ ok: false, error: error.message }); }); return true; @@ -38,27 +41,61 @@ function validUsername(username) { return typeof username === "string" && /^[A-Za-z0-9_]{1,15}$/.test(username); } -async function lookupUser(username) { +async function lookupUser(username, followingHint = null, tabId = null) { if (!validUsername(username)) return { ok: false, error: "Invalid username" }; const key = username.toLowerCase(); if (activeRequests.has(key)) return activeRequests.get(key); - const promise = lookupUserInternal(username, key).finally(() => activeRequests.delete(key)); + const promise = lookupUserInternal(username, key, followingHint, tabId).finally(() => activeRequests.delete(key)); activeRequests.set(key, promise); return promise; } -async function lookupUserInternal(username, key) { +async function lookupUserInternal(username, key, followingHint, tabId) { const settings = await extensionApi.storage.sync.get(XGeoConfig.DEFAULT_SETTINGS); + emitDebug(tabId, settings.debugMode, "Lookup started", { username, followingHint }); const stored = await extensionApi.storage.local.get(CACHE_KEY); const cache = stored[CACHE_KEY] || {}; const cached = cache[key]; - if (cached && (cached.country || cached.following === true)) { + const cacheFresh = cached && Date.now() - Number(cached.checkedAt || 0) < LOCAL_CACHE_TTL_MS; + if (cacheFresh && (cached.country || cached.following === true)) { + emitDebug(tabId, settings.debugMode, "Local cache hit", { username, country: cached.country, following: cached.following, source: cached.source || "direct" }); return decision(cached, settings, true); } + if (cached) { + emitDebug(tabId, settings.debugMode, "Local cache expired or invalid", { username, checkedAt: cached.checkedAt || null }); + delete cache[key]; + await extensionApi.storage.local.set({ [CACHE_KEY]: cache }); + } else emitDebug(tabId, settings.debugMode, "Local cache miss", { username }); - const result = await enqueue(() => fetchAbout(username)); + if (followingHint === true) { + emitDebug(tabId, settings.debugMode, "Author is followed; allowing post", { username }); + return decision({ country: null, following: true }, settings, false); + } + if (followingHint === false && settings.cloudCacheEndpoint) { + try { + emitDebug(tabId, settings.debugMode, "Cloud cache lookup", { username, endpoint: settings.cloudCacheEndpoint }); + const cloud = await XGeoCloud.lookup(settings.cloudCacheEndpoint, [key]); + const hit = cloud.get(key); + if (hit?.status === "confirmed" && hit.location) { + emitDebug(tabId, settings.debugMode, "Cloud cache hit", { username, country: hit.location, confidence: hit.confidence, confirmations: hit.confirmations }); + const record = { country: hit.location, following: false, checkedAt: Date.now(), source: "cloud" }; + cache[key] = record; + await extensionApi.storage.local.set({ [CACHE_KEY]: cache }); + return decision(record, settings, false); + } + emitDebug(tabId, settings.debugMode, "Cloud cache miss", { username }); + } catch (error) { + emitDebug(tabId, settings.debugMode, "Cloud cache error; falling back to X", { username, error: error.message }); + // Cloud cache failure must never prevent the direct X lookup. + } + } + + emitDebug(tabId, settings.debugMode, "Direct X lookup started", { username }); + const lookupLog = (event, data = {}) => emitDebug(tabId, settings.debugMode, event, { username, ...data }); + const result = await enqueue(() => fetchAbout(username, lookupLog)); const record = { ...result, checkedAt: Date.now() }; + emitDebug(tabId, settings.debugMode, "Direct X lookup completed", { username, country: record.country, following: record.following }); if (record.country || record.following === true) { cache[key] = record; await extensionApi.storage.local.set({ [CACHE_KEY]: cache }); @@ -66,7 +103,23 @@ async function lookupUserInternal(username, key) { delete cache[key]; await extensionApi.storage.local.set({ [CACHE_KEY]: cache }); } - return decision(record, settings, false); + if (record.country && settings.contributeCloudCache && settings.cloudCacheEndpoint) { + emitDebug(tabId, settings.debugMode, "Cloud contribution queued", { username, country: record.country }); + XGeoCloud.report(settings.cloudCacheEndpoint, key, record.country, extensionApi.runtime.getManifest().version) + .then(() => emitDebug(tabId, settings.debugMode, "Cloud contribution accepted", { username })) + .catch((error) => emitDebug(tabId, settings.debugMode, "Cloud contribution failed", { username, error: error.message })); + } + const finalDecision = decision(record, settings, false); + emitDebug(tabId, settings.debugMode, "Decision", { username, country: finalDecision.country, following: finalDecision.following, blocked: finalDecision.blocked }); + return finalDecision; +} + +function emitDebug(tabId, enabled, event, data = {}) { + if (!enabled) return; + console.debug("[X GeoBlock]", event, data); + if (Number.isInteger(tabId)) { + extensionApi.tabs.sendMessage(tabId, { type: "debug-event", event, data }).catch(() => {}); + } } function decision(record, settings, cached) { @@ -90,21 +143,25 @@ function enqueue(task) { return run; } -async function fetchAbout(username) { +async function fetchAbout(username, log = () => {}) { try { const response = await fetch(`https://x.com/${encodeURIComponent(username)}/about`, { credentials: "include", headers: { "Accept-Language": "en-US,en;q=0.9" }, redirect: "follow" }); + log("Background HTTP response", { status: response.status, finalUrl: response.url }); if (response.ok && !/\/i\/flow\/login/i.test(response.url)) { const parsed = await parseFetchedHtml(await response.text(), username); + log("Background HTML parsed", { country: parsed?.country || null, following: parsed?.following ?? null }); if (parsed?.country) return parsed; } - } catch (_) { + } catch (error) { + log("Background HTTP lookup failed", { error: error.message }); // X frequently serves an incomplete SPA shell to extension fetches. } - return lookupViaBackgroundFrame(username); + log("Falling back to isolated background frame"); + return lookupViaBackgroundFrame(username, log); } async function parseFetchedHtml(html, username) { @@ -116,16 +173,17 @@ async function parseFetchedHtml(html, username) { return extensionApi.runtime.sendMessage({ type: "parse-about-html", html, username }); } -async function lookupViaBackgroundFrame(username) { +async function lookupViaBackgroundFrame(username, log = () => {}) { const key = username.toLowerCase(); return new Promise((resolve, reject) => { const timer = setTimeout(() => { pendingFrameLookups.delete(key); removeBackgroundFrame(key); + log("Isolated background frame timed out"); reject(new Error(`Timed out while rendering @${username}'s About page in the background`)); }, 25000); - pendingFrameLookups.set(key, { resolve, reject, timer }); - createBackgroundFrame(username).catch((error) => { + pendingFrameLookups.set(key, { resolve, reject, timer, log }); + createBackgroundFrame(username).then(() => log("Isolated background frame created")).catch((error) => { clearTimeout(timer); pendingFrameLookups.delete(key); reject(error); @@ -137,6 +195,7 @@ function finishFrameLookup(message) { const key = String(message.username).toLowerCase(); const pending = pendingFrameLookups.get(key); if (!pending) return; + pending.log("Rendered About page reported a result", { country: message.country || null, following: message.following ?? null }); clearTimeout(pending.timer); pendingFrameLookups.delete(key); pending.resolve({ diff --git a/content.js b/content.js index 8ea9abc..ac1281d 100644 --- a/content.js +++ b/content.js @@ -3,7 +3,7 @@ const extensionApi = globalThis.browser || chrome; const processed = new WeakSet(); const hiddenByUser = new Map(); -let settings = { enabled: true, showPlaceholder: false }; +let settings = { enabled: true, showPlaceholder: false, debugMode: false }; let scanQueued = false; initialize(); @@ -15,7 +15,8 @@ async function initialize() { return; } if (window.top !== window) return; - settings = await extensionApi.storage.sync.get({ enabled: true, showPlaceholder: false }); + settings = await extensionApi.storage.sync.get({ enabled: true, showPlaceholder: false, debugMode: false }); + debug("Content script initialized", { url: location.href }); scan(document); new MutationObserver((mutations) => { if (mutations.some((mutation) => mutation.addedNodes.length)) scheduleScan(); @@ -44,11 +45,18 @@ extensionApi.storage.onChanged.addListener((changes, area) => { if (area !== "sync") return; if (changes.enabled) settings.enabled = changes.enabled.newValue; if (changes.showPlaceholder) settings.showPlaceholder = changes.showPlaceholder.newValue; + if (changes.debugMode) settings.debugMode = changes.debugMode.newValue; restoreAll(); document.querySelectorAll("article").forEach((article) => processed.delete(article)); if (settings.enabled) scheduleScan(); }); +extensionApi.runtime.onMessage.addListener((message) => { + if (message?.type === "debug-event" && settings.debugMode) { + console.debug("[X GeoBlock]", message.event, message.data || {}); + } +}); + function scheduleScan() { if (scanQueued) return; scanQueued = true; @@ -68,11 +76,14 @@ async function processArticle(article) { if (processed.has(article)) return; const identity = getTweetIdentity(article); if (!identity) return; + debug("Post author detected", identity); processed.add(article); article.dataset.xGeoBlockState = "checking"; try { - const result = await extensionApi.runtime.sendMessage({ type: "lookup-user", username: identity.username }); + const followingHint = await getFollowingHint(article, identity.username); + debug("Following hint resolved", { username: identity.username, followingHint }); + const result = await extensionApi.runtime.sendMessage({ type: "lookup-user", username: identity.username, followingHint }); if (!article.isConnected || !result?.ok) { delete article.dataset.xGeoBlockState; return; @@ -80,11 +91,30 @@ async function processArticle(article) { article.dataset.xGeoBlockCountry = result.country || "unknown"; if (result.blocked) hideArticle(article, identity.username, result.country); else article.dataset.xGeoBlockState = result.following ? "followed" : "allowed"; - } catch (_) { + debug("Post decision applied", { username: identity.username, ...result }); + } catch (error) { + debug("Post lookup failed", { username: identity.username, error: error.message }); delete article.dataset.xGeoBlockState; } } +function getFollowingHint(article, username) { + return new Promise((resolve) => { + let settled = false; + const finish = () => { + if (settled) return; + settled = true; + article.removeEventListener("x-geoblock-following-response", finish); + const value = article.dataset.xGeoBlockFollowing; + resolve(value === "true" ? true : value === "false" ? false : null); + }; + article.dataset.xGeoBlockRequestUser = username; + article.addEventListener("x-geoblock-following-response", finish, { once: true }); + article.dispatchEvent(new Event("x-geoblock-following-request")); + setTimeout(finish, 150); + }); +} + function getTweetIdentity(article) { const links = article.querySelectorAll('a[href*="/status/"]'); for (const link of links) { @@ -95,6 +125,7 @@ function getTweetIdentity(article) { } function hideArticle(article, username, country) { + debug("Hiding post", { username, country }); article.dataset.xGeoBlockState = "blocked"; const container = article.closest('[data-testid="cellInnerDiv"]') || article; container.classList.add("x-geoblock-hidden"); @@ -112,6 +143,10 @@ function hideArticle(article, username, country) { } } +function debug(event, data = {}) { + if (settings.debugMode) console.debug("[X GeoBlock]", event, data); +} + function restoreAll() { document.querySelectorAll(".x-geoblock-hidden").forEach((node) => { node.classList.remove("x-geoblock-hidden", "x-geoblock-revealed"); diff --git a/docs/architecture.md b/docs/architecture.md index 34b2b37..85de7c8 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -9,7 +9,7 @@ 5. The worker caches the result and compares the country with the configured blacklist. 6. The content script hides the post only when the country matches and the account is not followed. -Failed or ambiguous lookups fail open: the post remains visible. Empty results are never cached. Successful lookups remain cached without expiration. The user can clear the entire cache from the settings page if X changes an account's country or following relationship. +Failed or ambiguous lookups fail open: the post remains visible. Empty results are never cached. Successful local and cloud lookups expire after 30 days. The user can clear the entire cache from the settings page at any time. ## Browser components diff --git a/docs/cloud-cache.md b/docs/cloud-cache.md new file mode 100644 index 0000000..9061322 --- /dev/null +++ b/docs/cloud-cache.md @@ -0,0 +1,28 @@ +# Collaborative cloud cache + +The optional cloud cache uses the Cloudflare Worker and D1 schema in `worker/`. It is disabled until a user enters a deployed Worker URL in extension settings. Contributing observations is a separate opt-in choice. + +## Data flow + +1. Local cache results always win. +2. When the page's own React data confirms that an author is not followed, the extension asks the Worker for a confirmed location using a SHA-256 username hash. +3. A confirmed cloud hit can be used immediately. Pending, conflicting, stale, unavailable, or malformed results fall back to a direct X lookup. +4. A direct successful lookup is stored locally. If contribution is enabled, the extension signs and submits the username hash, location, observation time, and parser version. + +Following relationships, blacklist entries, post contents, URLs visited, and raw usernames are not uploaded. Username hashing reduces accidental disclosure but is not anonymity because public handles can be enumerated and hashed. + +## Cryptographic boundary + +Each installation creates an ECDSA P-256 key pair with a non-exportable private key in IndexedDB. Reports include a timestamp and one-time nonce and are signed over the HTTP method, path, timestamp, nonce, and body hash. D1 rejects replayed nonces. + +This proves continuity of an installation and prevents report tampering. It cannot prove that a request came from the official extension: an attacker can reproduce public extension behavior and register another key. Embedded API keys, extension origins, user-agent strings, and CORS are not authentication. Consensus and rate limits provide the actual abuse resistance. + +## Freshness and consensus + +- Three distinct installations must agree within seven days. +- Tied observations become `conflict` and are never returned for blocking. +- Confirmed entries are served for 30 days. +- Raw observations are retained for 90 days. +- Local cache entries expire after 30 days or when the user clears them. + +These values are configured in `worker/wrangler.toml`. diff --git a/docs/privacy.md b/docs/privacy.md index 4f48b41..c5694a0 100644 --- a/docs/privacy.md +++ b/docs/privacy.md @@ -2,6 +2,8 @@ X GeoBlock does not collect analytics, transmit browsing data to third parties, or operate a remote server. -The extension reads public account About pages from `x.com` using the X session already present in your browser. It stores usernames, detected countries, following status, and lookup timestamps in local extension storage without automatic expiration. Settings use synchronized extension storage when browser sync is enabled. You can clear the lookup cache at any time from the settings page or remove all extension data by uninstalling the extension. +The extension reads public account About pages from `x.com` using the X session already present in your browser. It stores usernames, detected countries, following status, and lookup timestamps in local extension storage for 30 days. Settings use synchronized extension storage when browser sync is enabled. You can clear the lookup cache at any time from the settings page or remove all extension data by uninstalling the extension. The extension reads post author links in X timelines only to decide whether to display those posts. It does not read or store post text. + +The optional collaborative cache is disabled until a Worker URL is configured. Cloud reads send SHA-256 hashes of public usernames. If contribution is enabled separately, signed reports also contain the observed location, timestamp, and parser version. The service never receives following relationships, blacklist settings, post contents, or raw usernames. Public username hashes remain enumerable and must not be treated as anonymous data. diff --git a/lib/cloud-cache.js b/lib/cloud-cache.js new file mode 100644 index 0000000..14926f9 --- /dev/null +++ b/lib/cloud-cache.js @@ -0,0 +1,124 @@ +(function (root) { + "use strict"; + + const DB_NAME = "x-geoblock-identity"; + const STORE_NAME = "keys"; + const KEY_ID = "installation"; + + function normalizeEndpoint(value) { + try { + const url = new URL(String(value || "").trim()); + if (url.protocol !== "https:") return ""; + return url.origin; + } catch { return ""; } + } + + async function lookup(endpoint, usernames) { + endpoint = normalizeEndpoint(endpoint); + if (!endpoint) return new Map(); + const pairs = await Promise.all(usernames.map(async (username) => [username, await hashHandle(username)])); + const response = await fetch(`${endpoint}/v1/cache/lookup`, { + method: "POST", + headers: { "content-type": "application/json" }, + body: JSON.stringify({ handleHashes: pairs.map(([, hash]) => hash) }) + }); + if (!response.ok) throw new Error(`Cloud cache lookup failed: HTTP ${response.status}`); + const data = await response.json(); + const byHash = new Map((data.results || []).map((result) => [result.handleHash, result])); + return new Map(pairs.flatMap(([username, hash]) => byHash.has(hash) ? [[username, byHash.get(hash)]] : [])); + } + + async function report(endpoint, username, location, parserVersion) { + endpoint = normalizeEndpoint(endpoint); + if (!endpoint || !location) return; + const identity = await getIdentity(endpoint); + const path = "/v1/cache/report"; + const body = JSON.stringify({ + handleHash: await hashHandle(username), + location, + observedAt: Math.floor(Date.now() / 1000), + parserVersion + }); + const timestamp = String(Math.floor(Date.now() / 1000)); + const nonce = randomBase64Url(18); + const bodyHash = await sha256Hex(body); + const canonical = `POST\n${path}\n${timestamp}\n${nonce}\n${bodyHash}`; + const signature = await crypto.subtle.sign( + { name: "ECDSA", hash: "SHA-256" }, identity.privateKey, new TextEncoder().encode(canonical) + ); + const response = await fetch(`${endpoint}${path}`, { + method: "POST", + headers: { + "content-type": "application/json", + "x-installation-id": identity.installationId, + "x-timestamp": timestamp, + "x-nonce": nonce, + "x-signature": toBase64Url(signature) + }, + body + }); + if (response.status === 401) { + await deleteIdentity(); + throw new Error("Cloud cache installation identity was rejected"); + } + if (!response.ok) throw new Error(`Cloud cache report failed: HTTP ${response.status}`); + } + + async function getIdentity(endpoint) { + const existing = await readIdentity(); + if (existing?.endpoint === endpoint && existing.privateKey && existing.installationId) return existing; + const keyPair = await crypto.subtle.generateKey( + { name: "ECDSA", namedCurve: "P-256" }, false, ["sign", "verify"] + ); + const publicKey = await crypto.subtle.exportKey("jwk", keyPair.publicKey); + const response = await fetch(`${endpoint}/v1/installations`, { + method: "POST", + headers: { "content-type": "application/json" }, + body: JSON.stringify({ publicKey }) + }); + if (!response.ok) throw new Error(`Cloud cache registration failed: HTTP ${response.status}`); + const { installationId } = await response.json(); + const identity = { endpoint, installationId, privateKey: keyPair.privateKey }; + await writeIdentity(identity); + return identity; + } + + async function hashHandle(username) { + return sha256Hex(String(username).trim().toLowerCase()); + } + async function sha256Hex(value) { + const digest = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(value)); + return Array.from(new Uint8Array(digest), (byte) => byte.toString(16).padStart(2, "0")).join(""); + } + function randomBase64Url(length) { return toBase64Url(crypto.getRandomValues(new Uint8Array(length))); } + function toBase64Url(value) { + return btoa(String.fromCharCode(...new Uint8Array(value))).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/g, ""); + } + + function openDatabase() { + return new Promise((resolve, reject) => { + const request = indexedDB.open(DB_NAME, 1); + request.onupgradeneeded = () => request.result.createObjectStore(STORE_NAME); + request.onsuccess = () => resolve(request.result); + request.onerror = () => reject(request.error); + }); + } + async function transaction(mode, operation) { + const database = await openDatabase(); + try { + return await new Promise((resolve, reject) => { + const tx = database.transaction(STORE_NAME, mode); + const request = operation(tx.objectStore(STORE_NAME)); + request.onsuccess = () => resolve(request.result); + request.onerror = () => reject(request.error); + }); + } finally { database.close(); } + } + function readIdentity() { return transaction("readonly", (store) => store.get(KEY_ID)); } + function writeIdentity(value) { return transaction("readwrite", (store) => store.put(value, KEY_ID)); } + function deleteIdentity() { return transaction("readwrite", (store) => store.delete(KEY_ID)); } + + const api = { normalizeEndpoint, lookup, report, hashHandle }; + root.XGeoCloud = api; + if (typeof module !== "undefined") module.exports = api; +})(typeof globalThis !== "undefined" ? globalThis : this); diff --git a/lib/config.js b/lib/config.js index 16d02b2..1f3d6d8 100644 --- a/lib/config.js +++ b/lib/config.js @@ -4,7 +4,10 @@ const DEFAULT_SETTINGS = Object.freeze({ enabled: true, blacklist: [], - showPlaceholder: false + showPlaceholder: false, + debugMode: false, + cloudCacheEndpoint: "", + contributeCloudCache: false }); const COUNTRY_ALIASES = Object.freeze({ diff --git a/manifest.json b/manifest.json index d9dd5b3..66d707f 100644 --- a/manifest.json +++ b/manifest.json @@ -17,10 +17,23 @@ "host_permissions": [ "https://x.com/*" ], + "optional_host_permissions": [ + "https://*/*" + ], "background": { "service_worker": "background.js" }, "content_scripts": [ + { + "matches": [ + "https://x.com/*" + ], + "js": [ + "page-bridge.js" + ], + "run_at": "document_start", + "world": "MAIN" + }, { "matches": [ "https://x.com/*" diff --git a/options/options.css b/options/options.css index ccbe0df..0d0b0e9 100644 --- a/options/options.css +++ b/options/options.css @@ -3,10 +3,11 @@ body { margin: 0; background: #0f1419; color: #e7e9ea; } main { max-width: 650px; margin: 48px auto; padding: 0 24px; } .brand { display:flex; align-items:center; gap:16px; }.brand img { width:64px; height:64px; object-fit:contain; flex:0 0 auto; }h1 { font-size: 32px; margin:0 0 4px; }.lead,.hint { color: #8b98a5; }.lead { margin:0; }.hint { margin: 6px 0 8px; font-size: 14px; } fieldset { border: 0; padding: 0; margin: 28px 0 0; } legend { font-size: 18px; font-weight: 700; padding: 0; } -input[type=search] { box-sizing: border-box; flex: 1; min-width: 180px; border: 1px solid #536471; border-radius: 999px; background: #000; color: inherit; padding: 10px 14px; font: inherit; } +input[type=search],input[type=url] { box-sizing: border-box; flex: 1; width:100%; min-width: 180px; border: 1px solid #536471; border-radius: 999px; background: #000; color: inherit; padding: 10px 14px; font: inherit; } .check { display: block; margin: 22px 0; }.check input { margin-right: 8px; }.actions { display: flex; gap: 12px; margin-top: 28px; } button { border: 0; border-radius: 999px; background: #1d9bf0; color: #fff; padding: 10px 18px; font-weight: 700; cursor: pointer; } button.secondary { background: transparent; border: 1px solid #536471; }#status { min-height: 24px; color: #00ba7c; } .country-tools { display: flex; gap: 12px; align-items: center; margin: 14px 0 8px; }.link-button { background: transparent; color: #1d9bf0; padding: 8px; white-space: nowrap; } .selection-count { color: #8b98a5; margin: 8px 0; font-size: 14px; }.country-list { display: grid; grid-template-columns: repeat(auto-fill,minmax(190px,1fr)); gap: 6px; max-height: 430px; overflow: auto; border: 1px solid #2f3336; border-radius: 12px; padding: 10px; background: #000; } .country-option { display: flex; align-items: center; gap: 9px; padding: 7px 8px; margin: 0; border-radius: 8px; cursor: pointer; }.country-option:hover { background: #16181c; }.country-option[hidden] { display: none; }.country-flag { font-size: 20px; line-height: 1; }.country-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } +.cloud-settings { border-top:1px solid #2f3336; padding-top:24px; }.cloud-settings label:not(.check) { display:block; margin:14px 0 7px; font-weight:700; } diff --git a/options/options.html b/options/options.html index f518b9a..a8fc892 100644 --- a/options/options.html +++ b/options/options.html @@ -12,7 +12,16 @@
+ + -