commit c07cbfb614502a7a5dd4f02f11c8e552c34385b5 Author: Dasemu Date: Fri Jul 17 16:57:55 2026 +0200 chore: initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fafff2e --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.DS_Store +Thumbs.db diff --git a/background.js b/background.js new file mode 100644 index 0000000..b4dc11a --- /dev/null +++ b/background.js @@ -0,0 +1,141 @@ +// Background service worker – fetches "Account based in" country via X.com GraphQL. +// Persistent cache + throttled queue to avoid X rate limits. + +const BEARER = 'Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA'; +const ABOUT_QUERY_ID = 'TzOG2twZEfhr9KmClvVVqA'; + +const MIN_INTERVAL = 400; // ms between consecutive requests +const RATE_LIMIT_COOLDOWN = 60000; // ms to back off after a 429 +const STORAGE_KEY = 'phenocheck_country_cache'; + +const memCache = new Map(); // handleLower -> country(string) | null +const queue = []; // { handle, resolve } +let processing = false; +let rateLimitedUntil = 0; +let storageLoaded = false; + +// ── Persistent cache ──────────────────────────────────────────────── + +async function loadCache() { + if (storageLoaded) return; + try { + const data = await chrome.storage.local.get(STORAGE_KEY); + const obj = data[STORAGE_KEY]; + if (obj && typeof obj === 'object') { + for (const [k, v] of Object.entries(obj)) memCache.set(k, v); + } + } catch {} + storageLoaded = true; +} + +let saveTimer = null; +function scheduleSave() { + if (saveTimer) return; + saveTimer = setTimeout(async () => { + saveTimer = null; + try { + await chrome.storage.local.set({ [STORAGE_KEY]: Object.fromEntries(memCache) }); + } catch {} + }, 1500); +} + +// ── Messaging ─────────────────────────────────────────────────────── + +chrome.runtime.onMessage.addListener((message, sender, sendResponse) => { + if (message.type === 'FETCH_BASED_IN') { + handleRequest(message.handle).then(sendResponse).catch(() => sendResponse({ status: 'unavailable' })); + return true; // async + } +}); + +async function handleRequest(handle) { + await loadCache(); + const key = handle.toLowerCase(); + if (memCache.has(key)) { + return { status: 'ok', country: memCache.get(key) }; + } + return new Promise((resolve) => { + queue.push({ handle, key, resolve }); + processQueue(); + }); +} + +// ── Throttled queue ───────────────────────────────────────────────── + +function sleep(ms) { return new Promise(r => setTimeout(r, ms)); } + +async function processQueue() { + if (processing) return; + processing = true; + while (queue.length) { + const job = queue.shift(); + + // Already resolved by a concurrent request? + if (memCache.has(job.key)) { + job.resolve({ status: 'ok', country: memCache.get(job.key) }); + continue; + } + // Backing off due to rate limit → respond unavailable, don't cache + if (Date.now() < rateLimitedUntil) { + job.resolve({ status: 'unavailable' }); + continue; + } + + const result = await doFetch(job.handle, job.key); + job.resolve(result); + + if (result.status === 'ok') await sleep(MIN_INTERVAL); + } + processing = false; +} + +async function getCsrf() { + try { + const cookie = await chrome.cookies.get({ url: 'https://x.com', name: 'ct0' }); + return cookie ? cookie.value : null; + } catch { + return null; + } +} + +async function doFetch(handle, key) { + const ct0 = await getCsrf(); + if (!ct0) return { status: 'unavailable' }; + + const url = + 'https://x.com/i/api/graphql/' + ABOUT_QUERY_ID + '/AboutAccountQuery?variables=' + + encodeURIComponent(JSON.stringify({ screenName: handle })); + + try { + const res = await fetch(url, { + headers: { + 'authorization': BEARER, + 'x-csrf-token': ct0, + 'x-twitter-active-user': 'yes', + 'x-twitter-auth-type': 'OAuth2Session', + 'x-twitter-client-language': 'en', + 'content-type': 'application/json', + }, + credentials: 'include', + }); + + if (res.status === 429) { + rateLimitedUntil = Date.now() + RATE_LIMIT_COOLDOWN; + return { status: 'unavailable' }; + } + if (!res.ok) { + return { status: 'unavailable' }; + } + + const data = await res.json(); + const country = + data?.data?.user_result_by_screen_name?.result?.about_profile?.account_based_in ?? null; + + // Cache successful lookups (including genuine "no country" as null) + memCache.set(key, country); + scheduleSave(); + return { status: 'ok', country }; + } catch { + return { status: 'unavailable' }; + } +} diff --git a/content.css b/content.css new file mode 100644 index 0000000..a8ac0f0 --- /dev/null +++ b/content.css @@ -0,0 +1,189 @@ +/* Phenocheck – injected styles for X.com */ + +/* Button outer wrapper: no background, no border-radius – just a column flex */ +#phenocheck-btn { + display: flex; + flex-direction: column; + padding: 4px 0; + cursor: pointer; + width: 100%; + box-sizing: border-box; + user-select: none; + background: none; + border: none; + color: inherit; +} + +/* Inner pill – receives hover/active background */ +#phenocheck-btn .phenocheck-inner { + display: flex; + flex-direction: row; + align-items: center; + gap: 16px; + padding: 12px; + border-radius: 9999px; + transition: background 0.15s ease; + font-size: 20px; + font-weight: 400; + white-space: nowrap; + font-family: inherit; +} + +/* Badge: positioned in the left column div (sibling to the avatar), + below the avatar. top is set dynamically by JS. */ +.phenocheck-badge { + position: absolute; + top: 44px; /* default; overridden by JS to avatar.offsetHeight + 4 */ + left: 50%; + transform: translateX(-50%); + z-index: 9999; + display: flex; + flex-direction: column; + align-items: center; + width: 40px; + cursor: default; + pointer-events: auto; + background: #0f1318; + border: 1.5px solid #7856FF; + border-radius: 6px; + padding: 3px 2px 2px; + box-shadow: 0 2px 8px rgba(0,0,0,0.7); +} + +/* Fallback corner placement */ +.phenocheck-badge.pc-corner { + top: 42px; + right: 8px; + left: auto; + transform: none; +} + +/* Detail/focused tweet: small overlay badge on bottom-right of avatar */ +.phenocheck-badge.pc-detail { + top: auto; + bottom: -4px; + right: -10px; + left: auto; + transform: none; + width: 26px; + padding: 2px 1px 1px; + border-width: 1px; +} + +.phenocheck-badge.pc-detail img.pc-thumb { + width: 22px; + height: 28px; +} + +.phenocheck-badge.pc-detail .pc-name { + font-size: 7px; + max-width: 26px; +} + +.phenocheck-badge.pc-detail .pc-tooltip { + /* keep normal tooltip size */ +} + +.phenocheck-badge img.pc-thumb { + width: 34px; + height: 44px; + object-fit: cover; + border-radius: 3px; + display: block; +} + +.phenocheck-badge .pc-name { + font-size: 8px; + text-align: center; + margin-top: 2px; + line-height: 1.15; + opacity: 0.65; + max-width: 44px; + word-break: break-word; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; +} + +/* Unavailable: darkened thumbnail with a "?" overlay */ +.phenocheck-badge.pc-unavailable .pc-thumb-wrap { + position: relative; + width: 34px; + height: 44px; +} + +.phenocheck-badge.pc-unavailable img.pc-thumb { + filter: brightness(0.3) grayscale(0.8); +} + +.phenocheck-badge.pc-unavailable .pc-q { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + display: flex; + align-items: center; + justify-content: center; + font-size: 22px; + font-weight: 700; + color: rgba(255,255,255,0.85); + text-shadow: 0 1px 3px rgba(0,0,0,0.8); +} + +.phenocheck-badge.pc-unavailable .pc-name { + opacity: 0.5; +} + +/* "Reside en: " – inline text right after the tweet date */ +.pc-residence { + display: inline-flex; + align-items: center; + margin-left: 6px; + font-size: 13px; + font-weight: 600; + color: #7856FF; + white-space: nowrap; + vertical-align: middle; + line-height: 1; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; +} + +/* Tooltip – shown on hover, positioned via JS */ +.phenocheck-badge .pc-tooltip { + display: none; + position: fixed; + z-index: 99999; + background: #1a1a2e; + border: 1px solid rgba(120,86,255,0.5); + border-radius: 8px; + padding: 8px; + box-shadow: 0 4px 20px rgba(0,0,0,0.4); + flex-direction: column; + align-items: center; + gap: 6px; + pointer-events: none; + min-width: 140px; +} + +.phenocheck-badge:hover .pc-tooltip { + display: flex; +} + +.phenocheck-badge .pc-tooltip img { + width: 120px; + height: 160px; + object-fit: cover; + border-radius: 4px; +} + +.phenocheck-badge .pc-tooltip b { + font-size: 12px; + color: #e7e9ea; + font-weight: 600; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; +} + +.phenocheck-badge .pc-tooltip span { + font-size: 10px; + color: rgba(231,233,234,0.6); + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; +} diff --git a/content.js b/content.js new file mode 100644 index 0000000..9b9fe10 --- /dev/null +++ b/content.js @@ -0,0 +1,453 @@ +// Phenocheck – X.com content script +// Country comes from X's "Account based in" (AboutAccountQuery), fetched in background.js + +const PC = { + enabled: false, + cache: {}, // handle -> { country, phenos } | undefined + observer: null, + btnObserver: null, + IMG_BASE: chrome.runtime.getURL('images/phenotypes/'), +}; + +// ─── Per-handle phenotype overrides ───────────────────────────────── +// Maps handle (lowercase) → { imgSrc, name } +const HANDLE_OVERRIDES = { + 'cobardeeres10': { + imgSrc: chrome.runtime.getURL('images/phenotypes/custom/cobardeeres10.png'), + name: 'Eluservo', + }, +}; + +// ─── Country → flag emoji ──────────────────────────────────────────── + +const COUNTRY_ISO = { + 'spain':'ES','france':'FR','germany':'DE','italy':'IT','portugal':'PT', + 'united kingdom':'GB','united states':'US','canada':'CA','australia':'AU', + 'new zealand':'NZ','ireland':'IE','netherlands':'NL','belgium':'BE', + 'sweden':'SE','norway':'NO','denmark':'DK','finland':'FI','poland':'PL', + 'czech republic':'CZ','czechia':'CZ','austria':'AT','switzerland':'CH', + 'russia':'RU','ukraine':'UA','turkey':'TR','greece':'GR','hungary':'HU', + 'romania':'RO','serbia':'RS','croatia':'HR','slovakia':'SK','slovenia':'SI', + 'bulgaria':'BG','albania':'AL','bosnia and herzegovina':'BA', + 'north macedonia':'MK','moldova':'MD','belarus':'BY','estonia':'EE', + 'latvia':'LV','lithuania':'LT','iceland':'IS','luxembourg':'LU', + 'malta':'MT','cyprus':'CY','mexico':'MX','argentina':'AR','brazil':'BR', + 'colombia':'CO','chile':'CL','peru':'PE','venezuela':'VE','ecuador':'EC', + 'bolivia':'BO','paraguay':'PY','uruguay':'UY','cuba':'CU', + 'costa rica':'CR','panama':'PA','honduras':'HN','guatemala':'GT', + 'el salvador':'SV','nicaragua':'NI','dominican republic':'DO', + 'puerto rico':'PR','japan':'JP','china':'CN','south korea':'KR', + 'india':'IN','pakistan':'PK','indonesia':'ID','malaysia':'MY', + 'thailand':'TH','vietnam':'VN','philippines':'PH','singapore':'SG', + 'bangladesh':'BD','iran':'IR','iraq':'IQ','saudi arabia':'SA', + 'israel':'IL','egypt':'EG','south africa':'ZA','nigeria':'NG', + 'kenya':'KE','morocco':'MA','algeria':'DZ','tunisia':'TN', + 'ethiopia':'ET','ghana':'GH','tanzania':'TZ','senegal':'SN', + 'united arab emirates':'AE','qatar':'QA','kuwait':'KW','jordan':'JO', + 'lebanon':'LB','syria':'SY','afghanistan':'AF','nepal':'NP', + 'sri lanka':'LK','myanmar':'MM','cambodia':'KH','taiwan':'TW', + 'hong kong':'HK','ukraine':'UA', +}; + +function countryFlag(rawCountry) { + if (!rawCountry) return ''; + const code = COUNTRY_ISO[rawCountry.toLowerCase().trim()]; + if (!code) return ''; + return String.fromCodePoint(...[...code].map(c => 0x1F1E6 + c.charCodeAt(0) - 65)); +} + +// ─── Country → phenotype lookup ───────────────────────────────────── + +function resolveCountry(rawCountry) { + if (!rawCountry || typeof rawCountry !== 'string') return null; + const s = rawCountry.trim().toLowerCase(); + if (PHENOCHECK.countryLookup[s]) return s; + if (PHENOCHECK.aliases[s]) return PHENOCHECK.aliases[s]; + // Try substring against known country names + for (const country of Object.keys(PHENOCHECK.countryLookup)) { + if (s.includes(country)) return country; + } + return null; +} + +function pickPhenotype(phenos, handle) { + if (!phenos || !phenos.length) return null; + let hash = 0; + for (let i = 0; i < handle.length; i++) hash = ((hash << 5) - hash + handle.charCodeAt(i)) | 0; + return phenos[Math.abs(hash) % phenos.length]; +} + +function pickGender(handle) { + let hash = 0; + for (let i = 0; i < handle.length; i++) hash = ((hash << 3) + handle.charCodeAt(i) * 31) | 0; + return Math.abs(hash) % 2 === 0 ? 'm' : 'f'; +} + +let _allPhenos = null; +function randomPheno() { + if (!_allPhenos) { + _allPhenos = []; + for (const list of Object.values(PHENOCHECK.countryLookup)) _allPhenos.push(...list); + } + return _allPhenos[Math.floor(Math.random() * _allPhenos.length)]; +} + +// ─── Button ───────────────────────────────────────────────────────── + +const SKULL_SVG = ``; + +function createButton() { + const el = document.createElement('div'); + el.id = 'phenocheck-btn'; + el.setAttribute('role', 'button'); + el.setAttribute('tabindex', '0'); + el.setAttribute('aria-label', 'Phenocheck'); + + const inner = document.createElement('div'); + inner.className = 'phenocheck-inner'; + inner.innerHTML = SKULL_SVG + 'Phenocheck'; + el.appendChild(inner); + + inner.addEventListener('mouseenter', () => { if (!PC.enabled) inner.style.background = 'rgba(120,86,255,0.1)'; }); + inner.addEventListener('mouseleave', () => { if (!PC.enabled) inner.style.background = ''; }); + + el.addEventListener('click', toggleEnabled); + el.addEventListener('keydown', e => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); toggleEnabled(); } }); + return el; +} + +function injectButton() { + if (document.getElementById('phenocheck-btn')) return; + const homeLink = document.querySelector('[data-testid="AppTabBar_Home_Link"]'); + if (!homeLink) return; + const nav = homeLink.closest('nav'); + if (!nav) return; + + const btn = createButton(); + const chatLink = nav.querySelector('[data-testid="AppTabBar_DirectMessage_Link"]'); + if (chatLink) { + nav.insertBefore(btn, chatLink); + } else { + const grokLink = nav.querySelector('a[href="/i/grok"], a[aria-label="Grok"]'); + if (grokLink) nav.insertBefore(btn, grokLink); + else nav.appendChild(btn); + } +} + +function startButtonObserver() { + if (PC.btnObserver) return; + PC.btnObserver = new MutationObserver(injectButton); + PC.btnObserver.observe(document.body, { childList: true, subtree: true }); + injectButton(); +} + +// ─── Toggle ───────────────────────────────────────────────────────── + +function toggleEnabled() { + PC.enabled = !PC.enabled; + const inner = document.querySelector('#phenocheck-btn .phenocheck-inner'); + if (inner) { + inner.style.color = PC.enabled ? '#7856FF' : ''; + inner.style.background = PC.enabled ? 'rgba(120,86,255,0.1)' : ''; + } + if (PC.enabled) { + processAllVisibleTweets(); + startTweetObserver(); + } else { + stopTweetObserver(); + removeAllBadges(); + } +} + +// ─── Handle extraction ────────────────────────────────────────────── + +function getTweetHandle(article) { + // Prefer the author handle from User-Name block (handles quote tweets correctly) + const nameBlock = article.querySelector('[data-testid="User-Name"]'); + if (nameBlock) { + for (const a of nameBlock.querySelectorAll('a[href^="/"][role="link"]')) { + const m = a.getAttribute('href')?.match(/^\/([A-Za-z0-9_]+)$/); + if (m && !isReserved(m[1])) return m[1]; + } + } + for (const a of article.querySelectorAll('a[href^="/"][role="link"]')) { + const m = a.getAttribute('href')?.match(/^\/([A-Za-z0-9_]+)$/); + if (m && !isReserved(m[1])) return m[1]; + } + return null; +} + +function isReserved(h) { + return ['home', 'explore', 'notifications', 'messages', 'search', 'i', 'settings', 'compose'].includes(h.toLowerCase()); +} + +// ─── Tweet processing ─────────────────────────────────────────────── + +async function processTweet(article) { + if (!PC.enabled) return; + if (article.dataset.phenocheck === 'pending' || article.dataset.phenocheck === 'done') return; + if (article.querySelector('.phenocheck-badge') && article.dataset.phenocheck === 'done') return; + + const handle = getTweetHandle(article); + if (!handle) return; + + const key = handle.toLowerCase(); + article.dataset.phenocheck = 'pending'; + + let entry = PC.cache[key]; + if (entry === undefined) { + const resp = await fetchBasedIn(handle); + if (!PC.enabled) { delete article.dataset.phenocheck; return; } + + if (!resp || resp.status === 'unavailable') { + // Rate-limited / network error: show placeholder, allow later retry + injectResidence(article, '?'); + if (article.querySelector('.phenocheck-badge')) return; + const badge = buildUnavailableBadge(); + injectBadge(article, badge); + delete article.dataset.phenocheck; // retry on next pass + return; + } + + const country = resolveCountry(resp.country); + const phenos = country ? PHENOCHECK.countryLookup[country] : null; + entry = { rawCountry: resp.country, country, phenos }; + PC.cache[key] = entry; + } + + if (!PC.enabled) { delete article.dataset.phenocheck; return; } + injectResidence(article, residenceLabel(entry)); + if (article.querySelector('.phenocheck-badge')) { article.dataset.phenocheck = 'done'; return; } + const badge = buildBadge(handle, entry); + injectBadge(article, badge); + article.dataset.phenocheck = 'done'; +} + +// Text "Reside en: " placed right after the tweet date. +function residenceLabel(entry) { + if (entry.rawCountry) return entry.rawCountry; + if (entry.country) return entry.country.charAt(0).toUpperCase() + entry.country.slice(1); + return '?'; +} + +function injectResidence(article, label) { + if (!label) return; + const nameBlock = article.querySelector('[data-testid="User-Name"]'); + if (!nameBlock) return; + let span = nameBlock.querySelector('.pc-residence'); + const flag = countryFlag(label); + const text = 'Reside en: ' + label + (flag ? ' ' + flag : ''); + if (span) { span.textContent = text; return; } + span = document.createElement('span'); + span.className = 'pc-residence'; + span.textContent = text; + + const timeEl = nameBlock.querySelector('time'); + if (timeEl) { + // Normal feed tweet: insert right after the date link + const anchor = timeEl.closest('a') || timeEl.parentElement; + if (anchor?.parentElement) { + anchor.parentElement.insertBefore(span, anchor.nextSibling); + return; + } + } + // Detail view: no inline time — append at end of the last flex row in User-Name + const rows = nameBlock.querySelectorAll(':scope > div'); + const lastRow = rows[rows.length - 1] || nameBlock; + lastRow.appendChild(span); +} + +function fetchBasedIn(handle) { + return new Promise((resolve) => { + try { + chrome.runtime.sendMessage({ type: 'FETCH_BASED_IN', handle }, (resp) => { + if (chrome.runtime.lastError) { resolve({ status: 'unavailable' }); return; } + resolve(resp ?? { status: 'unavailable' }); + }); + } catch { + resolve({ status: 'unavailable' }); + } + }); +} + +// ─── Badge ────────────────────────────────────────────────────────── + +function buildBadge(handle, { rawCountry, country, phenos }) { + // Per-handle override takes priority + const override = HANDLE_OVERRIDES[handle.toLowerCase()]; + if (override) { + return buildOverrideBadge(override, rawCountry, country); + } + + // No recognized phenotype data → treat as unavailable placeholder + if (!phenos || phenos.length === 0) { + return buildUnavailableBadge(rawCountry); + } + + const wrap = document.createElement('div'); + wrap.className = 'phenocheck-badge'; + + const pheno = pickPhenotype(phenos, handle); + const gender = pickGender(handle); + const imgSrc = PC.IMG_BASE + pheno.img + gender + '.jpg'; + const imgAlt = PC.IMG_BASE + pheno.img + (gender === 'm' ? 'f' : 'm') + '.jpg'; + const locLabel = country ? country.charAt(0).toUpperCase() + country.slice(1) : ''; + + wrap.innerHTML = ` + ${pheno.name} +
${pheno.name}
+
+ ${pheno.name} + ${pheno.name} + ${locLabel ? `${locLabel}` : ''} +
+ `; + + const thumb = wrap.querySelector('img.pc-thumb'); + if (thumb) thumb.onerror = () => { thumb.src = imgAlt; thumb.onerror = null; }; + + wrap.addEventListener('mouseenter', () => positionTooltip(wrap)); + return wrap; +} + +function buildOverrideBadge({ imgSrc, name }, rawCountry, country) { + const wrap = document.createElement('div'); + wrap.className = 'phenocheck-badge'; + const locLabel = country ? country.charAt(0).toUpperCase() + country.slice(1) : (rawCountry || ''); + wrap.innerHTML = ` + ${name} +
${name}
+
+ ${name} + ${name} + ${locLabel ? `${locLabel}` : ''} +
+ `; + wrap.addEventListener('mouseenter', () => positionTooltip(wrap)); + return wrap; +} + +function buildUnavailableBadge(rawCountry) { + const wrap = document.createElement('div'); + wrap.className = 'phenocheck-badge pc-unavailable'; + + const pheno = randomPheno(); + const gender = Math.random() < 0.5 ? 'm' : 'f'; + const imgSrc = PC.IMG_BASE + pheno.img + gender + '.jpg'; + + wrap.innerHTML = ` +
+ Unavailable +
?
+
+
Unavailable
+ `; + if (rawCountry) wrap.title = rawCountry; + return wrap; +} + +function positionTooltip(badge) { + const tip = badge.querySelector('.pc-tooltip'); + if (!tip) return; + const r = badge.getBoundingClientRect(); + tip.style.left = (r.right + 8) + 'px'; + tip.style.top = Math.max(4, r.top - 20) + 'px'; +} + +const BADGE_TOTAL_H = 62; // approx: 44px thumb + name + padding + +function isDetailViewTweet(article) { + const avatar = article.querySelector('[data-testid="Tweet-User-Avatar"]'); + if (!avatar) return false; + const mainRow = avatar.parentElement?.parentElement; + if (!mainRow) return false; + const rightCol = mainRow.children[1]; + const tweetText = article.querySelector('[data-testid="tweetText"]'); + // Detail view: mainRow is very short (just avatar+username row) AND text is NOT inside rightCol + return mainRow.offsetHeight < 60 && !rightCol?.contains(tweetText); +} + +function injectBadge(article, badge) { + const avatar = article.querySelector('[data-testid="Tweet-User-Avatar"]'); + if (avatar) { + const leftCol = avatar.parentElement; + const mainRow = leftCol.parentElement; + + if (isDetailViewTweet(article)) { + // Detail/focused tweet: text is full-width below the avatar row. + // Place badge as small overlay on bottom-right of avatar to avoid overlapping text. + badge.classList.add('pc-detail'); + avatar.appendChild(badge); + return; + } + + // Normal feed tweet: badge goes below avatar in leftCol (same stacking context as thread line). + const avatarH = avatar.offsetHeight; + badge.style.top = (avatarH + 4) + 'px'; + leftCol.appendChild(badge); + + // Ensure leftCol (and thus the article) is tall enough so overflow:hidden on article doesn't clip the badge. + const neededH = avatarH + 4 + BADGE_TOTAL_H; + if (leftCol.offsetHeight < neededH) { + leftCol.style.minHeight = neededH + 'px'; + } + return; + } + article.style.position = 'relative'; + badge.classList.add('pc-corner'); + article.appendChild(badge); +} + +function processAllVisibleTweets() { + document.querySelectorAll('article[data-testid="tweet"]').forEach(a => processTweet(a)); +} + +function removeAllBadges() { + document.querySelectorAll('.phenocheck-badge').forEach(el => el.remove()); + document.querySelectorAll('.pc-residence').forEach(el => el.remove()); + // Remove minHeight injected on leftCols for short tweets + document.querySelectorAll('article[data-testid="tweet"] [data-testid="Tweet-User-Avatar"]').forEach(avatar => { + if (avatar.parentElement) avatar.parentElement.style.minHeight = ''; + }); + document.querySelectorAll('article[data-phenocheck]').forEach(a => delete a.dataset.phenocheck); +} + +// ─── Tweet observer ───────────────────────────────────────────────── + +function startTweetObserver() { + if (PC.observer) return; + PC.observer = new MutationObserver(mutations => { + if (!PC.enabled) return; + for (const m of mutations) { + for (const node of m.addedNodes) { + if (node.nodeType !== 1) continue; + if (node.matches?.('article[data-testid="tweet"]')) processTweet(node); + else node.querySelectorAll?.('article[data-testid="tweet"]').forEach(a => processTweet(a)); + } + } + }); + PC.observer.observe(document.body, { childList: true, subtree: true }); +} + +function stopTweetObserver() { + PC.observer?.disconnect(); + PC.observer = null; +} + +// ─── Init ─────────────────────────────────────────────────────────── + +if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', startButtonObserver); +} else { + startButtonObserver(); +} + +let lastPath = location.pathname; +new MutationObserver(() => { + if (location.pathname !== lastPath) { + lastPath = location.pathname; + setTimeout(injectButton, 800); + } +}).observe(document.body, { childList: true, subtree: true }); diff --git a/data/data.js b/data/data.js new file mode 100644 index 0000000..2b0bf4b --- /dev/null +++ b/data/data.js @@ -0,0 +1,2019 @@ +// Auto-generated from humanphenotypes.net data +const PHENOCHECK = { + countryLookup: { + "spain": [ + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + }, + { + "name": "Alpinid", + "img": "alpinid", + "base": "alpinid" + }, + { + "name": "Orientalid", + "img": "orientalid", + "base": "orientalid" + } + ], + "france": [ + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + }, + { + "name": "Alpinid", + "img": "alpinid", + "base": "alpinid" + }, + { + "name": "Orientalid", + "img": "orientalid", + "base": "orientalid" + }, + { + "name": "Dinarid", + "img": "dinarid", + "base": "dinarid" + } + ], + "germany": [ + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + }, + { + "name": "Alpinid", + "img": "alpinid", + "base": "alpinid" + }, + { + "name": "Dinarid", + "img": "dinarid", + "base": "dinarid" + } + ], + "united kingdom": [ + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + }, + { + "name": "Alpinid", + "img": "alpinid", + "base": "alpinid" + }, + { + "name": "Nordid", + "img": "nordid", + "base": "nordid" + } + ], + "uk": [ + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + }, + { + "name": "Alpinid", + "img": "alpinid", + "base": "alpinid" + }, + { + "name": "Nordid", + "img": "nordid", + "base": "nordid" + } + ], + "england": [ + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + }, + { + "name": "Alpinid", + "img": "alpinid", + "base": "alpinid" + }, + { + "name": "Nordid", + "img": "nordid", + "base": "nordid" + } + ], + "italy": [ + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + }, + { + "name": "Alpinid", + "img": "alpinid", + "base": "alpinid" + }, + { + "name": "Dinarid", + "img": "dinarid", + "base": "dinarid" + }, + { + "name": "Orientalid", + "img": "orientalid", + "base": "orientalid" + } + ], + "portugal": [ + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + } + ], + "spain and portugal": [ + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + }, + { + "name": "Alpinid", + "img": "alpinid", + "base": "alpinid" + }, + { + "name": "Orientalid", + "img": "orientalid", + "base": "orientalid" + } + ], + "netherlands": [ + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + }, + { + "name": "Alpinid", + "img": "alpinid", + "base": "alpinid" + }, + { + "name": "Dinarid", + "img": "dinarid", + "base": "dinarid" + } + ], + "belgium": [ + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + }, + { + "name": "Alpinid", + "img": "alpinid", + "base": "alpinid" + }, + { + "name": "Dinarid", + "img": "dinarid", + "base": "dinarid" + } + ], + "switzerland": [ + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + }, + { + "name": "Alpinid", + "img": "alpinid", + "base": "alpinid" + }, + { + "name": "Dinarid", + "img": "dinarid", + "base": "dinarid" + } + ], + "austria": [ + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + }, + { + "name": "Alpinid", + "img": "alpinid", + "base": "alpinid" + }, + { + "name": "Dinarid", + "img": "dinarid", + "base": "dinarid" + }, + { + "name": "Armenoid", + "img": "armenoid", + "base": "armenoid" + }, + { + "name": "East Europid", + "img": "easteuropid", + "base": "easteuropid" + } + ], + "sweden": [ + { + "name": "Nordid", + "img": "nordid", + "base": "nordid" + }, + { + "name": "East Europid", + "img": "easteuropid", + "base": "easteuropid" + }, + { + "name": "Alpinid", + "img": "alpinid", + "base": "alpinid" + }, + { + "name": "Dinarid", + "img": "dinarid", + "base": "dinarid" + } + ], + "norway": [ + { + "name": "Nordid", + "img": "nordid", + "base": "nordid" + }, + { + "name": "Alpinid", + "img": "alpinid", + "base": "alpinid" + }, + { + "name": "East Europid", + "img": "easteuropid", + "base": "easteuropid" + }, + { + "name": "Dinarid", + "img": "dinarid", + "base": "dinarid" + } + ], + "denmark": [ + { + "name": "Alpinid", + "img": "alpinid", + "base": "alpinid" + }, + { + "name": "East Europid", + "img": "easteuropid", + "base": "easteuropid" + }, + { + "name": "Dinarid", + "img": "dinarid", + "base": "dinarid" + }, + { + "name": "Nordid", + "img": "nordid", + "base": "nordid" + } + ], + "finland": [ + { + "name": "East Europid", + "img": "easteuropid", + "base": "easteuropid" + }, + { + "name": "Dinarid", + "img": "dinarid", + "base": "dinarid" + }, + { + "name": "Turanid", + "img": "turanid", + "base": "turanid" + }, + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + }, + { + "name": "Nordid", + "img": "nordid", + "base": "nordid" + }, + { + "name": "Alpinid", + "img": "alpinid", + "base": "alpinid" + } + ], + "poland": [ + { + "name": "Alpinid", + "img": "alpinid", + "base": "alpinid" + }, + { + "name": "East Europid", + "img": "easteuropid", + "base": "easteuropid" + }, + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + }, + { + "name": "Dinarid", + "img": "dinarid", + "base": "dinarid" + } + ], + "czech republic": [ + { + "name": "Alpinid", + "img": "alpinid", + "base": "alpinid" + }, + { + "name": "East Europid", + "img": "easteuropid", + "base": "easteuropid" + }, + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + }, + { + "name": "Dinarid", + "img": "dinarid", + "base": "dinarid" + } + ], + "czechia": [ + { + "name": "Alpinid", + "img": "alpinid", + "base": "alpinid" + }, + { + "name": "East Europid", + "img": "easteuropid", + "base": "easteuropid" + }, + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + }, + { + "name": "Dinarid", + "img": "dinarid", + "base": "dinarid" + } + ], + "hungary": [ + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + }, + { + "name": "Dinarid", + "img": "dinarid", + "base": "dinarid" + }, + { + "name": "Armenoid", + "img": "armenoid", + "base": "armenoid" + }, + { + "name": "East Europid", + "img": "easteuropid", + "base": "easteuropid" + } + ], + "romania": [ + { + "name": "Armenoid", + "img": "armenoid", + "base": "armenoid" + }, + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + }, + { + "name": "Alpinid", + "img": "alpinid", + "base": "alpinid" + } + ], + "ukraine": [ + { + "name": "Armenoid", + "img": "armenoid", + "base": "armenoid" + }, + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + }, + { + "name": "Alpinid", + "img": "alpinid", + "base": "alpinid" + }, + { + "name": "Orientalid", + "img": "orientalid", + "base": "orientalid" + } + ], + "russia": [ + { + "name": "East Europid", + "img": "easteuropid", + "base": "easteuropid" + }, + { + "name": "Armenoid", + "img": "armenoid", + "base": "armenoid" + }, + { + "name": "Turanid", + "img": "turanid", + "base": "turanid" + }, + { + "name": "Dinarid", + "img": "dinarid", + "base": "dinarid" + }, + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + }, + { + "name": "Tungid", + "img": "tungid", + "base": "tungid" + }, + { + "name": "Sibirid", + "img": "sibirid", + "base": "sibirid" + } + ], + "greece": [ + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + }, + { + "name": "Orientalid", + "img": "orientalid", + "base": "orientalid" + }, + { + "name": "Dinarid", + "img": "dinarid", + "base": "dinarid" + }, + { + "name": "Armenoid", + "img": "armenoid", + "base": "armenoid" + }, + { + "name": "East Europid", + "img": "easteuropid", + "base": "easteuropid" + }, + { + "name": "Ethiopid", + "img": "ethiopid", + "base": "ethiopid" + } + ], + "turkey": [ + { + "name": "Armenoid", + "img": "armenoid", + "base": "armenoid" + }, + { + "name": "Orientalid", + "img": "orientalid", + "base": "orientalid" + }, + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + }, + { + "name": "Alpinid", + "img": "alpinid", + "base": "alpinid" + } + ], + "serbia": [ + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + }, + { + "name": "Dinarid", + "img": "dinarid", + "base": "dinarid" + }, + { + "name": "Armenoid", + "img": "armenoid", + "base": "armenoid" + }, + { + "name": "East Europid", + "img": "easteuropid", + "base": "easteuropid" + } + ], + "croatia": [ + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + }, + { + "name": "Dinarid", + "img": "dinarid", + "base": "dinarid" + }, + { + "name": "Armenoid", + "img": "armenoid", + "base": "armenoid" + }, + { + "name": "East Europid", + "img": "easteuropid", + "base": "easteuropid" + }, + { + "name": "Alpinid", + "img": "alpinid", + "base": "alpinid" + } + ], + "slovakia": [ + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + }, + { + "name": "Dinarid", + "img": "dinarid", + "base": "dinarid" + }, + { + "name": "Armenoid", + "img": "armenoid", + "base": "armenoid" + }, + { + "name": "East Europid", + "img": "easteuropid", + "base": "easteuropid" + }, + { + "name": "Alpinid", + "img": "alpinid", + "base": "alpinid" + } + ], + "bulgaria": [ + { + "name": "Armenoid", + "img": "armenoid", + "base": "armenoid" + }, + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + }, + { + "name": "Alpinid", + "img": "alpinid", + "base": "alpinid" + } + ], + "usa": [ + { + "name": "Pacifid", + "img": "pacifid", + "base": "pacifid" + }, + { + "name": "Margid", + "img": "margid", + "base": "margid" + }, + { + "name": "Silvid", + "img": "silvid", + "base": "silvid" + }, + { + "name": "Centralid", + "img": "centralid", + "base": "centralid" + } + ], + "united states": [ + { + "name": "Pacifid", + "img": "pacifid", + "base": "pacifid" + }, + { + "name": "Margid", + "img": "margid", + "base": "margid" + }, + { + "name": "Silvid", + "img": "silvid", + "base": "silvid" + }, + { + "name": "Centralid", + "img": "centralid", + "base": "centralid" + } + ], + "canada": [ + { + "name": "Silvid", + "img": "silvid", + "base": "silvid" + }, + { + "name": "Centralid", + "img": "centralid", + "base": "centralid" + } + ], + "mexico": [ + { + "name": "Margid", + "img": "margid", + "base": "margid" + }, + { + "name": "Centralid", + "img": "centralid", + "base": "centralid" + } + ], + "brazil": [ + { + "name": "Amazonid", + "img": "amazonid", + "base": "amazonid" + }, + { + "name": "Lagid", + "img": "lagid", + "base": "lagid" + } + ], + "argentina": [ + { + "name": "Andid", + "img": "andid", + "base": "andid" + }, + { + "name": "Patagonid", + "img": "patagonid", + "base": "patagonid" + }, + { + "name": "Lagid", + "img": "lagid", + "base": "lagid" + }, + { + "name": "Amazonid", + "img": "amazonid", + "base": "amazonid" + } + ], + "colombia": [ + { + "name": "Centralid", + "img": "centralid", + "base": "centralid" + }, + { + "name": "Amazonid", + "img": "amazonid", + "base": "amazonid" + }, + { + "name": "Andid", + "img": "andid", + "base": "andid" + } + ], + "venezuela": [ + { + "name": "Centralid", + "img": "centralid", + "base": "centralid" + }, + { + "name": "Amazonid", + "img": "amazonid", + "base": "amazonid" + } + ], + "chile": [ + { + "name": "Andid", + "img": "andid", + "base": "andid" + } + ], + "peru": [ + { + "name": "Andid", + "img": "andid", + "base": "andid" + }, + { + "name": "Centralid", + "img": "centralid", + "base": "centralid" + }, + { + "name": "Amazonid", + "img": "amazonid", + "base": "amazonid" + } + ], + "nigeria": [ + { + "name": "Sudanid", + "img": "sudanid", + "base": "sudanid" + }, + { + "name": "Congolid", + "img": "congolid", + "base": "congolid" + }, + { + "name": "Ethiopid", + "img": "ethiopid", + "base": "ethiopid" + } + ], + "south africa": [ + { + "name": "Bantuid", + "img": "bantuid", + "base": "bantuid" + }, + { + "name": "Khoid", + "img": "khoid", + "base": "khoid" + }, + { + "name": "Sanid", + "img": "sanid", + "base": "sanid" + } + ], + "kenya": [ + { + "name": "Bantuid", + "img": "bantuid", + "base": "bantuid" + }, + { + "name": "Ethiopid", + "img": "ethiopid", + "base": "ethiopid" + }, + { + "name": "Khoid", + "img": "khoid", + "base": "khoid" + }, + { + "name": "Congolid", + "img": "congolid", + "base": "congolid" + }, + { + "name": "Bambutid", + "img": "bambutid", + "base": "bambutid" + } + ], + "ethiopia": [ + { + "name": "Ethiopid", + "img": "ethiopid", + "base": "ethiopid" + }, + { + "name": "Orientalid", + "img": "orientalid", + "base": "orientalid" + }, + { + "name": "Bantuid", + "img": "bantuid", + "base": "bantuid" + } + ], + "ghana": [ + { + "name": "Sudanid", + "img": "sudanid", + "base": "sudanid" + }, + { + "name": "Congolid", + "img": "congolid", + "base": "congolid" + } + ], + "egypt": [ + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + }, + { + "name": "Orientalid", + "img": "orientalid", + "base": "orientalid" + }, + { + "name": "Ethiopid", + "img": "ethiopid", + "base": "ethiopid" + } + ], + "morocco": [ + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + }, + { + "name": "Ethiopid", + "img": "ethiopid", + "base": "ethiopid" + }, + { + "name": "Orientalid", + "img": "orientalid", + "base": "orientalid" + }, + { + "name": "Sudanid", + "img": "sudanid", + "base": "sudanid" + } + ], + "algeria": [ + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + }, + { + "name": "Alpinid", + "img": "alpinid", + "base": "alpinid" + }, + { + "name": "Orientalid", + "img": "orientalid", + "base": "orientalid" + }, + { + "name": "Ethiopid", + "img": "ethiopid", + "base": "ethiopid" + }, + { + "name": "Sudanid", + "img": "sudanid", + "base": "sudanid" + } + ], + "tunisia": [ + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + }, + { + "name": "Alpinid", + "img": "alpinid", + "base": "alpinid" + }, + { + "name": "Orientalid", + "img": "orientalid", + "base": "orientalid" + }, + { + "name": "Ethiopid", + "img": "ethiopid", + "base": "ethiopid" + }, + { + "name": "Sudanid", + "img": "sudanid", + "base": "sudanid" + } + ], + "india": [ + { + "name": "Indid", + "img": "indid", + "base": "indid" + }, + { + "name": "Indo-Melanid", + "img": "indomelanid", + "base": "indomelanid" + }, + { + "name": "Veddid", + "img": "veddid", + "base": "veddid" + }, + { + "name": "South Mongolid", + "img": "southmongolid", + "base": "southmongolid" + } + ], + "pakistan": [ + { + "name": "Indid", + "img": "indid", + "base": "indid" + }, + { + "name": "Orientalid", + "img": "orientalid", + "base": "orientalid" + }, + { + "name": "Veddid", + "img": "veddid", + "base": "veddid" + }, + { + "name": "Turanid", + "img": "turanid", + "base": "turanid" + }, + { + "name": "Indo-Melanid", + "img": "indomelanid", + "base": "indomelanid" + }, + { + "name": "South Mongolid", + "img": "southmongolid", + "base": "southmongolid" + } + ], + "bangladesh": [ + { + "name": "South Mongolid", + "img": "southmongolid", + "base": "southmongolid" + }, + { + "name": "Sinid", + "img": "sinid", + "base": "sinid" + }, + { + "name": "Veddid", + "img": "veddid", + "base": "veddid" + }, + { + "name": "Indid", + "img": "indid", + "base": "indid" + } + ], + "sri lanka": [ + { + "name": "Indid", + "img": "indid", + "base": "indid" + }, + { + "name": "Indo-Melanid", + "img": "indomelanid", + "base": "indomelanid" + }, + { + "name": "Veddid", + "img": "veddid", + "base": "veddid" + } + ], + "china": [ + { + "name": "Sinid", + "img": "sinid", + "base": "sinid" + }, + { + "name": "South Mongolid", + "img": "southmongolid", + "base": "southmongolid" + }, + { + "name": "Tungid", + "img": "tungid", + "base": "tungid" + }, + { + "name": "Polynesid", + "img": "polynesid", + "base": "polynesid" + }, + { + "name": "Negritid", + "img": "negritid", + "base": "negritid" + } + ], + "japan": [ + { + "name": "Polynesid", + "img": "polynesid", + "base": "polynesid" + }, + { + "name": "South Mongolid", + "img": "southmongolid", + "base": "southmongolid" + }, + { + "name": "Melanesid", + "img": "melanesid", + "base": "melanesid" + } + ], + "north korea": [ + { + "name": "South Mongolid", + "img": "southmongolid", + "base": "southmongolid" + }, + { + "name": "Sinid", + "img": "sinid", + "base": "sinid" + }, + { + "name": "Tungid", + "img": "tungid", + "base": "tungid" + } + ], + "taiwan": [ + { + "name": "South Mongolid", + "img": "southmongolid", + "base": "southmongolid" + }, + { + "name": "Negritid", + "img": "negritid", + "base": "negritid" + } + ], + "vietnam": [ + { + "name": "South Mongolid", + "img": "southmongolid", + "base": "southmongolid" + }, + { + "name": "Sinid", + "img": "sinid", + "base": "sinid" + }, + { + "name": "Veddid", + "img": "veddid", + "base": "veddid" + }, + { + "name": "Indid", + "img": "indid", + "base": "indid" + } + ], + "thailand": [ + { + "name": "South Mongolid", + "img": "southmongolid", + "base": "southmongolid" + }, + { + "name": "Veddid", + "img": "veddid", + "base": "veddid" + }, + { + "name": "Sinid", + "img": "sinid", + "base": "sinid" + }, + { + "name": "Indid", + "img": "indid", + "base": "indid" + } + ], + "indonesia": [ + { + "name": "South Mongolid", + "img": "southmongolid", + "base": "southmongolid" + }, + { + "name": "Veddid", + "img": "veddid", + "base": "veddid" + } + ], + "malaysia": [ + { + "name": "South Mongolid", + "img": "southmongolid", + "base": "southmongolid" + }, + { + "name": "Veddid", + "img": "veddid", + "base": "veddid" + }, + { + "name": "Negritid", + "img": "negritid", + "base": "negritid" + } + ], + "philippines": [ + { + "name": "South Mongolid", + "img": "southmongolid", + "base": "southmongolid" + }, + { + "name": "Negritid", + "img": "negritid", + "base": "negritid" + } + ], + "australia": [ + { + "name": "Australid", + "img": "australid", + "base": "australid" + } + ], + "saudi arabia": [ + { + "name": "Orientalid", + "img": "orientalid", + "base": "orientalid" + }, + { + "name": "Armenoid", + "img": "armenoid", + "base": "armenoid" + }, + { + "name": "Ethiopid", + "img": "ethiopid", + "base": "ethiopid" + }, + { + "name": "Veddid", + "img": "veddid", + "base": "veddid" + } + ], + "iran": [ + { + "name": "Orientalid", + "img": "orientalid", + "base": "orientalid" + }, + { + "name": "Armenoid", + "img": "armenoid", + "base": "armenoid" + }, + { + "name": "Turanid", + "img": "turanid", + "base": "turanid" + } + ], + "iraq": [ + { + "name": "Orientalid", + "img": "orientalid", + "base": "orientalid" + }, + { + "name": "Armenoid", + "img": "armenoid", + "base": "armenoid" + } + ], + "israel": [ + { + "name": "Orientalid", + "img": "orientalid", + "base": "orientalid" + } + ], + "palestine": [ + { + "name": "Orientalid", + "img": "orientalid", + "base": "orientalid" + } + ], + "jordan": [ + { + "name": "Orientalid", + "img": "orientalid", + "base": "orientalid" + } + ], + "lebanon": [ + { + "name": "Orientalid", + "img": "orientalid", + "base": "orientalid" + } + ], + "syria": [ + { + "name": "Orientalid", + "img": "orientalid", + "base": "orientalid" + }, + { + "name": "Armenoid", + "img": "armenoid", + "base": "armenoid" + } + ], + "afghanistan": [ + { + "name": "Indid", + "img": "indid", + "base": "indid" + }, + { + "name": "Orientalid", + "img": "orientalid", + "base": "orientalid" + }, + { + "name": "Veddid", + "img": "veddid", + "base": "veddid" + }, + { + "name": "Turanid", + "img": "turanid", + "base": "turanid" + } + ], + "singapore": [ + { + "name": "South Mongolid", + "img": "southmongolid", + "base": "southmongolid" + }, + { + "name": "Veddid", + "img": "veddid", + "base": "veddid" + }, + { + "name": "Negritid", + "img": "negritid", + "base": "negritid" + } + ], + "hong kong": [ + { + "name": "South Mongolid", + "img": "southmongolid", + "base": "southmongolid" + }, + { + "name": "Negritid", + "img": "negritid", + "base": "negritid" + } + ], + "europe": [ + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + }, + { + "name": "Alpinid", + "img": "alpinid", + "base": "alpinid" + }, + { + "name": "Dinarid", + "img": "dinarid", + "base": "dinarid" + }, + { + "name": "Armenoid", + "img": "armenoid", + "base": "armenoid" + }, + { + "name": "East Europid", + "img": "easteuropid", + "base": "easteuropid" + }, + { + "name": "Turanid", + "img": "turanid", + "base": "turanid" + } + ], + "latin america": [ + { + "name": "Margid", + "img": "margid", + "base": "margid" + }, + { + "name": "Centralid", + "img": "centralid", + "base": "centralid" + }, + { + "name": "Amazonid", + "img": "amazonid", + "base": "amazonid" + }, + { + "name": "Andid", + "img": "andid", + "base": "andid" + }, + { + "name": "Patagonid", + "img": "patagonid", + "base": "patagonid" + }, + { + "name": "Lagid", + "img": "lagid", + "base": "lagid" + } + ], + "south america": [ + { + "name": "Amazonid", + "img": "amazonid", + "base": "amazonid" + }, + { + "name": "Lagid", + "img": "lagid", + "base": "lagid" + }, + { + "name": "Patagonid", + "img": "patagonid", + "base": "patagonid" + }, + { + "name": "Andid", + "img": "andid", + "base": "andid" + }, + { + "name": "Centralid", + "img": "centralid", + "base": "centralid" + } + ], + "africa": [ + { + "name": "Sudanid", + "img": "sudanid", + "base": "sudanid" + }, + { + "name": "Congolid", + "img": "congolid", + "base": "congolid" + }, + { + "name": "Bambutid", + "img": "bambutid", + "base": "bambutid" + }, + { + "name": "Bantuid", + "img": "bantuid", + "base": "bantuid" + }, + { + "name": "Ethiopid", + "img": "ethiopid", + "base": "ethiopid" + }, + { + "name": "Orientalid", + "img": "orientalid", + "base": "orientalid" + }, + { + "name": "Mediterranid", + "img": "mediterranid", + "base": "mediterranid" + } + ], + "middle east": [ + { + "name": "Orientalid", + "img": "orientalid", + "base": "orientalid" + }, + { + "name": "Armenoid", + "img": "armenoid", + "base": "armenoid" + }, + { + "name": "Ethiopid", + "img": "ethiopid", + "base": "ethiopid" + }, + { + "name": "Veddid", + "img": "veddid", + "base": "veddid" + }, + { + "name": "Turanid", + "img": "turanid", + "base": "turanid" + } + ], + "southeast asia": [ + { + "name": "South Mongolid", + "img": "southmongolid", + "base": "southmongolid" + }, + { + "name": "Veddid", + "img": "veddid", + "base": "veddid" + }, + { + "name": "Negritid", + "img": "negritid", + "base": "negritid" + }, + { + "name": "Sinid", + "img": "sinid", + "base": "sinid" + }, + { + "name": "Indid", + "img": "indid", + "base": "indid" + } + ], + "east asia": [ + { + "name": "South Mongolid", + "img": "southmongolid", + "base": "southmongolid" + }, + { + "name": "Sinid", + "img": "sinid", + "base": "sinid" + }, + { + "name": "Tungid", + "img": "tungid", + "base": "tungid" + } + ], + "south asia": [ + { + "name": "Indid", + "img": "indid", + "base": "indid" + }, + { + "name": "Indo-Melanid", + "img": "indomelanid", + "base": "indomelanid" + }, + { + "name": "Veddid", + "img": "veddid", + "base": "veddid" + }, + { + "name": "South Mongolid", + "img": "southmongolid", + "base": "southmongolid" + }, + { + "name": "Sinid", + "img": "sinid", + "base": "sinid" + } + ], + "south korea": [ + { + "name": "Sinid", + "img": "sinid", + "base": "sinid" + }, + { + "name": "South Mongolid", + "img": "southmongolid", + "base": "southmongolidm" + } + ], + "korea": [ + { + "name": "Sinid", + "img": "sinid", + "base": "sinid" + }, + { + "name": "South Mongolid", + "img": "southmongolid", + "base": "southmongolidm" + } + ], + "new zealand": [ + { + "name": "Polynesid", + "img": "polynesid", + "base": "polynesid" + }, + { + "name": "Australid", + "img": "australid", + "base": "australid" + } + ] +}, + + cityToCountry: { + "madrid": "spain", + "barcelona": "spain", + "valencia": "spain", + "sevilla": "spain", + "seville": "spain", + "bilbao": "spain", + "málaga": "spain", + "malaga": "spain", + "zaragoza": "spain", + "murcia": "spain", + "palma": "spain", + "paris": "france", + "lyon": "france", + "marseille": "france", + "toulouse": "france", + "bordeaux": "france", + "nice": "france", + "nantes": "france", + "strasbourg": "france", + "berlin": "germany", + "munich": "germany", + "münchen": "germany", + "hamburg": "germany", + "frankfurt": "germany", + "cologne": "germany", + "köln": "germany", + "stuttgart": "germany", + "düsseldorf": "germany", + "dortmund": "germany", + "london": "united kingdom", + "manchester": "united kingdom", + "birmingham": "united kingdom", + "leeds": "united kingdom", + "glasgow": "united kingdom", + "edinburgh": "united kingdom", + "liverpool": "united kingdom", + "sheffield": "united kingdom", + "bristol": "united kingdom", + "rome": "italy", + "roma": "italy", + "milan": "italy", + "milano": "italy", + "naples": "italy", + "napoli": "italy", + "turin": "italy", + "torino": "italy", + "palermo": "italy", + "florence": "italy", + "firenze": "italy", + "new york": "usa", + "los angeles": "usa", + "chicago": "usa", + "houston": "usa", + "phoenix": "usa", + "philadelphia": "usa", + "san antonio": "usa", + "san diego": "usa", + "dallas": "usa", + "san jose": "usa", + "austin": "usa", + "seattle": "usa", + "boston": "usa", + "nashville": "usa", + "miami": "usa", + "denver": "usa", + "atlanta": "usa", + "washington": "usa", + "las vegas": "usa", + "detroit": "usa", + "portland": "usa", + "memphis": "usa", + "louisville": "usa", + "baltimore": "usa", + "toronto": "canada", + "montreal": "canada", + "vancouver": "canada", + "calgary": "canada", + "ottawa": "canada", + "edmonton": "canada", + "winnipeg": "canada", + "moscow": "russia", + "москва": "russia", + "saint petersburg": "russia", + "novosibirsk": "russia", + "yekaterinburg": "russia", + "kazan": "russia", + "beijing": "china", + "shanghai": "china", + "shenzhen": "china", + "guangzhou": "china", + "chengdu": "china", + "hangzhou": "china", + "wuhan": "china", + "xi'an": "china", + "tokyo": "japan", + "osaka": "japan", + "kyoto": "japan", + "fukuoka": "japan", + "sapporo": "japan", + "yokohama": "japan", + "nagoya": "japan", + "mumbai": "india", + "delhi": "india", + "bangalore": "india", + "bengaluru": "india", + "hyderabad": "india", + "chennai": "india", + "kolkata": "india", + "pune": "india", + "são paulo": "brazil", + "sao paulo": "brazil", + "rio de janeiro": "brazil", + "brasília": "brazil", + "brasilia": "brazil", + "salvador": "brazil", + "fortaleza": "brazil", + "curitiba": "brazil", + "manaus": "brazil", + "recife": "brazil", + "mexico city": "mexico", + "ciudad de méxico": "mexico", + "guadalajara": "mexico", + "monterrey": "mexico", + "puebla": "mexico", + "tijuana": "mexico", + "buenos aires": "argentina", + "córdoba": "argentina", + "rosario": "argentina", + "mendoza": "argentina", + "istanbul": "turkey", + "ankara": "turkey", + "izmir": "turkey", + "amsterdam": "netherlands", + "rotterdam": "netherlands", + "the hague": "netherlands", + "seoul": "south korea", + "busan": "south korea", + "incheon": "south korea", + "sydney": "australia", + "melbourne": "australia", + "brisbane": "australia", + "perth": "australia", + "adelaide": "australia", + "cairo": "egypt", + "alexandria": "egypt", + "القاهرة": "egypt", + "lagos": "nigeria", + "abuja": "nigeria", + "ibadan": "nigeria", + "kano": "nigeria", + "johannesburg": "south africa", + "cape town": "south africa", + "durban": "south africa", + "riyadh": "saudi arabia", + "jeddah": "saudi arabia", + "mecca": "saudi arabia", + "الرياض": "saudi arabia", + "dubai": "united arab emirates", + "abu dhabi": "united arab emirates", + "tehran": "iran", + "mashhad": "iran", + "karachi": "pakistan", + "lahore": "pakistan", + "islamabad": "pakistan", + "jakarta": "indonesia", + "surabaya": "indonesia", + "bandung": "indonesia", + "manila": "philippines", + "quezon city": "philippines", + "davao": "philippines", + "hanoi": "vietnam", + "ho chi minh": "vietnam", + "hcmc": "vietnam", + "bangkok": "thailand", + "chiang mai": "thailand", + "bogotá": "colombia", + "bogota": "colombia", + "medellín": "colombia", + "medellin": "colombia", + "caracas": "venezuela", + "santiago": "chile", + "lima": "peru", + "kyiv": "ukraine", + "kiev": "ukraine", + "kharkiv": "ukraine", + "odessa": "ukraine", + "warsaw": "poland", + "kraków": "poland", + "krakow": "poland", + "gdansk": "poland", + "bucharest": "romania", + "cluj": "romania", + "budapest": "hungary", + "athens": "greece", + "thessaloniki": "greece", + "lisbon": "portugal", + "porto": "portugal", + "lisboa": "portugal", + "stockholm": "sweden", + "gothenburg": "sweden", + "göteborg": "sweden", + "malmö": "sweden", + "oslo": "norway", + "bergen": "norway", + "copenhagen": "denmark", + "København": "denmark", + "helsinki": "finland", + "vienna": "austria", + "wien": "austria", + "zurich": "switzerland", + "zürich": "switzerland", + "geneva": "switzerland", + "tel aviv": "israel", + "jerusalem": "israel", + "brussels": "belgium", + "bruxelles": "belgium", + "antwerp": "belgium", + "casablanca": "morocco", + "rabat": "morocco", + "marrakech": "morocco", + "algiers": "algeria", + "tunis": "tunisia", + "nairobi": "kenya", + "addis ababa": "ethiopia", + "dhaka": "bangladesh", + "colombo": "sri lanka", + "taipei": "taiwan", + "kuala lumpur": "malaysia", + "kl": "malaysia", + "singapore": "singapore", + "hong kong": "hong kong" +}, + + aliases: { + "españa": "spain", + "espana": "spain", + "alemania": "germany", + "deutschland": "germany", + "france": "france", + "frankreich": "france", + "estados unidos": "usa", + "eeuu": "usa", + "ee.uu.": "usa", + "us": "usa", + "états-unis": "usa", + "etats-unis": "usa", + "united states of america": "usa", + "america": "usa", + "reino unido": "united kingdom", + "gran bretaña": "united kingdom", + "great britain": "united kingdom", + "britain": "united kingdom", + "england": "united kingdom", + "scotland": "united kingdom", + "wales": "united kingdom", + "northern ireland": "united kingdom", + "italia": "italy", + "italie": "italy", + "japón": "japan", + "japon": "japan", + "日本": "japan", + "中国": "china", + "中華人民共和國": "china", + "prc": "china", + "rpc": "china", + "россия": "russia", + "rf": "russia", + "brasil": "brazil", + "argentine": "argentina", + "mexique": "mexico", + "méjico": "mexico", + "países bajos": "netherlands", + "holanda": "netherlands", + "holland": "netherlands", + "suiza": "switzerland", + "schweiz": "switzerland", + "suisse": "switzerland", + "suecia": "sweden", + "sverige": "sweden", + "noruega": "norway", + "norge": "norway", + "dinamarca": "denmark", + "danmark": "denmark", + "finlandia": "finland", + "suomi": "finland", + "polonia": "poland", + "polska": "poland", + "rumanía": "romania", + "rumänien": "romania", + "hungría": "hungary", + "magyarország": "hungary", + "grecia": "greece", + "hellas": "greece", + "ellada": "greece", + "turquía": "turkey", + "türkiye": "turkey", + "croacia": "croatia", + "hrvatska": "croatia", + "belgica": "belgium", + "belgique": "belgium", + "maroc": "morocco", + "marruecos": "morocco", + "india": "india", + "भारत": "india", + "corea del sur": "south korea", + "한국": "south korea", + "대한민국": "south korea", + "corea": "south korea", + "australia": "australia", + "canada": "canada", + "uae": "united arab emirates", + "emiratos": "united arab emirates", + "emiratos árabes": "united arab emirates", + "uk": "united kingdom", + "gb": "united kingdom", + "usa": "usa", + "iran": "iran", + "irán": "iran", + "persia": "iran", + "iraq": "iraq", + "irak": "iraq", + "israel": "israel", + "siria": "syria", + "syrie": "syria", + "jordania": "jordan", + "líbano": "lebanon", + "liban": "lebanon", + "afganistán": "afghanistan", + "pakistán": "pakistan", + "bangladesh": "bangladesh", + "nigeria": "nigeria", + "kenia": "kenya", + "etiopía": "ethiopia", + "ghana": "ghana", + "sudáfrica": "south africa", + "s. africa": "south africa", + "south africa": "south africa", + "argelia": "algeria", + "túnez": "tunisia", + "egipto": "egypt", + "مصر": "egypt", + "vietnam": "vietnam", + "tailandia": "thailand", + "indonesia": "indonesia", + "filipinas": "philippines", + "malasia": "malaysia", + "singapur": "singapore", + "hong kong": "hong kong", + "taipei": "taiwan", + "taiwan": "taiwan", + "taiwán": "taiwan", + "colombia": "colombia", + "venezuela": "venezuela", + "chile": "chile", + "perú": "peru", + "argentina": "argentina", + "bolivia": "bolivia", + "ecuador": "ecuador", + "paraguay": "paraguay", + "uruguay": "uruguay", + "cuba": "cuba", + "puerto rico": "usa", + "república dominicana": "dominican republic", + "ucrania": "ukraine", + "україна": "ukraine", + "eslovaquia": "slovakia", + "eslovenia": "slovenia", + "serbia": "serbia", + "austria": "austria", + "portugal": "portugal", + "bélgica": "belgium" +} +}; diff --git a/images/icons/skull128.png b/images/icons/skull128.png new file mode 100644 index 0000000..a886e48 Binary files /dev/null and b/images/icons/skull128.png differ diff --git a/images/icons/skull16.png b/images/icons/skull16.png new file mode 100644 index 0000000..f978d9f Binary files /dev/null and b/images/icons/skull16.png differ diff --git a/images/icons/skull48.png b/images/icons/skull48.png new file mode 100644 index 0000000..7824d6c Binary files /dev/null and b/images/icons/skull48.png differ diff --git a/images/phenotypes/ainuidf.jpg b/images/phenotypes/ainuidf.jpg new file mode 100644 index 0000000..8ebb1ba Binary files /dev/null and b/images/phenotypes/ainuidf.jpg differ diff --git a/images/phenotypes/ainuidm.jpg b/images/phenotypes/ainuidm.jpg new file mode 100644 index 0000000..9fbff6b Binary files /dev/null and b/images/phenotypes/ainuidm.jpg differ diff --git a/images/phenotypes/ainuids_thumb.jpg b/images/phenotypes/ainuids_thumb.jpg new file mode 100644 index 0000000..8b95417 Binary files /dev/null and b/images/phenotypes/ainuids_thumb.jpg differ diff --git a/images/phenotypes/alpinidf.jpg b/images/phenotypes/alpinidf.jpg new file mode 100644 index 0000000..f0d8dec Binary files /dev/null and b/images/phenotypes/alpinidf.jpg differ diff --git a/images/phenotypes/alpinidm.jpg b/images/phenotypes/alpinidm.jpg new file mode 100644 index 0000000..fbf84ff Binary files /dev/null and b/images/phenotypes/alpinidm.jpg differ diff --git a/images/phenotypes/alpinids_thumb.jpg b/images/phenotypes/alpinids_thumb.jpg new file mode 100644 index 0000000..8d7978c Binary files /dev/null and b/images/phenotypes/alpinids_thumb.jpg differ diff --git a/images/phenotypes/amazonidf.jpg b/images/phenotypes/amazonidf.jpg new file mode 100644 index 0000000..808fcc0 Binary files /dev/null and b/images/phenotypes/amazonidf.jpg differ diff --git a/images/phenotypes/amazonidm.jpg b/images/phenotypes/amazonidm.jpg new file mode 100644 index 0000000..8c205c7 Binary files /dev/null and b/images/phenotypes/amazonidm.jpg differ diff --git a/images/phenotypes/amazonids_thumb.jpg b/images/phenotypes/amazonids_thumb.jpg new file mode 100644 index 0000000..cf23a65 Binary files /dev/null and b/images/phenotypes/amazonids_thumb.jpg differ diff --git a/images/phenotypes/andidf.jpg b/images/phenotypes/andidf.jpg new file mode 100644 index 0000000..87b2e56 Binary files /dev/null and b/images/phenotypes/andidf.jpg differ diff --git a/images/phenotypes/andidm.jpg b/images/phenotypes/andidm.jpg new file mode 100644 index 0000000..bf5bd0b Binary files /dev/null and b/images/phenotypes/andidm.jpg differ diff --git a/images/phenotypes/andids_thumb.jpg b/images/phenotypes/andids_thumb.jpg new file mode 100644 index 0000000..afca9b5 Binary files /dev/null and b/images/phenotypes/andids_thumb.jpg differ diff --git a/images/phenotypes/armenoidf.jpg b/images/phenotypes/armenoidf.jpg new file mode 100644 index 0000000..32c1afa Binary files /dev/null and b/images/phenotypes/armenoidf.jpg differ diff --git a/images/phenotypes/armenoidm.jpg b/images/phenotypes/armenoidm.jpg new file mode 100644 index 0000000..dd0ff52 Binary files /dev/null and b/images/phenotypes/armenoidm.jpg differ diff --git a/images/phenotypes/armenoids_thumb.jpg b/images/phenotypes/armenoids_thumb.jpg new file mode 100644 index 0000000..cd5dec3 Binary files /dev/null and b/images/phenotypes/armenoids_thumb.jpg differ diff --git a/images/phenotypes/australidf.jpg b/images/phenotypes/australidf.jpg new file mode 100644 index 0000000..75c3831 Binary files /dev/null and b/images/phenotypes/australidf.jpg differ diff --git a/images/phenotypes/australidm.jpg b/images/phenotypes/australidm.jpg new file mode 100644 index 0000000..91de6c5 Binary files /dev/null and b/images/phenotypes/australidm.jpg differ diff --git a/images/phenotypes/australids_thumb.jpg b/images/phenotypes/australids_thumb.jpg new file mode 100644 index 0000000..a1dd92f Binary files /dev/null and b/images/phenotypes/australids_thumb.jpg differ diff --git a/images/phenotypes/bambutidf.jpg b/images/phenotypes/bambutidf.jpg new file mode 100644 index 0000000..d5b2156 Binary files /dev/null and b/images/phenotypes/bambutidf.jpg differ diff --git a/images/phenotypes/bambutidm.jpg b/images/phenotypes/bambutidm.jpg new file mode 100644 index 0000000..5720352 Binary files /dev/null and b/images/phenotypes/bambutidm.jpg differ diff --git a/images/phenotypes/bambutids_thumb.jpg b/images/phenotypes/bambutids_thumb.jpg new file mode 100644 index 0000000..0ab42fc Binary files /dev/null and b/images/phenotypes/bambutids_thumb.jpg differ diff --git a/images/phenotypes/bantuidf.jpg b/images/phenotypes/bantuidf.jpg new file mode 100644 index 0000000..fa5000f Binary files /dev/null and b/images/phenotypes/bantuidf.jpg differ diff --git a/images/phenotypes/bantuidm.jpg b/images/phenotypes/bantuidm.jpg new file mode 100644 index 0000000..a5ced1b Binary files /dev/null and b/images/phenotypes/bantuidm.jpg differ diff --git a/images/phenotypes/bantuids_thumb.jpg b/images/phenotypes/bantuids_thumb.jpg new file mode 100644 index 0000000..7218108 Binary files /dev/null and b/images/phenotypes/bantuids_thumb.jpg differ diff --git a/images/phenotypes/centralidf.jpg b/images/phenotypes/centralidf.jpg new file mode 100644 index 0000000..98d7919 Binary files /dev/null and b/images/phenotypes/centralidf.jpg differ diff --git a/images/phenotypes/centralidm.jpg b/images/phenotypes/centralidm.jpg new file mode 100644 index 0000000..d4544c1 Binary files /dev/null and b/images/phenotypes/centralidm.jpg differ diff --git a/images/phenotypes/centralids_thumb.jpg b/images/phenotypes/centralids_thumb.jpg new file mode 100644 index 0000000..8347371 Binary files /dev/null and b/images/phenotypes/centralids_thumb.jpg differ diff --git a/images/phenotypes/congolidf.jpg b/images/phenotypes/congolidf.jpg new file mode 100644 index 0000000..6942709 Binary files /dev/null and b/images/phenotypes/congolidf.jpg differ diff --git a/images/phenotypes/congolidm.jpg b/images/phenotypes/congolidm.jpg new file mode 100644 index 0000000..a5011c3 Binary files /dev/null and b/images/phenotypes/congolidm.jpg differ diff --git a/images/phenotypes/congolids_thumb.jpg b/images/phenotypes/congolids_thumb.jpg new file mode 100644 index 0000000..fd5388d Binary files /dev/null and b/images/phenotypes/congolids_thumb.jpg differ diff --git a/images/phenotypes/custom/cobardeeres10.png b/images/phenotypes/custom/cobardeeres10.png new file mode 100644 index 0000000..33d16d5 Binary files /dev/null and b/images/phenotypes/custom/cobardeeres10.png differ diff --git a/images/phenotypes/dinaridf.jpg b/images/phenotypes/dinaridf.jpg new file mode 100644 index 0000000..8bce4a5 Binary files /dev/null and b/images/phenotypes/dinaridf.jpg differ diff --git a/images/phenotypes/dinaridm.jpg b/images/phenotypes/dinaridm.jpg new file mode 100644 index 0000000..d55b0db Binary files /dev/null and b/images/phenotypes/dinaridm.jpg differ diff --git a/images/phenotypes/dinarids_thumb.jpg b/images/phenotypes/dinarids_thumb.jpg new file mode 100644 index 0000000..53bd2fe Binary files /dev/null and b/images/phenotypes/dinarids_thumb.jpg differ diff --git a/images/phenotypes/easteuropidf.jpg b/images/phenotypes/easteuropidf.jpg new file mode 100644 index 0000000..09245a8 Binary files /dev/null and b/images/phenotypes/easteuropidf.jpg differ diff --git a/images/phenotypes/easteuropidm.jpg b/images/phenotypes/easteuropidm.jpg new file mode 100644 index 0000000..6467b11 Binary files /dev/null and b/images/phenotypes/easteuropidm.jpg differ diff --git a/images/phenotypes/easteuropids_thumb.jpg b/images/phenotypes/easteuropids_thumb.jpg new file mode 100644 index 0000000..eaab4b9 Binary files /dev/null and b/images/phenotypes/easteuropids_thumb.jpg differ diff --git a/images/phenotypes/eskimidf.jpg b/images/phenotypes/eskimidf.jpg new file mode 100644 index 0000000..e71a863 Binary files /dev/null and b/images/phenotypes/eskimidf.jpg differ diff --git a/images/phenotypes/eskimidm.jpg b/images/phenotypes/eskimidm.jpg new file mode 100644 index 0000000..e5d36ed Binary files /dev/null and b/images/phenotypes/eskimidm.jpg differ diff --git a/images/phenotypes/eskimids_thumb.jpg b/images/phenotypes/eskimids_thumb.jpg new file mode 100644 index 0000000..010d15c Binary files /dev/null and b/images/phenotypes/eskimids_thumb.jpg differ diff --git a/images/phenotypes/ethiopidf.jpg b/images/phenotypes/ethiopidf.jpg new file mode 100644 index 0000000..8836cfe Binary files /dev/null and b/images/phenotypes/ethiopidf.jpg differ diff --git a/images/phenotypes/ethiopidm.jpg b/images/phenotypes/ethiopidm.jpg new file mode 100644 index 0000000..66efb08 Binary files /dev/null and b/images/phenotypes/ethiopidm.jpg differ diff --git a/images/phenotypes/ethiopids_thumb.jpg b/images/phenotypes/ethiopids_thumb.jpg new file mode 100644 index 0000000..c69f068 Binary files /dev/null and b/images/phenotypes/ethiopids_thumb.jpg differ diff --git a/images/phenotypes/indidf.jpg b/images/phenotypes/indidf.jpg new file mode 100644 index 0000000..8056f98 Binary files /dev/null and b/images/phenotypes/indidf.jpg differ diff --git a/images/phenotypes/indidm.jpg b/images/phenotypes/indidm.jpg new file mode 100644 index 0000000..5e1d3e3 Binary files /dev/null and b/images/phenotypes/indidm.jpg differ diff --git a/images/phenotypes/indids_thumb.jpg b/images/phenotypes/indids_thumb.jpg new file mode 100644 index 0000000..dc03cd8 Binary files /dev/null and b/images/phenotypes/indids_thumb.jpg differ diff --git a/images/phenotypes/indomelanidf.jpg b/images/phenotypes/indomelanidf.jpg new file mode 100644 index 0000000..6acc52c Binary files /dev/null and b/images/phenotypes/indomelanidf.jpg differ diff --git a/images/phenotypes/indomelanidm.jpg b/images/phenotypes/indomelanidm.jpg new file mode 100644 index 0000000..759d4cc Binary files /dev/null and b/images/phenotypes/indomelanidm.jpg differ diff --git a/images/phenotypes/indomelanids_thumb.jpg b/images/phenotypes/indomelanids_thumb.jpg new file mode 100644 index 0000000..423e96b Binary files /dev/null and b/images/phenotypes/indomelanids_thumb.jpg differ diff --git a/images/phenotypes/khoidf.jpg b/images/phenotypes/khoidf.jpg new file mode 100644 index 0000000..c4c87b1 Binary files /dev/null and b/images/phenotypes/khoidf.jpg differ diff --git a/images/phenotypes/khoidm.jpg b/images/phenotypes/khoidm.jpg new file mode 100644 index 0000000..751c793 Binary files /dev/null and b/images/phenotypes/khoidm.jpg differ diff --git a/images/phenotypes/khoids_thumb.jpg b/images/phenotypes/khoids_thumb.jpg new file mode 100644 index 0000000..b6330af Binary files /dev/null and b/images/phenotypes/khoids_thumb.jpg differ diff --git a/images/phenotypes/lagidf.jpg b/images/phenotypes/lagidf.jpg new file mode 100644 index 0000000..e8be0b8 Binary files /dev/null and b/images/phenotypes/lagidf.jpg differ diff --git a/images/phenotypes/lagidm.jpg b/images/phenotypes/lagidm.jpg new file mode 100644 index 0000000..3f682df Binary files /dev/null and b/images/phenotypes/lagidm.jpg differ diff --git a/images/phenotypes/lagids_thumb.jpg b/images/phenotypes/lagids_thumb.jpg new file mode 100644 index 0000000..a700c9f Binary files /dev/null and b/images/phenotypes/lagids_thumb.jpg differ diff --git a/images/phenotypes/lappidf.jpg b/images/phenotypes/lappidf.jpg new file mode 100644 index 0000000..615239a Binary files /dev/null and b/images/phenotypes/lappidf.jpg differ diff --git a/images/phenotypes/lappidm.jpg b/images/phenotypes/lappidm.jpg new file mode 100644 index 0000000..1ea0253 Binary files /dev/null and b/images/phenotypes/lappidm.jpg differ diff --git a/images/phenotypes/lappids_thumb.jpg b/images/phenotypes/lappids_thumb.jpg new file mode 100644 index 0000000..dc567b7 Binary files /dev/null and b/images/phenotypes/lappids_thumb.jpg differ diff --git a/images/phenotypes/margidf.jpg b/images/phenotypes/margidf.jpg new file mode 100644 index 0000000..fe5e0cd Binary files /dev/null and b/images/phenotypes/margidf.jpg differ diff --git a/images/phenotypes/margidm.jpg b/images/phenotypes/margidm.jpg new file mode 100644 index 0000000..76d619b Binary files /dev/null and b/images/phenotypes/margidm.jpg differ diff --git a/images/phenotypes/margids_thumb.jpg b/images/phenotypes/margids_thumb.jpg new file mode 100644 index 0000000..bf13e5d Binary files /dev/null and b/images/phenotypes/margids_thumb.jpg differ diff --git a/images/phenotypes/mediterranidf.jpg b/images/phenotypes/mediterranidf.jpg new file mode 100644 index 0000000..2f73b87 Binary files /dev/null and b/images/phenotypes/mediterranidf.jpg differ diff --git a/images/phenotypes/mediterranidm.jpg b/images/phenotypes/mediterranidm.jpg new file mode 100644 index 0000000..19c542b Binary files /dev/null and b/images/phenotypes/mediterranidm.jpg differ diff --git a/images/phenotypes/mediterranids_thumb.jpg b/images/phenotypes/mediterranids_thumb.jpg new file mode 100644 index 0000000..c6a93b4 Binary files /dev/null and b/images/phenotypes/mediterranids_thumb.jpg differ diff --git a/images/phenotypes/melanesidf.jpg b/images/phenotypes/melanesidf.jpg new file mode 100644 index 0000000..e37266b Binary files /dev/null and b/images/phenotypes/melanesidf.jpg differ diff --git a/images/phenotypes/melanesidm.jpg b/images/phenotypes/melanesidm.jpg new file mode 100644 index 0000000..bb8acc4 Binary files /dev/null and b/images/phenotypes/melanesidm.jpg differ diff --git a/images/phenotypes/melanesids_thumb.jpg b/images/phenotypes/melanesids_thumb.jpg new file mode 100644 index 0000000..638dd7b Binary files /dev/null and b/images/phenotypes/melanesids_thumb.jpg differ diff --git a/images/phenotypes/negritidf.jpg b/images/phenotypes/negritidf.jpg new file mode 100644 index 0000000..2cb3c54 Binary files /dev/null and b/images/phenotypes/negritidf.jpg differ diff --git a/images/phenotypes/negritidm.jpg b/images/phenotypes/negritidm.jpg new file mode 100644 index 0000000..f28053e Binary files /dev/null and b/images/phenotypes/negritidm.jpg differ diff --git a/images/phenotypes/negritids_thumb.jpg b/images/phenotypes/negritids_thumb.jpg new file mode 100644 index 0000000..de64b84 Binary files /dev/null and b/images/phenotypes/negritids_thumb.jpg differ diff --git a/images/phenotypes/nilotidf.jpg b/images/phenotypes/nilotidf.jpg new file mode 100644 index 0000000..7dfacd4 Binary files /dev/null and b/images/phenotypes/nilotidf.jpg differ diff --git a/images/phenotypes/nilotidm.jpg b/images/phenotypes/nilotidm.jpg new file mode 100644 index 0000000..9fe968d Binary files /dev/null and b/images/phenotypes/nilotidm.jpg differ diff --git a/images/phenotypes/nilotids_thumb.jpg b/images/phenotypes/nilotids_thumb.jpg new file mode 100644 index 0000000..a58721f Binary files /dev/null and b/images/phenotypes/nilotids_thumb.jpg differ diff --git a/images/phenotypes/nordidf.jpg b/images/phenotypes/nordidf.jpg new file mode 100644 index 0000000..068f668 Binary files /dev/null and b/images/phenotypes/nordidf.jpg differ diff --git a/images/phenotypes/nordidm.jpg b/images/phenotypes/nordidm.jpg new file mode 100644 index 0000000..de348ec Binary files /dev/null and b/images/phenotypes/nordidm.jpg differ diff --git a/images/phenotypes/nordids_thumb.jpg b/images/phenotypes/nordids_thumb.jpg new file mode 100644 index 0000000..63469c7 Binary files /dev/null and b/images/phenotypes/nordids_thumb.jpg differ diff --git a/images/phenotypes/orientalidf.jpg b/images/phenotypes/orientalidf.jpg new file mode 100644 index 0000000..c7ab952 Binary files /dev/null and b/images/phenotypes/orientalidf.jpg differ diff --git a/images/phenotypes/orientalidm.jpg b/images/phenotypes/orientalidm.jpg new file mode 100644 index 0000000..dfa5483 Binary files /dev/null and b/images/phenotypes/orientalidm.jpg differ diff --git a/images/phenotypes/orientalids_thumb.jpg b/images/phenotypes/orientalids_thumb.jpg new file mode 100644 index 0000000..ac06680 Binary files /dev/null and b/images/phenotypes/orientalids_thumb.jpg differ diff --git a/images/phenotypes/pacifidf.jpg b/images/phenotypes/pacifidf.jpg new file mode 100644 index 0000000..0f966e5 Binary files /dev/null and b/images/phenotypes/pacifidf.jpg differ diff --git a/images/phenotypes/pacifidm.jpg b/images/phenotypes/pacifidm.jpg new file mode 100644 index 0000000..17d5fa1 Binary files /dev/null and b/images/phenotypes/pacifidm.jpg differ diff --git a/images/phenotypes/pacifids_thumb.jpg b/images/phenotypes/pacifids_thumb.jpg new file mode 100644 index 0000000..e47783b Binary files /dev/null and b/images/phenotypes/pacifids_thumb.jpg differ diff --git a/images/phenotypes/patagonidf.jpg b/images/phenotypes/patagonidf.jpg new file mode 100644 index 0000000..8779a14 Binary files /dev/null and b/images/phenotypes/patagonidf.jpg differ diff --git a/images/phenotypes/patagonidm.jpg b/images/phenotypes/patagonidm.jpg new file mode 100644 index 0000000..940cfb9 Binary files /dev/null and b/images/phenotypes/patagonidm.jpg differ diff --git a/images/phenotypes/patagonids_thumb.jpg b/images/phenotypes/patagonids_thumb.jpg new file mode 100644 index 0000000..c5545a2 Binary files /dev/null and b/images/phenotypes/patagonids_thumb.jpg differ diff --git a/images/phenotypes/polynesidf.jpg b/images/phenotypes/polynesidf.jpg new file mode 100644 index 0000000..09b6782 Binary files /dev/null and b/images/phenotypes/polynesidf.jpg differ diff --git a/images/phenotypes/polynesidm.jpg b/images/phenotypes/polynesidm.jpg new file mode 100644 index 0000000..e483028 Binary files /dev/null and b/images/phenotypes/polynesidm.jpg differ diff --git a/images/phenotypes/polynesids_thumb.jpg b/images/phenotypes/polynesids_thumb.jpg new file mode 100644 index 0000000..3263fa9 Binary files /dev/null and b/images/phenotypes/polynesids_thumb.jpg differ diff --git a/images/phenotypes/sanidf.jpg b/images/phenotypes/sanidf.jpg new file mode 100644 index 0000000..b8869a8 Binary files /dev/null and b/images/phenotypes/sanidf.jpg differ diff --git a/images/phenotypes/sanidm.jpg b/images/phenotypes/sanidm.jpg new file mode 100644 index 0000000..92a828c Binary files /dev/null and b/images/phenotypes/sanidm.jpg differ diff --git a/images/phenotypes/sanids_thumb.jpg b/images/phenotypes/sanids_thumb.jpg new file mode 100644 index 0000000..dbad950 Binary files /dev/null and b/images/phenotypes/sanids_thumb.jpg differ diff --git a/images/phenotypes/sibiridf.jpg b/images/phenotypes/sibiridf.jpg new file mode 100644 index 0000000..f243392 Binary files /dev/null and b/images/phenotypes/sibiridf.jpg differ diff --git a/images/phenotypes/sibiridm.jpg b/images/phenotypes/sibiridm.jpg new file mode 100644 index 0000000..976b866 Binary files /dev/null and b/images/phenotypes/sibiridm.jpg differ diff --git a/images/phenotypes/sibirids_thumb.jpg b/images/phenotypes/sibirids_thumb.jpg new file mode 100644 index 0000000..16fa74b Binary files /dev/null and b/images/phenotypes/sibirids_thumb.jpg differ diff --git a/images/phenotypes/silvidf.jpg b/images/phenotypes/silvidf.jpg new file mode 100644 index 0000000..78c3854 Binary files /dev/null and b/images/phenotypes/silvidf.jpg differ diff --git a/images/phenotypes/silvidm.jpg b/images/phenotypes/silvidm.jpg new file mode 100644 index 0000000..826118d Binary files /dev/null and b/images/phenotypes/silvidm.jpg differ diff --git a/images/phenotypes/silvids_thumb.jpg b/images/phenotypes/silvids_thumb.jpg new file mode 100644 index 0000000..200e295 Binary files /dev/null and b/images/phenotypes/silvids_thumb.jpg differ diff --git a/images/phenotypes/sinidf.jpg b/images/phenotypes/sinidf.jpg new file mode 100644 index 0000000..e7c99e6 Binary files /dev/null and b/images/phenotypes/sinidf.jpg differ diff --git a/images/phenotypes/sinidm.jpg b/images/phenotypes/sinidm.jpg new file mode 100644 index 0000000..cc3f0f2 Binary files /dev/null and b/images/phenotypes/sinidm.jpg differ diff --git a/images/phenotypes/sinids_thumb.jpg b/images/phenotypes/sinids_thumb.jpg new file mode 100644 index 0000000..30bf2ee Binary files /dev/null and b/images/phenotypes/sinids_thumb.jpg differ diff --git a/images/phenotypes/southmongolidf.jpg b/images/phenotypes/southmongolidf.jpg new file mode 100644 index 0000000..2996190 Binary files /dev/null and b/images/phenotypes/southmongolidf.jpg differ diff --git a/images/phenotypes/southmongolidm.jpg b/images/phenotypes/southmongolidm.jpg new file mode 100644 index 0000000..4b98f45 Binary files /dev/null and b/images/phenotypes/southmongolidm.jpg differ diff --git a/images/phenotypes/southmongolids_thumb.jpg b/images/phenotypes/southmongolids_thumb.jpg new file mode 100644 index 0000000..63d1782 Binary files /dev/null and b/images/phenotypes/southmongolids_thumb.jpg differ diff --git a/images/phenotypes/sudanidf.jpg b/images/phenotypes/sudanidf.jpg new file mode 100644 index 0000000..638c7e1 Binary files /dev/null and b/images/phenotypes/sudanidf.jpg differ diff --git a/images/phenotypes/sudanidm.jpg b/images/phenotypes/sudanidm.jpg new file mode 100644 index 0000000..04d74f1 Binary files /dev/null and b/images/phenotypes/sudanidm.jpg differ diff --git a/images/phenotypes/sudanids_thumb.jpg b/images/phenotypes/sudanids_thumb.jpg new file mode 100644 index 0000000..630ca06 Binary files /dev/null and b/images/phenotypes/sudanids_thumb.jpg differ diff --git a/images/phenotypes/tungidf.jpg b/images/phenotypes/tungidf.jpg new file mode 100644 index 0000000..25b89e3 Binary files /dev/null and b/images/phenotypes/tungidf.jpg differ diff --git a/images/phenotypes/tungidm.jpg b/images/phenotypes/tungidm.jpg new file mode 100644 index 0000000..11ef39c Binary files /dev/null and b/images/phenotypes/tungidm.jpg differ diff --git a/images/phenotypes/tungids_thumb.jpg b/images/phenotypes/tungids_thumb.jpg new file mode 100644 index 0000000..af7f1ff Binary files /dev/null and b/images/phenotypes/tungids_thumb.jpg differ diff --git a/images/phenotypes/turanidf.jpg b/images/phenotypes/turanidf.jpg new file mode 100644 index 0000000..43c4c7d Binary files /dev/null and b/images/phenotypes/turanidf.jpg differ diff --git a/images/phenotypes/turanidm.jpg b/images/phenotypes/turanidm.jpg new file mode 100644 index 0000000..b572b25 Binary files /dev/null and b/images/phenotypes/turanidm.jpg differ diff --git a/images/phenotypes/turanids_thumb.jpg b/images/phenotypes/turanids_thumb.jpg new file mode 100644 index 0000000..011e4b5 Binary files /dev/null and b/images/phenotypes/turanids_thumb.jpg differ diff --git a/images/phenotypes/veddidf.jpg b/images/phenotypes/veddidf.jpg new file mode 100644 index 0000000..af72420 Binary files /dev/null and b/images/phenotypes/veddidf.jpg differ diff --git a/images/phenotypes/veddidm.jpg b/images/phenotypes/veddidm.jpg new file mode 100644 index 0000000..b717c1b Binary files /dev/null and b/images/phenotypes/veddidm.jpg differ diff --git a/images/phenotypes/veddids_thumb.jpg b/images/phenotypes/veddids_thumb.jpg new file mode 100644 index 0000000..82dd0ad Binary files /dev/null and b/images/phenotypes/veddids_thumb.jpg differ diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..2970bed --- /dev/null +++ b/manifest.json @@ -0,0 +1,33 @@ +{ + "manifest_version": 3, + "name": "Phenocheck", + "version": "1.0.0", + "description": "Shows estimated human phenotypes for X.com users based on their declared location", + "permissions": ["storage", "cookies"], + "host_permissions": [ + "https://x.com/*", + "https://twitter.com/*" + ], + "background": { + "service_worker": "background.js" + }, + "content_scripts": [ + { + "matches": ["https://x.com/*", "https://twitter.com/*"], + "js": ["data/data.js", "content.js"], + "css": ["content.css"], + "run_at": "document_idle" + } + ], + "web_accessible_resources": [ + { + "resources": ["images/phenotypes/*", "images/phenotypes/custom/*"], + "matches": ["https://x.com/*", "https://twitter.com/*"] + } + ], + "icons": { + "16": "images/icons/skull16.png", + "48": "images/icons/skull48.png", + "128": "images/icons/skull128.png" + } +}