vladimiry / ElectronMail

Unofficial ProtonMail Desktop App
GNU General Public License v3.0
1.48k stars 96 forks source link

[Question] Do you know a way to block the anyoing "self ads" of proton? #629

Closed BobWs closed 10 months ago

BobWs commented 11 months ago

Hi, Not a bug or issue report, but a question! Do you know a way to block the annoying ads of proton about upgrade to paid account and all those other promotions? See screenshot for example

Screen_Shot 4 TIA

vladimiry commented 11 months ago

Any stuff can be cut out or modified by patching https://github.com/ProtonMail/WebClients/ sources before it gets assembled for packaging into the app, see https://github.com/vladimiry/ElectronMail/tree/master/patches/protonmail.

vladimiry commented 11 months ago

If @protonmail saves "explicitly closed" state of this ad in the browser's local storage (I didn't look into the code, just a guess), then this state will be lost, since the app by design keep all the browser/web-specific storages in memory only, so the data not persisted between the app restarts.

BobWs commented 11 months ago

keep all the browser/web-specific storages in memory only, so the data not persisted between the app restarts

I guess that's what's happening, because after every new start of the app they all appear again.

Do you want to take look at it and see if you can patch it?

vladimiry commented 11 months ago

Do you want to take look at it and see if you can patch it?

If I do this, then as an opt-in feature, so @protonmail upsell messages not suppressed by default. For opt-in feature, simple static patching won't be a solution (dynamically switchable feature), so more dev work would be required. There is no ETA, so if I do this, you will see it done.

vladimiry commented 11 months ago

It's coming in the next release. See the new "Disable Proton upsell messages" toggle in the "General" app settings. The toggle is disabled by default, so this is an opt-in feature. disable-proton-upsell-messages

BobWs commented 11 months ago

It's coming in the next release. See the new "Disable Proton upsell messages" toggle in the "General" app settings. The toggle is disabled by default, so this is an opt-in feature.

That's a great solution, nice! Thank you for implementing it!

Uj947nXmRqV2nRaWshKtHzTvckUUpD commented 11 months ago

will it also hide the 'upgrade now' banner?

vladimiry commented 11 months ago

will it also hide the 'upgrade now' banner?

If it's similar to the image in the first message https://github.com/vladimiry/ElectronMail/issues/629#issue-1845281306, then yes, it will.

Uj947nXmRqV2nRaWshKtHzTvckUUpD commented 11 months ago

there also an upgrade button on header next to settings. will it be hidden as well ?

image

vladimiry commented 11 months ago

will it be hidden as well ?

Nope. Looking into it. The above-displayed "Disable Proton upsell messages" toggle is going to be renamed to "Disable Proton upsell messages & buttons".

vladimiry commented 11 months ago

there also an upgrade button on header next to settings. will it be hidden as well ?

Done now.

toggle is going to be renamed to "Disable Proton upsell messages & buttons".

The new toggle title name is "Disable Proton upsell ads". So the toggle disables upsell messages and buttons too.

123

Uj947nXmRqV2nRaWshKtHzTvckUUpD commented 10 months ago

just updated to v5.2.0 and it looks great now. thank you !

pirate486743186 commented 10 months ago

the banner is still visible in spam and trash folders...

vladimiry commented 10 months ago

the banner is still visible in spam and trash folders...

Not for me. Screenshot?

Uj947nXmRqV2nRaWshKtHzTvckUUpD commented 10 months ago

the banner is still visible in spam and trash folders...

same for me image

vladimiry commented 10 months ago

It's different on paid plan, so it didn't look like an ad for me. But on free plan it indeed looks like an ad, so has to be taken care too. Thanks for this finding.

free account: free paid account: paid

pirate486743186 commented 10 months ago

yea, i'm a freeloader 😳

BobWs commented 10 months ago

Just installed the latest version, nice work thank you for tackling it so quickly!

vladimiry commented 9 months ago

free account: free paid account: paid

v5.2.1 comes with disableable spam/trash ad banners. No change made for paid users since it's not an ad there, but a shortcut to an available feature and the banner there comes with "close" icon which closes it permanently.