summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--whatsapp-nativefier-inject.js19
1 files changed, 17 insertions, 2 deletions
diff --git a/whatsapp-nativefier-inject.js b/whatsapp-nativefier-inject.js
index 428cc9c295d..828fb8cd138 100644
--- a/whatsapp-nativefier-inject.js
+++ b/whatsapp-nativefier-inject.js
@@ -1,2 +1,17 @@
-if (document.body.innerText.replace(/\n/g, ' ').search(/whatsapp works with.*to use whatsapp.*update/i) !== -1)
- navigator.serviceWorker.getRegistration().then(function (r) { r.unregister(); document.location.reload() });
+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;
+ }
+}