-
Notifications
You must be signed in to change notification settings - Fork 17
/
index.html
364 lines (364 loc) · 12 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8" />
<title>Redirect Russia</title>
<link rel="icon" type="image/png" href="/img/logo.png" />
<link rel="stylesheet" href="/style.css" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta property="og:title" content="Redirect Russia" />
<meta property="og:type" content="website" />
<meta
property="og:image"
content="https://redirectrussia.org/img/banner.png"
/>
<meta property="og:url" content="https://redirectrussia.org" />
<meta name="twitter:card" content="summary_large_image" />
<meta
property="og:description"
content="Take part in the sanctions against Russia and block Russian traffic to your website."
/>
<meta property="og:site_name" content="Redirect Russia" />
<meta name="twitter:image:alt" content="Redirect Russia logo" />
<link rel="canonical" href="https://redirectrussia.org" />
</head>
<body>
<div class="hero" hidden>
<div class="container">
<h2>This site is not available in Russia.</h2>
<p>
Due to the Putin-initiated war in Ukraine, we have decided to take
part in the sanctions against Russia and have disabled our services
for visitors from Russia.
</p>
<p>
<a href="https://war.ukraine.ua">
Help end the war and support Ukraine →
</a>
</p>
</div>
<div class="container">
<h2>Этот сайт недоступен в России.</h2>
<p>
В связи с инициированной Путиным войной в Украине мы решили принять
участие в санкциях против России и отключили наши услуги для
посетителей из России.
</p>
<p>
<a href="https://war.ukraine.ua">
Помогите закончить войну и поддержите Украину →
</a>
</p>
</div>
</div>
<main class="container">
<header>
<img alt="" src="/img/logo.png" class="logo" />
<h1>Redirect Russia</h1>
<p class="lead">
Take part in the sanctions against Russia and block Russian traffic to
your website.
</p>
<p>Copy and paste this line anywhere on your site 👇</p>
</header>
<form onsubmit="return false">
<details>
<summary><span>Advanced configuration</span></summary>
<form>
<fieldset>
<legend>Where should users be redirected to?</legend>
<label>
<input type="radio" value="" name="redirect-url" checked />
<span>
Redirect Russia landing page (<a
href="https://redirectrussia.org/?from=example.com"
target="_blank"
rel="noopener noreferrer"
>example</a
>)
</span>
</label>
<label>
<input type="radio" value="other" name="redirect-url" />
<span>Custom URL</span>
</label>
<p>
We redirect your users to a landing page which tells them that
your site is unavailable in Russia and what they can do to help
Ukraine. You can also set any custom redirection URL.
</p>
</fieldset>
<label class="redirect-other other-label" hidden>
<span>Custom URL</span>
<input type="url" name="other-url" value="https://" />
</label>
<fieldset>
<legend>Location detection method</legend>
<label>
<input
type="radio"
name="detection"
value="timezone-then-ip"
checked
/>
<span>Check for timezone, then IP address</span>
</label>
<label>
<input type="radio" name="detection" value="ip-only" />
<span>Only check IP address</span>
</label>
<p>
In order to save on network requests, we only query an IP
geolocation service if the user's date/time settings are in
Russia; if you disable this, you may be rate limited by your
geolocation API service.
</p>
</fieldset>
<fieldset>
<legend>IP geolocation API</legend>
<label>
<input
type="radio"
name="geolocation"
value="https://api.country.is"
checked
/>
<span>Country.is</span>
</label>
<label>
<input type="radio" name="geolocation" value="other" />
<span>Custom endpoint</span>
</label>
<p>
By default, we use Country.is; but you can use any IP
geolocation endpoint that returns a JSON response with the
"country" property as an ISO 3166-1 alpha-2 country code.
</p>
</fieldset>
<label class="ip-api-other other-label" hidden>
<span>Custom URL</span>
<input type="url" name="other-url" value="https://" />
</label>
<fieldset>
<legend>Show domain on redirect</legend>
<label>
<input type="radio" name="domain" value="yes" checked />
<span>Yes</span>
</label>
<label>
<input type="radio" name="domain" value="no" />
<span>No</span>
</label>
<p>
If your site is example.com, the redirect page will say
"example.com is not available in Russia" if you choose to show
the domain (we'll add a <code>?from</code> query parameter in
the redirect URL). You can disable this if you don't want to
leak your domain name.
</p>
</fieldset>
</form>
</details>
<output>
<pre><code id="result"><script src="https://redirectrussia.org/v1.js" async integrity="sha384-K4/XEYup4kNv/qt2ucIwIH2wLT9I+z3s17CHQNMBB2/E8/Kw2VYsXQKB/7kylubA" crossorigin="anonymous"></script></code></pre>
</output>
</form>
<h2>How it works</h2>
<img
alt="Screenshot of redirect page"
src="https://user-images.githubusercontent.com/2841780/156524271-bb4f7edd-7c5b-48c0-8872-8ec735d70411.png"
class="screenshot"
/>
<p>
When someone from Russia visits your website, they'll be redirected to a
page that looks
<a
href="https://redirectrussia.org/?from=example.com"
target="_blank"
rel="noopener noreferrer"
>like this</a
>.
</p>
<p>
They can find information about how they can help Ukraine and make
change from within Russia.
</p>
<p>
The script is asynchronous, meaning that it shouldn't affect the page
load time, and it uses a combination of timezone and IP address
geolocation to identify traffic from Russia, so we don't make too many
IP geolocation API requests.
</p>
<h2>API</h2>
<p>
You can configure the redirect URL, location detection method, IP
geolocation API, and whether or not to add your domain to the redirect
URL using the configuration generator above.
</p>
<p>
We also emit an event <code>redirect-russia</code> which you can listen
to, for example to set up analytics:
</p>
<pre><code>document.addEventListener("redirect-russia", (event) => { /* */ })</code></pre>
<p>
The code is open source and available on
<a
href="https://github.com/pabio/redirect-russia"
target="_blank"
rel="noopener noreferrer"
>GitHub</a
>.
</p>
<h2>Who's using this?</h2>
<p class="links">
<a
target="_blank"
rel="noopener noreferrer"
href="https://redirectrussia.org"
>Redirect Russia</a
>
·
<a target="_blank" rel="noopener noreferrer" href="https://pabio.com"
>Pabio</a
>
·
<a
target="_blank"
rel="noopener noreferrer"
href="https://cleverclipstudios.com/"
>Cleverclip</a
>
·
<a
target="_blank"
rel="noopener noreferrer"
href="https://oswaldlabs.com"
>Oswald Labs</a
>
·
<a
target="_blank"
rel="noopener noreferrer"
href="https://carlobadini.com"
>Carlo Badini</a
>
·
<a
target="_blank"
rel="noopener noreferrer"
href="https://anandchowdhary.com"
>Anand Chowdhary</a
>
·
<a
target="_blank"
rel="noopener noreferrer"
href="https://sukritikapoor.com"
>Sukriti Kapoor</a
>
·
<a
target="_blank"
rel="noopener noreferrer"
href="https://chowdhary.org"
>Chowdhary.org</a
>
·
<a
target="_blank"
rel="noopener noreferrer"
href="https://karuna2020.org"
>Karuna 2020</a
>
·
<a
target="_blank"
rel="noopener noreferrer"
href="https://madewithlove.org.in"
>Made with Love in India</a
>
·
<a
target="_blank"
rel="noopener noreferrer"
href="https://naariessentials.com"
>Naari Essentials</a
>
·
<a
target="_blank"
rel="noopener noreferrer"
href="https://saarcenterprises.com"
>Saarc Enterprises</a
>
·
<a
target="_blank"
rel="noopener noreferrer"
href="https://accessibilityguidelines.com"
>Accessibility Guidelines</a
>
·
<a
target="_blank"
rel="noopener noreferrer"
href="https://www.comvation.com/"
>Comvation</a
>
·
<a
target="_blank"
rel="noopener noreferrer"
href="https://learnyouahaskell.github.io/"
>Learn You a Haskell (community version)</a
>
·
<a
target="_blank"
rel="noopener noreferrer"
href="https://obranukrajinu.sk/"
>ObráňUkrajinu.sk</a
>
·
<a
target="_blank"
rel="noopener noreferrer"
href="https://shaijyy.netlify.app/"
>Shaijyy websites</a
>
·
<a
target="_blank"
rel="noopener noreferrer"
href="https://github.com/pabio/redirect-russia/edit/main/index.html"
>You too? Add your name here</a
>
</p>
<footer>
<p>
From your friends at
<a
href="https://pabio.com/?utm_source=redirectrussia.org&utm_medium=footer-logo"
target="_blank"
rel="noopener noreferrer"
>
<img alt="Pabio" src="https://pabio.com/logo.svg" />
</a>
</p>
</footer>
</main>
<script src="site.ts"></script>
<script
async
src="https://www.googletagmanager.com/gtag/js?id=G-BCFFXV96LB"
></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());
gtag("config", "G-BCFFXV96LB");
</script>
</body>
</html>