save-ukraine 0.18.0 β†’ 0.18.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +129 -101
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,43 +1,105 @@
1
1
  # 🟦 Stop war on Ukraine 🟨
2
2
 
3
- **As a libertarian and programmer,** I would never think that I would someday work on a piece of software that would go against free access to any service from any corner of the world.
3
+ Help Ukraine - add **ribbon with Ukraine flag** into the website you manage, show the **anti-war message to Russian users**, or **block them from your service**.
4
4
 
5
- But unfortunately, the situation has changed.
5
+ A lot of companies did this in their custom way but this library is supereasy option to do for everyone.
6
6
 
7
- Ukraine was attacked by Russia and a lot of innocent children, women and men are now dying in Kyiv and other Ukrainian cities at the hands of one cruel dictator.
7
+ ### πŸŽ—οΈ Add ribbon with Ukraine flag on your website
8
8
 
9
- **This can not be tolerated in 21. century in Europe.**
10
9
 
11
- We can not just close our eyes and just provide all services and benefits to the Russian economy which can keep killing innocent people.
10
+ ```html
11
+ <script src="https://cdn.jsdelivr.net/npm/save-ukraine@0.18.0/dist/umd/main.js"></script>
12
+ <script>
13
+ Ukraine.save({
14
+ ribbon: 'TOP_LEFT',
15
+ hasShadow: true,
16
+ countries: [],
17
+ });
18
+ </script>
19
+ ```
12
20
 
