WebApps icon indicating copy to clipboard operation
WebApps copied to clipboard

www.facebook.com (the desktop site) doesn't work

Open akorn opened this issue 4 years ago • 6 comments

Instead of m.facebook.com, where as of about yesterday, the Messenger icon in the navigation bar stopped working (I assume Facebook wants to force me to install their Messenger app, which I will not do), I tried to add a webapp for www.facebook.com.

First I set my user agent to Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.26 Safari/537.36 OPR/74.0.3862.0 (Edition developer) in an attempt to force the site to treat my browser as a desktop client.

I then chose "new webapp", entered www.facebook.com as the URL, and tapped "OK". All that happened was that a toast notification with "URL: https://www.facebook.com/" was displayed briefly.

I tried with various combinations of different URL (e.g. https://facebook.com/), allowing 3rd party requests, allowing redirects, deselecting "open in new webapp" (what does that even do), but the result was, sadly, always the same.

akorn avatar Dec 12 '20 14:12 akorn

Would be a good solution to add a new button next to the menu_image as menu_script and toggle a predefined script per WebApp to be able to use document.getElementsByClassName('n5hh3s10')[0].style.display = "none"; and document.getElementsByClassName('n5hh3s10')[0].style.display = "block"; for the messenger dot com's desktop view. Who can realize that? Please 👍!

eapo avatar Dec 16 '20 10:12 eapo

Would be a good solution to add a new button next to the menu_image as menu_script and toggle a predefined script per WebApp to be able to use document.getElementsByClassName('n5hh3s10')[0].style.display = "none"; and document.getElementsByClassName('n5hh3s10')[0].style.display = "block"; for the messenger dot com's desktop view. Who can realize that? Please 👍!

Why are you hiding the element and then displaying as block? How would the block actually work?

creativetrendsapps avatar Dec 16 '20 14:12 creativetrendsapps

Would be a good solution to add a new button next to the menu_image as menu_script and toggle a predefined script per WebApp to be able to use document.getElementsByClassName('n5hh3s10')[0].style.display = "none"; and document.getElementsByClassName('n5hh3s10')[0].style.display = "block"; for the messenger dot com's desktop view. Who can realize that? Please 👍!

Why are you hiding the element and then displaying as block? How would the block actually work?

You are right, originally it's flex. Here are the screenshots with ….style.display toggle

document.getElementsByClassName('n5hh3s10')[0].style.display = "flex"; document.getElementsByClassName('n5hh3s10')[0].style.display = "none";

eapo avatar Dec 16 '20 17:12 eapo

Would be a good solution to add a new button next to the menu_image as menu_script and toggle a predefined script per WebApp to be able to use document.getElementsByClassName('n5hh3s10')[0].style.display = "none"; and document.getElementsByClassName('n5hh3s10')[0].style.display = "block"; for the messenger dot com's desktop view. Who can realize that? Please 👍!

Why are you hiding the element and then displaying as block? How would the block actually work?

You are right, originally it's flex. Here are the screenshots with ….style.display toggle

document.getElementsByClassName('n5hh3s10')[0].style.display = "flex"; document.getElementsByClassName('n5hh3s10')[0].style.display = "none";

This works for me:

/sfb/

.wkznzc2l { display: none !important; }

.kuivcneq { display: none !important; }

.bafdgad4 { display: none !important; }

.aov4n071.cxmmr5t8.bi6gxh9e.hcukyx3x.jb3vyjys.hv4rvrfc.qt6c0cv9.dati1w0a { display: none !important; }

.rj1gh0hx { max-width: -webkit-fill-available; }

.j83agx80 { max-width: -webkit-fill-available; }

photo_2020-12-24_16-27-10

creativetrendsapps avatar Dec 24 '20 21:12 creativetrendsapps

As far as I know, it is not possible to inject code (JS/CSS) into a webview from an app (it is a big security risk, e.g. grabbing your credit card details).

tobykurien avatar Dec 30 '20 07:12 tobykurien

As far as I know, it is not possible to inject code (JS/CSS) into a webview from an app (it is a big security risk, e.g. grabbing your credit card details).

This is false. Injecting CSS is not pulling out data, it's overriding styles. Every wrapper you use (ex. Frost) injects CSS.

creativetrendsapps avatar Dec 30 '20 17:12 creativetrendsapps