save-ukraine 0.18.0 → 0.18.2

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 (105) hide show
  1. package/README.md +150 -109
  2. package/assets/ai/wallpaper/current +1 -0
  3. package/assets/ai/wallpaper/gallery/03e0650b-0787-4f75-96d1-3f142ad66208-0_0.json +0 -0
  4. package/assets/ai/wallpaper/gallery/03e0650b-0787-4f75-96d1-3f142ad66208-0_0.png +0 -0
  5. package/assets/ai/wallpaper/gallery/03e0650b-0787-4f75-96d1-3f142ad66208-0_1.json +0 -0
  6. package/assets/ai/wallpaper/gallery/03e0650b-0787-4f75-96d1-3f142ad66208-0_1.png +0 -0
  7. package/assets/ai/wallpaper/gallery/03e0650b-0787-4f75-96d1-3f142ad66208-0_2.json +0 -0
  8. package/assets/ai/wallpaper/gallery/03e0650b-0787-4f75-96d1-3f142ad66208-0_2.png +0 -0
  9. package/assets/ai/wallpaper/gallery/03e0650b-0787-4f75-96d1-3f142ad66208-0_3.json +0 -0
  10. package/assets/ai/wallpaper/gallery/03e0650b-0787-4f75-96d1-3f142ad66208-0_3.png +0 -0
  11. package/assets/ai/wallpaper/gallery/10c083cd-819c-4aba-aa5e-d36efb8640e8-0_0.json +0 -0
  12. package/assets/ai/wallpaper/gallery/10c083cd-819c-4aba-aa5e-d36efb8640e8-0_0.png +0 -0
  13. package/assets/ai/wallpaper/gallery/10c083cd-819c-4aba-aa5e-d36efb8640e8-0_1.json +0 -0
  14. package/assets/ai/wallpaper/gallery/10c083cd-819c-4aba-aa5e-d36efb8640e8-0_1.png +0 -0
  15. package/assets/ai/wallpaper/gallery/10c083cd-819c-4aba-aa5e-d36efb8640e8-0_2.json +0 -0
  16. package/assets/ai/wallpaper/gallery/10c083cd-819c-4aba-aa5e-d36efb8640e8-0_2.png +0 -0
  17. package/assets/ai/wallpaper/gallery/10c083cd-819c-4aba-aa5e-d36efb8640e8-0_3.json +0 -0
  18. package/assets/ai/wallpaper/gallery/10c083cd-819c-4aba-aa5e-d36efb8640e8-0_3.png +0 -0
  19. package/assets/ai/wallpaper/gallery/12ca8aac-2c9c-442c-ad2d-9f7dd13f40de-0_0.json +0 -0
  20. package/assets/ai/wallpaper/gallery/12ca8aac-2c9c-442c-ad2d-9f7dd13f40de-0_0.png +0 -0
  21. package/assets/ai/wallpaper/gallery/12ca8aac-2c9c-442c-ad2d-9f7dd13f40de-0_1.json +0 -0
  22. package/assets/ai/wallpaper/gallery/12ca8aac-2c9c-442c-ad2d-9f7dd13f40de-0_1.png +0 -0
  23. package/assets/ai/wallpaper/gallery/12ca8aac-2c9c-442c-ad2d-9f7dd13f40de-0_2.json +0 -0
  24. package/assets/ai/wallpaper/gallery/12ca8aac-2c9c-442c-ad2d-9f7dd13f40de-0_2.png +0 -0
  25. package/assets/ai/wallpaper/gallery/12ca8aac-2c9c-442c-ad2d-9f7dd13f40de-0_3.json +0 -0
  26. package/assets/ai/wallpaper/gallery/12ca8aac-2c9c-442c-ad2d-9f7dd13f40de-0_3.png +0 -0
  27. package/assets/ai/wallpaper/gallery/23d54dea-25d3-447d-815e-053a723ed622-0_0.json +0 -0
  28. package/assets/ai/wallpaper/gallery/23d54dea-25d3-447d-815e-053a723ed622-0_0.png +0 -0
  29. package/assets/ai/wallpaper/gallery/23d54dea-25d3-447d-815e-053a723ed622-0_1.json +0 -0
  30. package/assets/ai/wallpaper/gallery/23d54dea-25d3-447d-815e-053a723ed622-0_1.png +0 -0
  31. package/assets/ai/wallpaper/gallery/23d54dea-25d3-447d-815e-053a723ed622-0_2.json +0 -0
  32. package/assets/ai/wallpaper/gallery/23d54dea-25d3-447d-815e-053a723ed622-0_2.png +0 -0
  33. package/assets/ai/wallpaper/gallery/23d54dea-25d3-447d-815e-053a723ed622-0_3.json +0 -0
  34. package/assets/ai/wallpaper/gallery/23d54dea-25d3-447d-815e-053a723ed622-0_3.png +0 -0
  35. package/assets/ai/wallpaper/gallery/2712c4f8-f6c6-43ef-b14b-3b2b4f77ad81-0_0.json +0 -0
  36. package/assets/ai/wallpaper/gallery/2712c4f8-f6c6-43ef-b14b-3b2b4f77ad81-0_0.png +0 -0
  37. package/assets/ai/wallpaper/gallery/486c1b96-1485-4d05-808c-050ec6a4c074-0_0.json +0 -0
  38. package/assets/ai/wallpaper/gallery/486c1b96-1485-4d05-808c-050ec6a4c074-0_0.png +0 -0
  39. package/assets/ai/wallpaper/gallery/4d04f973-4bf7-4a8f-8b5a-05d0f9ca3c6e-0_0.json +0 -0
  40. package/assets/ai/wallpaper/gallery/4d04f973-4bf7-4a8f-8b5a-05d0f9ca3c6e-0_0.png +0 -0
  41. package/assets/ai/wallpaper/gallery/4d7522e0-d696-431c-862e-bc57b6c4c49f-0_0.json +0 -0
  42. package/assets/ai/wallpaper/gallery/4d7522e0-d696-431c-862e-bc57b6c4c49f-0_0.png +0 -0
  43. package/assets/ai/wallpaper/gallery/4d7522e0-d696-431c-862e-bc57b6c4c49f-0_1.json +0 -0
  44. package/assets/ai/wallpaper/gallery/4d7522e0-d696-431c-862e-bc57b6c4c49f-0_1.png +0 -0
  45. package/assets/ai/wallpaper/gallery/4d7522e0-d696-431c-862e-bc57b6c4c49f-0_2.json +0 -0
  46. package/assets/ai/wallpaper/gallery/4d7522e0-d696-431c-862e-bc57b6c4c49f-0_2.png +0 -0
  47. package/assets/ai/wallpaper/gallery/4d7522e0-d696-431c-862e-bc57b6c4c49f-0_3.json +0 -0
  48. package/assets/ai/wallpaper/gallery/4d7522e0-d696-431c-862e-bc57b6c4c49f-0_3.png +0 -0
  49. package/assets/ai/wallpaper/gallery/82639076-250a-4952-9575-859c1e941781-0_0.json +0 -0
  50. package/assets/ai/wallpaper/gallery/82639076-250a-4952-9575-859c1e941781-0_0.png +0 -0
  51. package/assets/ai/wallpaper/gallery/82639076-250a-4952-9575-859c1e941781-0_1.json +0 -0
  52. package/assets/ai/wallpaper/gallery/82639076-250a-4952-9575-859c1e941781-0_1.png +0 -0
  53. package/assets/ai/wallpaper/gallery/82639076-250a-4952-9575-859c1e941781-0_2.json +0 -0
  54. package/assets/ai/wallpaper/gallery/82639076-250a-4952-9575-859c1e941781-0_2.png +0 -0
  55. package/assets/ai/wallpaper/gallery/82639076-250a-4952-9575-859c1e941781-0_3.json +0 -0
  56. package/assets/ai/wallpaper/gallery/82639076-250a-4952-9575-859c1e941781-0_3.png +0 -0
  57. package/assets/ai/wallpaper/gallery/8f46555d-92b8-4167-9f94-a695c53bb9d9-0_0.json +0 -0
  58. package/assets/ai/wallpaper/gallery/8f46555d-92b8-4167-9f94-a695c53bb9d9-0_0.png +0 -0
  59. package/assets/ai/wallpaper/gallery/9f8b5fcf-65b3-4f70-a269-4254f2171b34-0_0.json +0 -0
  60. package/assets/ai/wallpaper/gallery/9f8b5fcf-65b3-4f70-a269-4254f2171b34-0_0.png +0 -0
  61. package/assets/ai/wallpaper/gallery/9f8b5fcf-65b3-4f70-a269-4254f2171b34-0_1.json +0 -0
  62. package/assets/ai/wallpaper/gallery/9f8b5fcf-65b3-4f70-a269-4254f2171b34-0_1.png +0 -0
  63. package/assets/ai/wallpaper/gallery/9f8b5fcf-65b3-4f70-a269-4254f2171b34-0_2.json +0 -0
  64. package/assets/ai/wallpaper/gallery/9f8b5fcf-65b3-4f70-a269-4254f2171b34-0_2.png +0 -0
  65. package/assets/ai/wallpaper/gallery/9f8b5fcf-65b3-4f70-a269-4254f2171b34-0_3.json +0 -0
  66. package/assets/ai/wallpaper/gallery/9f8b5fcf-65b3-4f70-a269-4254f2171b34-0_3.png +0 -0
  67. package/assets/ai/wallpaper/gallery/af4d9cb5-62f3-450a-af62-07192fdd3476-0_0.json +0 -0
  68. package/assets/ai/wallpaper/gallery/af4d9cb5-62f3-450a-af62-07192fdd3476-0_0.png +0 -0
  69. package/assets/ai/wallpaper/gallery/af4d9cb5-62f3-450a-af62-07192fdd3476-0_1.json +0 -0
  70. package/assets/ai/wallpaper/gallery/af4d9cb5-62f3-450a-af62-07192fdd3476-0_1.png +0 -0
  71. package/assets/ai/wallpaper/gallery/af4d9cb5-62f3-450a-af62-07192fdd3476-0_2.json +0 -0
  72. package/assets/ai/wallpaper/gallery/af4d9cb5-62f3-450a-af62-07192fdd3476-0_2.png +0 -0
  73. package/assets/ai/wallpaper/gallery/af4d9cb5-62f3-450a-af62-07192fdd3476-0_3.json +0 -0
  74. package/assets/ai/wallpaper/gallery/af4d9cb5-62f3-450a-af62-07192fdd3476-0_3.png +0 -0
  75. package/assets/ai/wallpaper/gallery/b8c27135-f50b-46a6-a81f-22139486004d-0_0.json +0 -0
  76. package/assets/ai/wallpaper/gallery/b8c27135-f50b-46a6-a81f-22139486004d-0_0.png +0 -0
  77. package/assets/ai/wallpaper/gallery/bbcaf46c-7098-4e90-8795-d88fbb940aae-0_0.json +0 -0
  78. package/assets/ai/wallpaper/gallery/bbcaf46c-7098-4e90-8795-d88fbb940aae-0_0.png +0 -0
  79. package/assets/ai/wallpaper/gallery/bbcaf46c-7098-4e90-8795-d88fbb940aae-0_1.json +0 -0
  80. package/assets/ai/wallpaper/gallery/bbcaf46c-7098-4e90-8795-d88fbb940aae-0_1.png +0 -0
  81. package/assets/ai/wallpaper/gallery/bbcaf46c-7098-4e90-8795-d88fbb940aae-0_2.json +0 -0
  82. package/assets/ai/wallpaper/gallery/bbcaf46c-7098-4e90-8795-d88fbb940aae-0_2.png +0 -0
  83. package/assets/ai/wallpaper/gallery/bbcaf46c-7098-4e90-8795-d88fbb940aae-0_3.json +0 -0
  84. package/assets/ai/wallpaper/gallery/bbcaf46c-7098-4e90-8795-d88fbb940aae-0_3.png +0 -0
  85. package/assets/ai/wallpaper/gallery/bef28d82-e378-4c4a-828e-18a3ad36a33f-0_0.json +0 -0
  86. package/assets/ai/wallpaper/gallery/bef28d82-e378-4c4a-828e-18a3ad36a33f-0_0.png +0 -0
  87. package/assets/ai/wallpaper/gallery/bef28d82-e378-4c4a-828e-18a3ad36a33f-0_1.json +0 -0
  88. package/assets/ai/wallpaper/gallery/bef28d82-e378-4c4a-828e-18a3ad36a33f-0_1.png +0 -0
  89. package/assets/ai/wallpaper/gallery/bef28d82-e378-4c4a-828e-18a3ad36a33f-0_2.json +0 -0
  90. package/assets/ai/wallpaper/gallery/bef28d82-e378-4c4a-828e-18a3ad36a33f-0_2.png +0 -0
  91. package/assets/ai/wallpaper/gallery/bef28d82-e378-4c4a-828e-18a3ad36a33f-0_3.json +0 -0
  92. package/assets/ai/wallpaper/gallery/bef28d82-e378-4c4a-828e-18a3ad36a33f-0_3.png +0 -0
  93. package/assets/ai/wallpaper/gallery/e7fffc9d-5d45-425a-a5bc-1623f6f417d0-0_0.json +0 -0
  94. package/assets/ai/wallpaper/gallery/e7fffc9d-5d45-425a-a5bc-1623f6f417d0-0_0.png +0 -0
  95. package/assets/ai/wallpaper/gallery/eee6f211-51e8-4dd1-8819-394305e1d23c-0_0.json +0 -0
  96. package/assets/ai/wallpaper/gallery/eee6f211-51e8-4dd1-8819-394305e1d23c-0_0.png +0 -0
  97. package/assets/ai/wallpaper/gallery/eee6f211-51e8-4dd1-8819-394305e1d23c-0_1.json +0 -0
  98. package/assets/ai/wallpaper/gallery/eee6f211-51e8-4dd1-8819-394305e1d23c-0_1.png +0 -0
  99. package/assets/ai/wallpaper/gallery/eee6f211-51e8-4dd1-8819-394305e1d23c-0_2.json +0 -0
  100. package/assets/ai/wallpaper/gallery/eee6f211-51e8-4dd1-8819-394305e1d23c-0_2.png +0 -0
  101. package/assets/ai/wallpaper/gallery/eee6f211-51e8-4dd1-8819-394305e1d23c-0_3.json +0 -0
  102. package/assets/ai/wallpaper/gallery/eee6f211-51e8-4dd1-8819-394305e1d23c-0_3.png +0 -0
  103. package/assets/ai/wallpaper/imagine +4 -0
  104. package/batch-project-editor.js +5 -0
  105. package/package.json +3 -3
