save-ukraine 0.12.0 → 0.13.0

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.
package/README.md CHANGED
@@ -39,10 +39,10 @@ There are several ways how to add this to your page:
39
39
 
40
40
  ### 📔 Via HTML script tag
41
41
 
42
- <!-- TODO: Auto update of version v0.11.0 -->
42
+ <!-- TODO: Auto update of version v0.13.0 -->
43
43
 
44
44
  ```html
45
- <script src="https://cdn.jsdelivr.net/npm/save-ukraine@0.12.0/dist/umd/main.js"></script>
45
+ <script src="https://cdn.jsdelivr.net/npm/save-ukraine@0.13.0/dist/umd/main.js"></script>
46
46
  <script>
47
47
  Ukraine.save();
48
48
  </script>
@@ -111,7 +111,7 @@ Here are all the [options](./src/options.ts). If you have some idea feel free to
111
111
  ```javascript
112
112
  Ukraine.save({
113
113
  text: 'Stop the war with <b>Ukraine</b>',
114
- languages: [/* Russia and Belarus */ 'ru', 'by'],
114
+ countries: [/* Russia and Belarus */ 'ru', 'by'],
115
115
  isBloodIncluded: true,
116
116
  });
117
117
  ```
package/dist/esm/main.js CHANGED
@@ -93,7 +93,7 @@ var Ukraine = /** @class */ (function () {
93
93
  // TODO: Split into multiple methods like checkRequirements and init
94
94
  this.options = options;
95
95
  this.scope = 'x' + Math.random().toString().split('.')[1] + '_';
96
- if (!this.options.languages.includes(getUserLanguage())) {
96
+ if (!this.options.countries.includes(getUserLanguage())) {
97
97
  return;
98
98
  }
99
99
  // Note: To suppress main scrollbar if the page has longer content
@@ -126,7 +126,7 @@ var Ukraine = /** @class */ (function () {
126
126
  options.element = window.document.createElement('div');
127
127
  window.document.body.appendChild(options.element);
128
128
  _a.label = 2;
129
- case 2: return [2 /*return*/, new Ukraine(__assign({ element: options.element, languages: [/* Russia and Belarus */ 'ru', 'by'], isBloodIncluded: true, text: "\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0432\u043E\u0439\u043D\u0443 \u0441 <b>\u0423\u043A\u0440\u0430\u0438\u043D\u043E\u0439</b>" }, options))];
129
+ case 2: return [2 /*return*/, new Ukraine(__assign({ element: options.element, countries: [/* Russia and Belarus */ 'ru', 'by'], isBloodIncluded: true, text: "\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0432\u043E\u0439\u043D\u0443 \u0441 <b>\u0423\u043A\u0440\u0430\u0438\u043D\u043E\u0439</b>" }, options))];
130
130
  }
131
131
  });
132
132
  });
@@ -7,7 +7,7 @@ export interface IUkraineOptions {
7
7
  /**
8
8
  * List of banned countries by ISO 3166
9
9
  */
10
- languages: string[];
10
+ countries: string[];
11
11
  /**
12
12
  * What text to show
13
13
  * Note: It is possible to use HTML tags - do not pass here user input
package/dist/umd/main.js CHANGED
@@ -99,7 +99,7 @@
99
99
  // TODO: Split into multiple methods like checkRequirements and init
100
100
  this.options = options;
101
101
  this.scope = 'x' + Math.random().toString().split('.')[1] + '_';
102
- if (!this.options.languages.includes(getUserLanguage())) {
102
+ if (!this.options.countries.includes(getUserLanguage())) {
103
103
  return;
104
104
  }
105
105
  // Note: To suppress main scrollbar if the page has longer content
@@ -132,7 +132,7 @@
132
132
  options.element = window.document.createElement('div');
133
133
  window.document.body.appendChild(options.element);
134
134
  _a.label = 2;
135
- case 2: return [2 /*return*/, new Ukraine(__assign({ element: options.element, languages: [/* Russia and Belarus */ 'ru', 'by'], isBloodIncluded: true, text: "\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0432\u043E\u0439\u043D\u0443 \u0441 <b>\u0423\u043A\u0440\u0430\u0438\u043D\u043E\u0439</b>" }, options))];
135
+ case 2: return [2 /*return*/, new Ukraine(__assign({ element: options.element, countries: [/* Russia and Belarus */ 'ru', 'by'], isBloodIncluded: true, text: "\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0432\u043E\u0439\u043D\u0443 \u0441 <b>\u0423\u043A\u0440\u0430\u0438\u043D\u043E\u0439</b>" }, options))];
136
136
  }
137
137
  });
138
138
  });
@@ -7,7 +7,7 @@ export interface IUkraineOptions {
7
7
  /**
8
8
  * List of banned countries by ISO 3166
9
9
  */
10
- languages: string[];
10
+ countries: string[];
11
11
  /**
12
12
  * What text to show
13
13
  * Note: It is possible to use HTML tags - do not pass here user input
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "save-ukraine",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
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",