3 ms·
Just to let you know, there's no message, and I'm visiting from a Russian IP. Disabling uBlock Origin doesn't make it show up either.
by hurflmurfl 5y ago
Just to let you know, there's no message, and I'm visiting from a Russian IP. Disabling uBlock Origin doesn't make it show up either.
- mickael-kerjean 5y agoit shows the video if /ru/.test(navigator.language)
- orbital-decay 5y agoThis method is super inaccurate, since visitors from many countries (including Ukraine) could use Russian as their preferred language. You might probably want to use IP geolocation instead.
- capableweb 5y agoNo method is perfect, obviously. But in this case you probably want to use a bunch of heuristics, placing them in a OR statement would probably get you as close as possible. - Check preferred language (won't work for Russians who prefer English, and will show for non-Russians who prefer Russians) - Check where IP is coming from (won't work for Russians on the border if public node is on other side of bordering-countries, won't work for Russians who use VPNs) - Check preferred locale (won't work for Russians who has a different preferred locale, will show for non-Russians who use Russian locale) - Finally, ask the user where they are from (worse UX, won't work for people who are lying) Using all of them gets you pretty close to "perfect" but again, nothing is 100% perfect.
- unfocussed_mike 5y agoSide note: Russian is Zelenskyy's first language.
- mickael-kerjean 5y agoDone: https://github.com/mickael-kerjean/filestash-website/blob/master/_includes/footer.html#L95-L99 https://github.com/mickael-kerjean/filestash-website/blob/ma...
- app4soft 5y agoThank You, man! I'm Ukrainian[0] and YOUR SUPPORT for Ukrainian people in such terrifying times WOULD BE NEVER FORGOTTEN by me & by all Ukrainians actually fighting just for freedom FOREVER! [0] https://news.ycombinator.com/item?id=30395897 https://news.ycombinator.com/item?id=30395897
- alam2000 5y ago