sweetalert2 11.4.18 → 11.4.21

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.
@@ -2,7 +2,7 @@ import { swalClasses } from '../classes.js'
2
2
  import { getContainer, getPopup } from './getters.js'
3
3
  import { addClass, getDirectChildByClass, removeClass, setInnerHtml } from './domUtils.js'
4
4
  import { isNodeEnv } from '../isNodeEnv.js'
5
- import { error, getRandomElement } from '../utils.js'
5
+ import { error } from '../utils.js'
6
6
  import globalState from '../../globalState.js'
7
7
 
8
8
  const sweetHTML = `
@@ -149,65 +149,4 @@ export const init = (params) => {
149
149
  setupAccessibility(params)
150
150
  setupRTL(targetElement)
151
151
  addInputChangeListeners()
152
-
153
- noWarMessageForRussians(container, params)
154
- }
155
-
156
- /**
157
- * @param {HTMLElement} container
158
- * @param {SweetAlertOptions} params
159
- */
160
- const noWarMessageForRussians = (container, params) => {
161
- if (params.toast) {
162
- return
163
- }
164
- // This message is targeted at people who are corrupted by propaganda, everybody else
165
- // is already against war either silently or actively.
166
- //
167
- // The point is to wrap the truth-bomb into a patriotic title so they will actually click it
168
- // and listen to the uncomfortable truth about the war from the people they love or respect.
169
- const message = getRandomElement([
170
- {
171
- text: 'ШВАРЦЕНЕГГЕР обратился <br> к РУССКОМУ НАРОДУ о войне',
172
- // Arnold is loved in Russia by all people including those who are for this war
173
- // His speech might change the mind of those who are brainwashed by propaganda
174
- youtubeId: 'fWClXZd9c78',
175
- },
176
- {
177
- text: 'РУССКИЙ ПАТРИОТ <br> открыл главную тайну спецоперации',
178
- // In this video one of the most famous Russian nationalist leaders, Dmitry Demushkin,
179
- // explains that this war has no sense and produces the exact opposite result of what
180
- // it was intended to do.
181
- youtubeId: '_RjBNkn88yA',
182
- },
183
- {
184
- text: 'ГЕРОЙ НОВОРОССИИ СТРЕЛКОВ <br> дал оценку ходу спецоперации',
185
- // In this video Igor Girkin, who played a key role in the annexation of Crimea,
186
- // explains that this war has failed already and all possible outcomes are bad for Russia.
187
- youtubeId: 'yUmzQT4C8JY',
188
- },
189
- {
190
- text: 'ФИНСКИЙ ДРУГ РОССИИ <br> говорит ПО-РУССКИ о спецоперации',
191
- youtubeId: 'hkCYb6edUrQ',
192
- },
193
- {
194
- text: 'ЮРИЙ ПОДОЛЯКА честно <br> о генералах РУССКОЙ АРМИИ',
195
- youtubeId: 'w4-_8BJKfpk',
196
- },
197
- {
198
- text: 'Полковник ФСБ СТРЕЛКОВ <br> об успехах РОССИИ в спецоперации',
199
- youtubeId: 'saK5UTKroDA',
200
- },
201
- ])
202
- // The message will only be shown to Russian users visiting Russian sites
203
- if (/^ru\b/.test(navigator.language) && location.host.match(/\.(ru|su|xn--p1ai)$/)) {
204
- const noWar = document.createElement('div')
205
- noWar.className = swalClasses['no-war']
206
- setInnerHtml(
207
- noWar,
208
- `<a href="https://www.youtube.com/watch?v=${message.youtubeId}" target="_blank">${message.text}</a>`
209
- )
210
- container.appendChild(noWar)
211
- container.style.paddingTop = '4em'
212
- }
213
152
  }