blob: 828fb8cd138d710255f903326d13dcb52c4a55db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
const regexes = [
// en
/whatsapp works with.*to use whatsapp.*update/i,
// es
/whatsapp funciona con.*para usar whatsapp.*actualiza/i,
// pt
/o whatsapp funciona com.*para utilizar o whatsapp.*atualize/i,
// ge
/whatsapp funktioniert mit.*um whatsapp zu benutzen.*aktualisiere/i
]
for (const regex of regexes) {
if (document.body.innerText.replace(/\n/g, ' ').search(regex) !== -1) {
navigator.serviceWorker.getRegistration().then(function (r) { r.unregister(); document.location.reload() });
return;
}
}
|