"Remote" isn't a location: parsing LinkedIn job cards with Intl.DisplayNames and a few regexes
A job card says "Remote". Can someone in Serbia, Turkey or Brazil actually take it? Often not: in a hand-labelled sample of the November 2026 "Ask HN: Who is hiring?" thread, 89 of 128 remote posts (about 70%) had an exp
A job card says "Remote". Can someone in Serbia, Turkey or Brazil actually take it? Often not: in a hand-labelled sample of the November 2026 "Ask HN: Who is hiring?" thread, 89 of 128 remote posts (about 70%) had an explicit country, region, city or time-zone limit; excluding three borderline cases gives 86 of 128.
I built a Chrome extension that flags country clues on LinkedIn job cards, with no server or LLM in the rule-based country-fit check. Here's how the rule-based part works and where it breaks.
1. Find the location line
A LinkedIn card is a few lines of text: title, company, location, then noise like "Promoted" or "Easy Apply". The location line is the one with a work-mode label in parentheses:
Izmir, Turkey (On-site)
London, England, United Kingdom (Remote)
But titles can carry a label too ("PM - Monetization (Remote)"), so the order of preference is:
- a line with a work-mode label and a recognisable place;
- any labelled line after the title and company;
- any labelled line at all.
2. Country names in any language, for free
LinkedIn's UI comes in many languages. The location line can be "Milano, Italia", "Δ°stanbul, TΓΌrkiye" or "ΠΠ·ΠΌΠΈΡ, Π’ΡΡΡΠΈΡ". Hand-written country lists in 11 languages would be painful. The browser already has them:
const display = new Intl.DisplayNames(['tr'], { type: 'region', fallback: 'none' });
display.of('TR'); // "TΓΌrkiye"
display.of('DE'); // "Almanya"
Loop over every two-letter code AAβ¦ZZ, keep the names that resolve, fold case and diacritics, and you get a name β code map for the page language plus English. Two gotchas:
- skip pseudo-regions (
ZZ,UN,XAβ¦) that return generic names; - skip short names that are also normal words. In Russian, "Π’ΠΎΠ³ΠΎ" (Togo) also means "of that", and "Chad" and "Jordan" are first names in English.
const REGION_STOP = new Set(['ΡΠΎΠ³ΠΎ', 'ΡΠ°Π΄', 'ΠΌΠ°Π»ΠΈ', 'Π³Π°Π½Π°', 'chad', 'jordan', 'niger']);
3. A region word means different things for different people
"EMEA", "Europe" and "EU" aren't yes/no. They depend on where the user lives:
// 1 fits, 0.4 maybe, -1 excludes
function regionFit(group, home) {
if (group === 'world') return 1;
if (group === 'eu') return EU_CODES.includes(home) ? 1 : -1;
if (group === 'europe') return EUROPE_CODES.includes(home) ? 1
: EUROPE_FRINGE.includes(home) ? 0.4 : -1;
if (group === 'emea') return EMEA_CODES.includes(home) ? 1 : -1;
return 0;
}
For someone in Serbia, "Europe" fits and "EU only" doesn't. For Turkey, "EMEA" fits, "EU only" doesn't, and "Europe" is a maybe: employers disagree on whether it counts. That "maybe" becomes a ? Unclear badge instead of a guess.
4. Don't trust a single line
One line can say "EMEA" while another says "must be based in Germany" or "US-based only". So a positive verdict is re-checked against restriction phrases in the rest of the text (the card for badges, the full description for the quick check). If one is found and it doesn't fit the user's country, the verdict drops to "unclear" and keeps the quote.
5. Where rules fail
Being honest about this matters more than the happy path:
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.