13
- **If you are managing some website, please stop it for Russia** until the war will be over and putin overthrown.
21
+ ![image](https://user-images.githubusercontent.com/23721952/157456259-c16c644d-4565-4018-b213-4d4918a05450.png)
14
22
 
15
- ---
16
23
 
17
- I don't want to punish the Russian people as a whole. As a citizen of Prague, I have few Russian friends and this definitely won't change. I believe most Russians do not support the politics of their state and especially this cruel war. But unfortunately, economic pressure is now one of the less bad solutions. And every ruble paid on taxes for the current Russian government means more money for killing innocent people.
18
24
 
19
- ---
25
+ _Or use other method of installation see below._
20
26
 
21
- I have created a simple way how to do it.
27
+ ### ❎ I want to show banner for Russian users
22
28
 
23
- For the users **from other places, nothing happens or 🟦 you can optionally place the ribbon with Ukraine flag 🟨**. The script is tiny to load and insignificant. If the visitor is from **Russia or Belarus** _(detected by system language)_ this **message will appear**:
29
+ ```html
30
+ <script src="https://cdn.jsdelivr.net/npm/save-ukraine@0.18.0/dist/umd/main.js"></script>
31
+ <script>
32
+ Ukraine.save({
33
+ isCancelable: true,
34
+ });
35
+ </script>
36
+ ```
24
37
 
25
- https://github.com/hejny/Ukraine
38
+ _Or use other method of installation see below._
26
39
 
27
- <!--Badges-->
28
- <!--⚠️WARNING: This section was generated by https://github.com/hejny/batch-project-editor/blob/main/src/workflows/800-badges/badges.ts so every manual change will be overwritten.-->
29
- <!--
30
- [![License of βœ‚οΈ Space trim](https://img.shields.io/github/license/hejny/Ukraine.svg?style=flat)](https://github.com/hejny/Ukraine/blob/main/LICENSE)
31
- [![NPM Version of βœ‚οΈ Space trim](https://badge.fury.io/js/Ukraine.svg)](https://www.npmjs.com/package/Ukraine)
32
- [![Quality of package βœ‚οΈ Space trim](https://packagequality.com/shield/Ukraine.svg)](https://packagequality.com/#?package=Ukraine)
33
- [![lint](https://github.com/hejny/Ukraine/actions/workflows/lint.yml/badge.svg)](https://github.com/hejny/Ukraine/actions/workflows/lint.yml)
34
- [![test](https://github.com/hejny/Ukraine/actions/workflows/test.yml/badge.svg)](https://github.com/hejny/Ukraine/actions/workflows/test.yml)
35
- [![Known Vulnerabilities](https://snyk.io/test/github/hejny/Ukraine/badge.svg)](https://snyk.io/test/github/hejny/Ukraine)
36
- [![Issues](https://img.shields.io/github/issues/hejny/Ukraine.svg?style=flat)](https://github.com/hejny/Ukraine/issues)
37
- -->
38
- <!--/Badges-->
40
+ ### πŸ›‘ I want to block website for Russian users
41
+
42
+ ```html
43
+ <script src="https://cdn.jsdelivr.net/npm/save-ukraine@0.18.0/dist/umd/main.js"></script>
44
+ <script>
45
+ Ukraine.save({
46
+ isCancelable: false,
47
+ });
48
+ </script>
49
+ ```
50
+
51
+ ![image](https://user-images.githubusercontent.com/23721952/157457857-05cc513e-b58c-4417-998b-bec93330d372.png)
52
+
53
+
54
+ _Or use other method of installation see below._
55
+
56
+ ### 🩸 I want to show banner for Russian users but not include cruel graphic and blood
57
+
58
+ ```html
59
+ <script src="https://cdn.jsdelivr.net/npm/save-ukraine@0.18.0/dist/umd/main.js"></script>
60
+ <script>
61
+ Ukraine.save({
62
+ isBloodIncluded: false,
63
+ isGraphicIncluded: false,
64
+ });
65
+ </script>
66
+ ```
67
+
68
+ ![image](https://user-images.githubusercontent.com/23721952/157458121-4718b34c-3efd-41fd-8f58-d06e5c5aed68.png)
69
+
70
+
71
+ _Or use other method of installation see below._
72
+
73
+ ### πŸŽ—οΈπŸŽ—οΈπŸŽ—οΈπŸŽ—οΈ I want to have ribbon in multiple corners
74
+
75
+ ```html
76
+ <script src="https://cdn.jsdelivr.net/npm/save-ukraine@0.18.0/dist/umd/main.js"></script>
77
+ <script>
78
+ Ukraine.save({
79
+ ribbon: 'TOP_LEFT',
80
+ hasShadow: true,
81
+ countries: [],
82
+ });
83
+ Ukraine.save({
84
+ ribbon: 'TOP_RIGHT',
85
+ hasShadow: false,
86
+ countries: [],
87
+ });
88
+ Ukraine.save({
89
+ ribbon: 'BOTTOM_LEFT',
90
+ hasShadow: true,
91
+ countries: [],
92
+ });
93
+ Ukraine.save({
94
+ ribbon: 'BOTTOM_RIGHT',
95
+ hasShadow: false,
96
+ countries: [],
97
+ });
98
+ </script>
99
+ ```
100
+
101
+ _Or use other method of installation see below._
39
102
 
40
- ![Blood on Ukraine](./assets/wallpaper.png)
41
103
 
42
104
  ## πŸ“² How to include on your page?
43
105
 
@@ -158,83 +220,8 @@ ReactDOM.render(
158
220
  Note: Feel free to add more methods of importing
159
221
  -->
160
222
 
161
- ## 🧩 Scenarios to use
162
223
 
163
- ### πŸŽ—οΈ I just want to add ribbon
164
-
165
- ```html
166
- <script src="https://cdn.jsdelivr.net/npm/save-ukraine@0.18.0/dist/umd/main.js"></script>
167
- <script>
168
- Ukraine.save({
169
- countries: [
170
- /* Make this list empty */
171
- ],
172
- ribbon: 'TOP_LEFT',
173
- hasShadow: true,
174
- });
175
- </script>
176
- ```
177
-
178
- _Or use other method of installation see above._
179
-
180
- ### ❎ I want that users can cancel the message
181
-
182
- ```html
183
- <script src="https://cdn.jsdelivr.net/npm/save-ukraine@0.18.0/dist/umd/main.js"></script>
184
- <script>
185
- Ukraine.save({
186
- isCancelable: true,
187
- });
188
- </script>
189
- ```
190
-
191
- _Or use other method of installation see above._
192
-
193
- ### πŸ–ΌοΈ I do not want to include cruel graphic and blood
194
-
195
- ```html
196
- <script src="https://cdn.jsdelivr.net/npm/save-ukraine@0.18.0/dist/umd/main.js"></script>
197
- <script>
198
- Ukraine.save({
199
- isBloodIncluded: false,
200
- isGraphicIncluded: false,
201
- });
202
- </script>
203
- ```
204
-
205
- _Or use other method of installation see above._
206
-
207
- ### πŸŽ—οΈπŸŽ—οΈπŸŽ—οΈπŸŽ—οΈ I want to have ribbon in multiple corners
208
-
209
- ```html
210
- <script src="https://cdn.jsdelivr.net/npm/save-ukraine@0.18.0/dist/umd/main.js"></script>
211
- <script>
212
- Ukraine.save({
213
- ribbon: 'TOP_LEFT',
214
- hasShadow: true,
215
- countries: [],
216
- });
217
- Ukraine.save({
218
- ribbon: 'TOP_RIGHT',
219
- hasShadow: false,
220
- countries: [],
221
- });
222
- Ukraine.save({
223
- ribbon: 'BOTTOM_LEFT',
224
- hasShadow: true,
225
- countries: [],
226
- });
227
- Ukraine.save({
228
- ribbon: 'BOTTOM_RIGHT',
229
- hasShadow: false,
230
- countries: [],
231
- });
232
- </script>
233
- ```
234
-
235
- _Or use other method of installation see above._
236
-
237
- ### πŸ›  Other customization
224
+ ## πŸ› πŸ§© Other customization
238
225
 
239
226
  You can customize what will be shown.
240
227
  Here are all the [options](./src/options.ts). If you have some idea feel free to contribute via pull request.
@@ -256,6 +243,47 @@ Ukraine.save({
256
243
 
257
244
  When you import anything _(not only this script)_ on your page, please do not trust the publisher. Verify the code and **include only the specific version** not the wildcard of every future version.
258
245
 
246
+
247
+
248
+ ## βœ‰οΈ Motivation
249
+
250
+ **As a libertarian and programmer,** I would never think that I would someday work on a piece of software that would go against free access to any service from any corner of the world.
251
+
252
+ But unfortunately, the situation has changed.
253
+
254
+ Ukraine was attacked by Russia and a lot of innocent children, women and men are now dying in Kyiv and other Ukrainian cities at the hands of one cruel dictator.
255
+
256
+ **This can not be tolerated in 21. century in Europe.**
257
+
258
+ We can not just close our eyes and just provide all services and benefits to the Russian economy which can keep killing innocent people.
259
+
260
+ **If you are managing some website, please stop it for Russia** until the war will be over and putin overthrown.
261
+
262
+ ---
263
+
264
+ I don't want to punish the Russian people as a whole. As a citizen of Prague, I have few Russian friends and this definitely won't change. I believe most Russians do not support the politics of their state and especially this cruel war. But unfortunately, economic pressure is now one of the less bad solutions. And every ruble paid on taxes for the current Russian government means more money for killing innocent people.
265
+
266
+ ---
267
+
268
+ I have created a simple way how to do it.
269
+
270
+ For the users **from other places, nothing happens or 🟦 you can optionally place the ribbon with Ukraine flag 🟨**. The script is tiny to load and insignificant. If the visitor is from **Russia or Belarus** _(detected by system language)_ this **message will appear**:
271
+
272
+
273
+ <!--Badges-->
274
+ <!--⚠️WARNING: This section was generated by https://github.com/hejny/batch-project-editor/blob/main/src/workflows/800-badges/badges.ts so every manual change will be overwritten.-->
275
+ <!--
276
+ [![License of βœ‚οΈ Space trim](https://img.shields.io/github/license/hejny/Ukraine.svg?style=flat)](https://github.com/hejny/Ukraine/blob/main/LICENSE)
277
+ [![NPM Version of βœ‚οΈ Space trim](https://badge.fury.io/js/Ukraine.svg)](https://www.npmjs.com/package/Ukraine)
278
+ [![Quality of package βœ‚οΈ Space trim](https://packagequality.com/shield/Ukraine.svg)](https://packagequality.com/#?package=Ukraine)
279
+ [![lint](https://github.com/hejny/Ukraine/actions/workflows/lint.yml/badge.svg)](https://github.com/hejny/Ukraine/actions/workflows/lint.yml)
280
+ [![test](https://github.com/hejny/Ukraine/actions/workflows/test.yml/badge.svg)](https://github.com/hejny/Ukraine/actions/workflows/test.yml)
281
+ [![Known Vulnerabilities](https://snyk.io/test/github/hejny/Ukraine/badge.svg)](https://snyk.io/test/github/hejny/Ukraine)
282
+ [![Issues](https://img.shields.io/github/issues/hejny/Ukraine.svg?style=flat)](https://github.com/hejny/Ukraine/issues)
283
+ -->
284
+ <!--/Badges-->
285
+
286
+
259
287
  ## ⁉️ FAQ
260
288
 
261
289
  Few most common things aggregated from your questions:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "save-ukraine",
3
- "version": "0.18.0",
3
+ "version": "0.18.1",
4
4
  "description": "Ban Russian users from your website; in context of Ukraine invasion",
5
5
  "sideEffects": false,
6
6
  "module": "./dist/esm/main.js",