henry_flower (
henry_flower) wrote2016-08-16 08:53 am
Entry tags:
So I have a "technical" blog, that (if you trust Blogger stats data) for the past few years have bee
So I have a "technical" blog, that (if you trust Blogger stats data) for the past few years have been visited mainly by Russians (70% of the whole traffic). The "Russian" traffic is mostly organic, w/ referrals like google.ru or yandex.ru.
For the last several years I've stopped posting in Russian completely, but the Russians are still voluntary consuming the texts about FreeBSD & other outdated/unmaintained staff. What's the easiest way to make those readers feel uncomfortable? How to repel & irritate them?
Blogger doesn't provide any method for blocking the visitors for us, but we can add a bit of custom JavaScript to its templates. That JS could, for example, use freegeoip to get a country code, & inject (in a case of a match) an undismissable popup that says "Fuck you." The only downside is that uBlock origin by default blocks freegeoip.
Here's what I came up with (IE11+ & it's alreasy a dull ES5, so no transpiler is necessary): https://gitlab.com/sigwait/filter_out_morons.js/tree/master
There is only 1 function: `filter_out_morons`; if you pass `1` to it draws the centered div (see the example below) regardless of the client's country IP.
Enjoy, hehe.
http://i.imgur.com/HF6eRML.png
+1'd by:
For the last several years I've stopped posting in Russian completely, but the Russians are still voluntary consuming the texts about FreeBSD & other outdated/unmaintained staff. What's the easiest way to make those readers feel uncomfortable? How to repel & irritate them?
Blogger doesn't provide any method for blocking the visitors for us, but we can add a bit of custom JavaScript to its templates. That JS could, for example, use freegeoip to get a country code, & inject (in a case of a match) an undismissable popup that says "Fuck you." The only downside is that uBlock origin by default blocks freegeoip.
Here's what I came up with (IE11+ & it's alreasy a dull ES5, so no transpiler is necessary): https://gitlab.com/sigwait/filter_out_morons.js/tree/master
There is only 1 function: `filter_out_morons`; if you pass `1` to it draws the centered div (see the example below) regardless of the client's country IP.
Enjoy, hehe.
http://i.imgur.com/HF6eRML.png
+1'd by:
Permalink: https://plus.google.com/115290581164606462017/posts/KJ2ttCvk81M