package/README.md CHANGED
@@ -1,43 +1,112 @@
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.
6
5
 
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.
8
6
 
9
- **This can not be tolerated in 21. century in Europe.**
7
+ <!--Wallpaper-->
8
+ <!--⚠️WARNING: This section was generated by https://github.com/hejny/batch-project-editor/blob/main/src//workflows/315-ai-generated-wallpaper/4-aiGeneratedWallpaperUseInReadme.ts so every manual change will be overwritten.-->
9
+ [![Wallpaper of 🟦 Stop war on Ukraine 🟨](assets/ai/wallpaper/gallery/4d04f973-4bf7-4a8f-8b5a-05d0f9ca3c6e-0_0.png)](https://www.midjourney.com/app/jobs/4d04f973-4bf7-4a8f-8b5a-05d0f9ca3c6e)
10
+ <!--/Wallpaper-->
10
11
 
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.
12
+ A lot of companies did this in their custom way but this library is supereasy option to do for everyone.
12
13
 
13
- **If you are managing some website, please stop it for Russia** until the war will be over and putin overthrown.
14
+ ### 🎗️ Add ribbon with Ukraine flag on your website
14
15
 
15
- ---
16
16
 
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.
17
+ ```html
18
+ <script src="https://cdn.jsdelivr.net/npm/save-ukraine@0.18.0/dist/umd/main.js" integrity="sha384-Xn1RAG80M8PZlBQh3r8fUvHY7c8RtuplSnqXOkdJyCxqRsToRwJ1m2FP7vyJo7u/" crossorigin="anonymous"></script>
19
+ <script>
20
+ Ukraine.save({
21
+ ribbon: 'TOP_LEFT',
22
+ hasShadow: true,
23
+ countries: [],
24
+ });
25
+ </script>
26
+ ```
18
27
 
19
- ---
28
+ ![image](https://user-images.githubusercontent.com/23721952/157456259-c16c644d-4565-4018-b213-4d4918a05450.png)
20
29
 
21
- I have created a simple way how to do it.
22
30
 
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**:
24
31
 
25
- https://github.com/hejny/Ukraine
32
+ _Or use other method of installation see below._
26
33
 
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-->
34
+ ### ❎ I want to show banner for Russian users
35
+
36
+ ```html
37
+ <script src="https://cdn.jsdelivr.net/npm/save-ukraine@0.18.0/dist/umd/main.js" integrity="sha384-Xn1RAG80M8PZlBQh3r8fUvHY7c8RtuplSnqXOkdJyCxqRsToRwJ1m2FP7vyJo7u/" crossorigin="anonymous"></script>
38
+ <script>
39
+ Ukraine.save({
40
+ isCancelable: true,
41
+ });
42
+ </script>
43
+ ```
44
+
45
+ _Or use other method of installation see below._
46
+
47
+ ### 🛑 I want to block website for Russian users
48
+
49
+ ```html
50
+ <script src="https://cdn.jsdelivr.net/npm/save-ukraine@0.18.0/dist/umd/main.js" integrity="sha384-Xn1RAG80M8PZlBQh3r8fUvHY7c8RtuplSnqXOkdJyCxqRsToRwJ1m2FP7vyJo7u/" crossorigin="anonymous"></script>
51
+ <script>
52
+ Ukraine.save({
53
+ isCancelable: false,
54
+ });
55
+ </script>
56
+ ```
57
+
58
+ ![image](https://user-images.githubusercontent.com/23721952/157457857-05cc513e-b58c-4417-998b-bec93330d372.png)
59
+
60
+
61
+ _Or use other method of installation see below._
62
+
63
+ ### 🩸 I want to show banner for Russian users but not include cruel graphic and blood
64
+
65
+ ```html
66
+ <script src="https://cdn.jsdelivr.net/npm/save-ukraine@0.18.0/dist/umd/main.js" integrity="sha384-Xn1RAG80M8PZlBQh3r8fUvHY7c8RtuplSnqXOkdJyCxqRsToRwJ1m2FP7vyJo7u/" crossorigin="anonymous"></script>
67
+ <script>
68
+ Ukraine.save({
69
+ isBloodIncluded: false,
70
+ isGraphicIncluded: false,
71
+ });
72
+ </script>
73
+ ```
74
+
75
+ ![image](https://user-images.githubusercontent.com/23721952/157458121-4718b34c-3efd-41fd-8f58-d06e5c5aed68.png)
76
+
77
+
78
+ _Or use other method of installation see below._
79
+
80
+ ### 🎗️🎗️🎗️🎗️ I want to have ribbon in multiple corners
81
+
82
+ ```html
83
+ <script src="https://cdn.jsdelivr.net/npm/save-ukraine@0.18.0/dist/umd/main.js" integrity="sha384-Xn1RAG80M8PZlBQh3r8fUvHY7c8RtuplSnqXOkdJyCxqRsToRwJ1m2FP7vyJo7u/" crossorigin="anonymous"></script>
84
+ <script>
85
+ Ukraine.save({
86
+ ribbon: 'TOP_LEFT',
87
+ hasShadow: true,
88
+ countries: [],
89
+ });
90
+ Ukraine.save({
91
+ ribbon: 'TOP_RIGHT',
92
+ hasShadow: false,
93
+ countries: [],
94
+ });
95
+ Ukraine.save({
96
+ ribbon: 'BOTTOM_LEFT',
97
+ hasShadow: true,
98
+ countries: [],
99
+ });
100
+ Ukraine.save({
101
+ ribbon: 'BOTTOM_RIGHT',
102
+ hasShadow: false,
103
+ countries: [],
104
+ });
105
+ </script>
106
+ ```
107
+
108
+ _Or use other method of installation see below._
39
109
 
40
- ![Blood on Ukraine](./assets/wallpaper.png)
41
110
 
42
111
  ## 📲 How to include on your page?
43
112
 
@@ -48,21 +117,20 @@ There are several ways how to add this to your page:
48
117
  <!-- TODO: Auto update of version v0.13.0 -->
49
118
 
50
119
  ```html
51
- <script src="https://cdn.jsdelivr.net/npm/save-ukraine@0.18.0/dist/umd/main.js"></script>
120
+ <script src="https://cdn.jsdelivr.net/npm/save-ukraine@0.18.0/dist/umd/main.js" integrity="sha384-Xn1RAG80M8PZlBQh3r8fUvHY7c8RtuplSnqXOkdJyCxqRsToRwJ1m2FP7vyJo7u/" crossorigin="anonymous"></script>
52
121
  <script>
53
122
  Ukraine.save();
54
123
  </script>
55
124
  ```
56
125
 
57
- _Note:_ You can [also modify the options](https://github.com/hejny/Ukraine/blob/main/samples/browser.html#L10).
58
126
  _Note: Normally you would include **async** and **defer** keywords in the script element. But in this situation we do not want to defer this miniscript._
59
127
 
60
- 📗 Wordpress
128
+ ### 📗 Wordpress
61
129
 
62
130
  Install [Simple Custom CSS and JS](https://cs.wordpress.org/plugins/custom-css-js/) WordPress plugin and add the following code as the `Custom HTML`:
63
131
 
64
132
  ```html
65
- <script src="https://cdn.jsdelivr.net/npm/save-ukraine@0.18.0/dist/umd/main.js"></script>
133
+ <script src="https://cdn.jsdelivr.net/npm/save-ukraine@0.18.0/dist/umd/main.js" integrity="sha384-Xn1RAG80M8PZlBQh3r8fUvHY7c8RtuplSnqXOkdJyCxqRsToRwJ1m2FP7vyJo7u/" crossorigin="anonymous"></script>
66
134
  <script>
67
135
  Ukraine.save();
68
136
  </script>
@@ -108,9 +176,10 @@ ReactDOM.render(
108
176
  <>
109
177
  <div
110
178
  ref={(element) => {
111
- if (element) {
112
- Ukraine.save({ element });
179
+ if (!element) {
180
+ return;
113
181
  }
182
+ Ukraine.save({ element, ...props });
114
183
  }}
115
184
  />
116
185
  {/*...Here will be rest of your app...*/}
@@ -131,9 +200,10 @@ export function SaveUkraine(props: Partial<Omit<IUkraineOptions, 'element'>>) {
131
200
  return (
132
201
  <div
133
202
  ref={(element) => {
134
- if (element) {
135
- Ukraine.save({ element, ...props });
203
+ if (!element) {
204
+ return;
136
205
  }
206
+ Ukraine.save({ element, ...props });
137
207
  }}
138
208
  />
139
209
  );
@@ -158,83 +228,8 @@ ReactDOM.render(
158
228
  Note: Feel free to add more methods of importing
159
229
  -->
160
230
 
161
- ## 🧩 Scenarios to use
162
-
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
231
 
237
- ### 🛠 Other customization
232
+ ## 🛠🧩 Other customization
238
233
 
239
234
  You can customize what will be shown.
240
235
  Here are all the [options](./src/options.ts). If you have some idea feel free to contribute via pull request.
@@ -256,6 +251,52 @@ Ukraine.save({
256
251
 
257
252
  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
253
 
254
+
255
+
256
+ ## ✉️ Motivation
257
+
258
+ **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.
259
+
260
+ But unfortunately, the situation has changed.
261
+
262
+ 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.
263
+
264
+ **This can not be tolerated in 21. century in Europe.**
265
+
266
+ We can not just close our eyes and just provide all services and benefits to the Russian economy which can keep killing innocent people.
267
+
268
+ **If you are managing some website, please stop it for Russia** until the war will be over and putin overthrown.
269
+
270
+ ---
271
+
272
+ 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.
273
+
274
+ ---
275
+
276
+ I have created a simple way how to do it.
277
+
278
+ 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**:
279
+
280
+
281
+ <!--Badges-->
282
+ <!--⚠️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.-->
283
+ <!--
284
+ [![License of ✂️ Space trim](https://img.shields.io/github/license/hejny/Ukraine.svg?style=flat)](https://github.com/hejny/Ukraine/blob/main/LICENSE)
285
+ [![NPM Version of ✂️ Space trim](https://badge.fury.io/js/Ukraine.svg)](https://www.npmjs.com/package/Ukraine)
286
+ [![Quality of package ✂️ Space trim](https://packagequality.com/shield/Ukraine.svg)](https://packagequality.com/#?package=Ukraine)
287
+ [![lint](https://github.com/hejny/Ukraine/actions/workflows/lint.yml/badge.svg)](https://github.com/hejny/Ukraine/actions/workflows/lint.yml)
288
+ [![test](https://github.com/hejny/Ukraine/actions/workflows/test.yml/badge.svg)](https://github.com/hejny/Ukraine/actions/workflows/test.yml)
289
+ [![Known Vulnerabilities](https://snyk.io/test/github/hejny/Ukraine/badge.svg)](https://snyk.io/test/github/hejny/Ukraine)
290
+ [![Issues](https://img.shields.io/github/issues/hejny/Ukraine.svg?style=flat)](https://github.com/hejny/Ukraine/issues)
291
+ -->
292
+ <!--/Badges-->
293
+
294
+ ## 📛 Make 3D printed bagge
295
+
296
+
297
+ [![276990939_10221763639026308_8401530540848276183_n](https://user-images.githubusercontent.com/23721952/159365141-520da10f-0ff4-4941-84cc-22cdab7d7588.jpg)https://www.thingiverse.com/thing:5326034](https://www.thingiverse.com/thing:5326034)
298
+
299
+
259
300
  ## ⁉️ FAQ
260
301
 
261
302
  Few most common things aggregated from your questions:
@@ -0,0 +1 @@
1
+ 4d04f973-4bf7-4a8f-8b5a-05d0f9ca3c6e-0_0.png
@@ -0,0 +1,4 @@
1
+ # Note: Each part is new input for imagine command
2
+ # And every first line will be searched during the harvesting phase
3
+
4
+ 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.
@@ -0,0 +1,5 @@
1
+ // Configuration for https://github.com/hejny/batch-project-editor
2
+
3
+ module.exports = {
4
+ ignoreWorkflows: ['license', 'badges', 'contributing', 'partners'],
5
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "save-ukraine",
3
- "version": "0.18.0",
4
- "description": "Ban Russian users from your website; in context of Ukraine invasion",
3
+ "version": "0.18.2",
4
+ "description": "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.",
5
5
  "sideEffects": false,
6
6
  "module": "./dist/esm/main.js",
7
7
  "main": "./dist/umd/main.js",
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "repository": {
18
18
  "type": "git",
19
- "url": "git+https://github.com/hejny/Ukraine.git"
19
+ "url": "https://github.com/hejny/Ukraine"
20
20
  },
21
21
  "keywords": [],
22
22
  "author": "",