44
Phlisg
6y

Being majestic as a web developer:

1. Hacking through the DevTools to remove the anti-AdBlocker overlay + vertical scrolling paralysis on news website
2. See point 1

Comments
  • 3
    Its super easy
  • 2
    Disable JS to avoid a script from removing the entire page. I know some sites are total asses that do that if they detect that you’re using AdBlock.
  • 5
    Being majestic as a not web developer: reading the site with curl
  • 3
    @BindView And then pandoc it into a markdown file :P
  • 2
  • 4
    I have to learn a lot
  • 2
    Having custom css rules for websites doing that and blocking the popup by css
  • 1
    @ShahriyarRulez This! Where do you do that? Enlighten us master!
  • 2
    @ShahriyarRulez @TheCapeGreek It depends on how they implemented it. Just check the DOM and try to see what has happened to it. Disabling JS in that page may also help.
  • 1
    @Japorized fair enough. Thought there was something more to it, or a more "standard" way.
  • 2
    @TheCapeGreek @ShahriyarRulez basically, what I encountered so far is that a script detects you have AdBlock and proceeds to lock html, body (and rarely others) by adding the CSS rule overflow-y: hidden (overflow:hidden)

    So first task: remove the eventual element overlaying the page by deleting it's root in the DevTools, then find body and disable overflow rules, do the same for html if relevant, and the vertical scrollbar should be back and you can scroll :)
  • 1
    @Phlisg Thanks! Haven't seen it on too many sites yet (or I just leave) but a redirect from certain site versions to local ones (Food network tries to force the SA version on me) also uses these techniques.
  • 2
    For most of the sites, I hide all the divs on the first level

    `body > div { display: none; }`

    They usually have a div with id "wrapper" or "main" or something like that. Show it again:

    `body > #wrapper, body > #main { display: block; }`

    Or add whatever they use.

    Last thing, add the scroll back.

    `html, body { overflow: auto; overflow-y: auto !important; }
  • 2
    @Wack Yeah I've thought about adding a html, body rule with !important, another technique :)

    you could also do body > div:not(#wrapper):not(#main) etc :D
  • 2
    @Phlisg would be another option. Some sites add their own !important stuff. So sometimes you'll have to add other selectors.
Add Comment