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 +3 -3
- package/dist/esm/main.js +2 -2
- package/dist/esm/typings/options.d.ts +1 -1
- package/dist/umd/main.js +2 -2
- package/dist/umd/typings/options.d.ts +1 -1
- package/package.json +1 -1
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.
|
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.
|
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
|
-
|
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.
|
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,
|
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
|
});
|
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.
|
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,
|
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
|
});
|