summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorfrealgagu2020-08-12 22:49:43 -0500
committerfrealgagu2020-08-12 22:49:43 -0500
commitf8c06683316a44b7028b8fd6d3148bfdabe12830 (patch)
tree52c0f23e3b46c280cfaaac4b68ade705eecbe069
parent9287c6580f29cbef3894a16d4209beaab670b280 (diff)
downloadaur-f8c06683316a44b7028b8fd6d3148bfdabe12830.tar.gz
Modifying inject.js
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD4
-rw-r--r--whatsapp-nativefier-inject.js19
3 files changed, 20 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e5258c384a6..77a20fae488 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = whatsapp-nativefier
pkgdesc = WhatsApp desktop built with nativefier (electron)
- pkgver = 2.2027.10
+ pkgver = 2.2033.7
pkgrel = 1
url = https://web.whatsapp.com
arch = armv7l
@@ -19,7 +19,7 @@ pkgbase = whatsapp-nativefier
source = whatsapp-nativefier-inject.js
sha256sums = 3899581abcfed9b40b7208bbbca8bdbfe3ae9655980dbf55f04dec9cb3309f27
sha256sums = bad0489ae519bc78afab3d226966691feede8bcedf58025af1b171215ae51423
- sha256sums = 9c1b04a35308fafeecb747a5a552922a97557ec22c70dd0ffb0bbcb460be824e
+ sha256sums = e794ef339f9fc6ff78ed54236bbeec3fc2d6592c4781ffe69b8e7932e02436c9
pkgname = whatsapp-nativefier
diff --git a/PKGBUILD b/PKGBUILD
index e80c070a2b5..0934a3cc61f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Fredy GarcĂ­a <frealgagu at gmail dot com>
pkgname=whatsapp-nativefier
-pkgver=2.2027.10
+pkgver=2.2033.7
pkgrel=1
pkgdesc="WhatsApp desktop built with nativefier (electron)"
arch=("armv7l" "i686" "x86_64")
@@ -18,7 +18,7 @@ source=(
sha256sums=(
"3899581abcfed9b40b7208bbbca8bdbfe3ae9655980dbf55f04dec9cb3309f27"
"bad0489ae519bc78afab3d226966691feede8bcedf58025af1b171215ae51423"
- "9c1b04a35308fafeecb747a5a552922a97557ec22c70dd0ffb0bbcb460be824e"
+ "e794ef339f9fc6ff78ed54236bbeec3fc2d6592c4781ffe69b8e7932e02436c9"
)
build() {
diff --git a/whatsapp-nativefier-inject.js b/whatsapp-nativefier-inject.js
index c0921a0e4f9..d31b187a83c 100644
--- a/whatsapp-nativefier-inject.js
+++ b/whatsapp-nativefier-inject.js
@@ -7,9 +7,22 @@
"use strict";
-if (document.querySelector("a[href='https://support.google.com/chrome/answer/95414']")) {
+var id = setInterval(bypass, 50);
+function bypass() {
+ console.log("Checking for 'Update browser' message...");
+ if (document.querySelector("a[href='https://support.google.com/chrome/answer/95414']")) {
+ console.log("Bypassing 'Update browser' message...");
navigator.serviceWorker.getRegistration().then((registration) => {
- registration.unregister();
- document.location.reload();
+ registration.unregister();
+ document.location.reload();
+ console.log("'Update browser' message bypassed.");
+ clearInterval(id);
});
+ }
}
+window.setTimeout(
+ function() {
+ console.log("No 'Update browser' message found after 5 seconds.");
+ clearInterval(id);
+ }, 5000
+);