News for hackers. Stuff that matters.
Re:Mozilla working on in-page popup blocker for Firefox by hotwire on Tuesday March 13, 2018 @07:41AM (#16575304)
I just have a bookmarklet to kill all "fixed" position divs.

I'm clicking it more and more these days - even those damn fixed navs that take up a stupid percentage of the screen give me the shits.

If clicking the bookmarklet doesn't get rid of your stupid modal newsletter sign up or annoying sticky nav, I'm just closing the tab.

Here's the bookmarklet btw:

javascript:(function()%7B(function () %7Bvar i%2C elements %3D document.querySelectorAll('body *')%3Bfor (i %3D 0%3B i < elements.length%3B i%2B%2B) %7Bif (getComputedStyle(elements%5Bi%5D).position %3D%3D%3D 'fixed') %7Belements%5Bi%5D.parentNode.removeChild(elements%5Bi%5D)%3B%7D%7D%7D)()%7D)()

Re:Mozilla working on in-page popup blocker for Firefox by yourduskquibble on Tuesday March 13, 2018 @07:54AM (#16575372)
You may also be interested in my filterlist[1] project for uBlock Origin which attempts to do this via CSS style overrides for many, many sites.

[1] https://github.com/yourduskquibbles/webannoyances

Re:Mozilla working on in-page popup blocker for Firefox by mikro2nd on Tuesday March 13, 2018 @08:57AM (#16575716)
Brilliant, and Thank You.

Ironically, though, this will probably limit severely the quantity and quality of data I can feed back to this Mozilla project via this add-on...

Re:Mozilla working on in-page popup blocker for Firefox by hotwire on Tuesday March 13, 2018 @08:01AM (#16575411)
holy shit dude.

if this is as awesome as it looks, i'm actually excited.

thank you.

Re:Mozilla working on in-page popup blocker for Firefox by yourduskquibble on Tuesday March 13, 2018 @08:45AM (#16575648)
No problem, I hope it works out for you! Feel free to spread the word to others as well as provide sites that are causing issues for you so I can add fixes to the list.
Re:Mozilla working on in-page popup blocker for Firefox by option_greek on Tuesday March 13, 2018 @03:00PM (#16578792)
Probably olark and other chat bot crap can be added too. They are mostly used these days for pushy sales people to hook casual browsers.
Re:Mozilla working on in-page popup blocker for Firefox by Santosh83 on Tuesday March 13, 2018 @08:46AM (#16575656)
Fantastic. You must submit your list to the uBlock Origin author for inclusion in the list of available filters.
Re:Mozilla working on in-page popup blocker for Firefox by yourduskquibble on Tuesday March 13, 2018 @09:05AM (#16575759)
gorhill is aware of it [0]... I don't want to be too pushy and would rather let him come to his own conclusion on whether to include or not.

[0] https://github.com/uBlockOrigin/uAssets/pull/872

Re:Mozilla working on in-page popup blocker for Firefox by hotwire on Saturday March 17, 2018 @12:12AM (#16605573)
Just want to say; I'm checking in after a few days of using it and... if i think about it, i guess i'm clicking that "killsticky" bookmark less and less.

its funny, suddenly i don't even have to think about it, which is what this is all about - reducing cognitive load.

re inclusion on ublock and the like: it should probably be an option that people can enable/disable; ublock is more about blocking ads/trackers, but i would wager that most people are annoyed with sticky stuff too.

ready for the next challenge?.... getting rid of sites that fuck with the default scroll behaviour ;)

thanks again :)

Re:Mozilla working on in-page popup blocker for Firefox by myfonj on Tuesday March 13, 2018 @10:09AM (#16576201)
Came across this as well [0]→[1].

(Slightly modernized version could be:)

    javascript:void([].forEach.call(document.querySelectorAll('body *'),e=>/fixed|sticky/.test(getComputedStyle(e).position)&&e.parentNode.removeChild(e)))
[0] https://news.ycombinator.com/item?id=16516126 [1] https://alisdair.mcdiarmid.org/kill-sticky-headers/
Re:Mozilla working on in-page popup blocker for Firefox by strkek on Tuesday March 13, 2018 @03:01PM (#16578800)
You can golf away 8 characters by replacing

    [].foreach.call(a, b) -> a.forEach(b)
... since the value returned by `querySelectorAll` has a `forEach` method. And 5 more if you replace:

    'body *' -> '*'
Re:Mozilla working on in-page popup blocker for Firefox by myfonj on Tuesday March 13, 2018 @03:40PM (#16579093)
Ah, thanks for headsup, I somewhat missed the moment NodeList got sufficiently widespread forEach support. Good to know. In fact my intention was just to add check for `sticky` value along the `fixed` one; the 'golfing' approach was just habitual laziness…
Re:Mozilla working on in-page popup blocker for Firefox by hotwire on Tuesday March 13, 2018 @05:42PM (#16580112)
that one looks better than the one i pasted - i've noticed that some sites are using "sticky" instead of "fixed" and my bookmarklet (which I copied off someone else) doesn't remove them.

thanks.

Re:Mozilla working on in-page popup blocker for Firefox by joosters on Tuesday March 13, 2018 @07:56AM (#16575383)
Me too! I cannot recommend this enough. IMO everyone should have this bookmark (or similar). As you say, it's most useful for removing static overlays that just get in the way of page content and take up screen space, but it can also get rid of pop-ups too.

It even works well on iOS/Safari !