Uassets: (Annoyances Request) Instagram turn on notifications popup

Created on 3 Dec 2020  路  12Comments  路  Source: uBlockOrigin/uAssets

URL(s) where the issue occurs

https://www.instagram.com/

Describe the issue

instagram keep asking to enable notification when first time logged in

Screenshot(s)

ubo

Versions

  • Browser/version: firefox 83.0
  • uBlock Origin version: 1.31.0

Settings

  • default filter + annoyances

Notes

i created this filters, works fine

www.instagram.com##body:style(overflow: auto !important;)
www.instagram.com##[src*="/static/images/ico/"]:upward(7)

account required

All 12 comments

Fixed, made more specific to avoid false positive.

Hiding that caused problem after I went somewhere, returned back with browser's back button, and clicked home icon i.e. can't enter home as it only prompts the hidden popup. I have to take video SS but now don't have time. Disabled temporary.
(also not always follow fb-root, maybe ##div[style^="position: fixed; top:env"] ~ div[role="presentation"]:has(> div[role="dialog"] > div[class^="_"] img[alt=""][src^="/static/images/ico/xxhdpi_launcher.png/"][width="76px"][height="76px"]))
@krystian3w @yourduskquibbles [Update] Never mind, I forgot I was already in Home. But the filter causes blink when you click e.g. direct inbox, so I'll leave it to you.

maybe something like:

##+js(set, Notification.requestPermission, falseFunc)

##+js(aopr, Notification.requestPermission)

or legacy:

##+js(grant-fake-notification)

# Grant fake notification permission
grant-fake-notification.js application/javascript
(function() {
    Notification = function() { };
    Notification.permission = 'default';
    Notification.requestPermission = function(callback) {
        Notification.permission = 'granted';
        if ( callback ) {
            setTimeout(callback, 0, 'granted');
        }
        return Promise.resolve('granted');
    };
})();

if serviceWorker no tests your accept/reject.

@krystian3w non-procedural filter instagram.com##.Yx5HN.RnEpo also doesn't cause blink, but I'm not sure if it's universal.

could you test for breakage ?

instagram.com##:xpath(//*[contains(@src,'/static/images/ico/')]):upward([role="presentation"])

IMO blink less if manually accept cookies before logon.

@mapx- Still causes blink.

@krystian3w Does instagram.com##.Yx5HN.RnEpo work for you and doesn't cause FP?

See these:

https://github.com/uBlockOrigin/uAssets/commit/aaddd2b9a110da3ee8ee3f39a5f4ac84cd1653ba

@yourduskquibbles where I found "followers"?

omg I got too much overthink, instagram.com##.Yx5HN work for me. however that element similar to logout popup
IMG_20201210_022822

~www.instagram.com##.Yx5HN:not(h3:has-text(Log)) is this good?~

Edit
found another issue, when selecting post menu
Screenshot_2020-12-10-02-38-49-066_org mozilla fenix

~so maybe www.instagram.com##.Yx5HN:not(h3:has-text(Log)):not(:has(.fPMEg.pbNvD)) look good?~ no, it don't

IMO still can generate heavy blinks with push notifications.

but good know:

##.Yx5HN.RnEpo = almost any instagram pop-up

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Jose1971AB picture Jose1971AB  路  3Comments

ghost picture ghost  路  3Comments

terrorist96 picture terrorist96  路  3Comments

KiLL4FuNK picture KiLL4FuNK  路  4Comments

pepablock picture pepablock  路  4Comments