summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD5
-rw-r--r--whatsapp-nativefier-inject.js31
3 files changed, 10 insertions, 31 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 91a33b49ab0..0cff3837665 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = whatsapp-nativefier
pkgdesc = WhatsApp desktop built with nativefier (electron)
- pkgver = 2.2045.15
+ pkgver = 2.2121.6
pkgrel = 1
url = https://web.whatsapp.com
arch = armv7l
@@ -19,7 +19,6 @@ pkgbase = whatsapp-nativefier
source = whatsapp-nativefier-inject.js
sha256sums = 3899581abcfed9b40b7208bbbca8bdbfe3ae9655980dbf55f04dec9cb3309f27
sha256sums = bad0489ae519bc78afab3d226966691feede8bcedf58025af1b171215ae51423
- sha256sums = e794ef339f9fc6ff78ed54236bbeec3fc2d6592c4781ffe69b8e7932e02436c9
+ sha256sums = f46bdc1adc9868d13b4f0809667cd5a9b1a6e5e47bc25b570f062d7072d0f942
pkgname = whatsapp-nativefier
-
diff --git a/PKGBUILD b/PKGBUILD
index 61d6df81604..a966cf032a7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Fredy GarcĂ­a <frealgagu at gmail dot com>
pkgname=whatsapp-nativefier
-pkgver=2.2045.15
+pkgver=2.2121.6
pkgrel=1
pkgdesc="WhatsApp desktop built with nativefier (electron)"
arch=("armv7l" "i686" "x86_64")
@@ -18,7 +18,7 @@ source=(
sha256sums=(
"3899581abcfed9b40b7208bbbca8bdbfe3ae9655980dbf55f04dec9cb3309f27"
"bad0489ae519bc78afab3d226966691feede8bcedf58025af1b171215ae51423"
- "e794ef339f9fc6ff78ed54236bbeec3fc2d6592c4781ffe69b8e7932e02436c9"
+ "f46bdc1adc9868d13b4f0809667cd5a9b1a6e5e47bc25b570f062d7072d0f942"
)
build() {
@@ -29,6 +29,7 @@ build() {
--icon "${pkgname}.png" \
--width "800px" \
--height "600px" \
+ --user-agent "safari" \
--inject "${pkgname}-inject.js" \
--browserwindow-options '{ "webPreferences": { "spellcheck": true } }' \
--verbose \
diff --git a/whatsapp-nativefier-inject.js b/whatsapp-nativefier-inject.js
index d31b187a83c..81bba8bafea 100644
--- a/whatsapp-nativefier-inject.js
+++ b/whatsapp-nativefier-inject.js
@@ -1,28 +1,7 @@
-// ==UserScript==
-// @include https://web.whatsapp.com/
-// ==/UserScript==
-
-// Quirk for WhatsApp Web, based on:
-// https://github.com/jiahaog/nativefier/issues/719
-
-"use strict";
-
-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();
- console.log("'Update browser' message bypassed.");
- clearInterval(id);
+if ('serviceWorker' in navigator) {
+ caches.keys().then(function (cacheNames) {
+ cacheNames.forEach(function (cacheName) {
+ caches.delete(cacheName);
+ });
});
- }
}
-window.setTimeout(
- function() {
- console.log("No 'Update browser' message found after 5 seconds.");
- clearInterval(id);
- }, 5000
-);