-
-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update available - get CSS or TagName of DIV #199
Comments
Now I noticed, that I can indeedly look into the real code of WhatsApp Web in Ferdium, with:
So first the display none should wait till the site is fully loaded and then (to be sure) again the same display none after 15 sec. with setTimeout function. |
It's probably not ideal to hide all alerts. In that case, I suggest injecting a simple [data-testid="chat-butterbar"]:has([data-icon="alert-update"]) {
display: none !important;
} That makes this workaround pretty trivial. I tested it from my browser and everything worked pretty well. |
Is it possible to add this into the official releases? I'm not sure how to do add it to the CSS myself. |
I have to add now, that without the Timeout function, after start of ferdium, the Update message keeps displaying. So I added again the timeout. All code now in user.js for WhatsApp service:
I changed my code to the one from @jschiefner because it is much better 👍 thanks, Jonas ❤️ |
Hallo
I have the old and tedious issue in some electron apps (Ferdium etc.) that my WhatsApp service has always after starting the (wrong) message with "Update available" which is not fixable with UserAgent change.
I think it must be possible to fix it with some css or javascript, which I could insert then.
But the problem is, that in a "real" browser, I never get this message, and in electron the "webview" element, where the whole web.whatsapp.com is inside, is not debuggable. The Developer Tools wont show into that webview.
I noticed in Chrome (actual version, Ubuntu 22) that I have also a message about allowing desktop messages, looks a bit similar, maybe it is the same skeleton for WhatsApp Web in the end?
So when I look at the
<span class="_3P5VY" data-testid="chat-butterbar">
I think the class ("_3P5VY") is surely dynamically created and so it wont help to kill it (display:none) but that "data-testid" attribute with value "chat-butterbar" seems not dynamically created.Could it help to grab it with DOM functions and hide it? E.g. with:
document.querySelectorAll('[data-testid="chat-butterbar"]')[0].style.display = "none";
What do you think?
Maybe you even know the real elements name and tags of these annoying and useless "Update available" messages?
I ask that here, because I guess you have the knowledge about such things, which I didnt find since a while (nobody could help me about that whereever I asked it).
My last idea was, to use JS to search through the website for just that text "Update available" (its in german acutally in my case, "Update verfügbar") and then to get the sourrunding element, and climb up as many levels as needed to hide the whole placeholder.
But as I cannot do it directly (webview problem) it would be fishing in the dark.
Thanks for hints, frank.
The text was updated successfully, but these errors were encountered: