1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to hide element - Greasemonkey

Discussion in 'Scripting' started by Scorpion Ghost, Aug 8, 2017.

  1. Scorpion Ghost

    Scorpion Ghost Senior Member

    Joined:
    Mar 22, 2013
    Messages:
    1,026
    Likes Received:
    218
    Occupation:
    Internet!
    Location:
    On the Interwebz
    Home Page:
    Hey guys. I'm looking to permanently hide an element on this website I visit. I know this can be done with Greasemonkey, but I don't know how to do it.

    Here is the code:

    What I need is to hide this entire element, but the reason it's hidden must be the img src or the "Anti-Bots ne pas cliquer" text. If I use any of the divs to hide it, or ID or anything else, it will hide content that I don't want hidden also. The img src or that text must be the association why the script will hide the element.

    I'm willing to do it any way I can. Greasemonkey sounds like it could do it. I also tried element hiding with Adblock, and it won't let me hide by using either of those elements.

    I hope I'm clear and that anyone can help.
     
  2. HoNeYBiRD

    HoNeYBiRD Jr. VIP Jr. VIP

    Joined:
    May 1, 2009
    Messages:
    6,954
    Likes Received:
    7,984
    Gender:
    Male
    Occupation:
    Geographer, Tourism Manager
    Location:
    Ghosted
    Try uBlock Origin. I'm using it instead of Adblock Pro for a great while now and if i can remember well, those two don't operate the exact same way, when it comes to hiding elements, so it worth a shot.
     
  3. Scorpion Ghost

    Scorpion Ghost Senior Member

    Joined:
    Mar 22, 2013
    Messages:
    1,026
    Likes Received:
    218
    Occupation:
    Internet!
    Location:
    On the Interwebz
    Home Page:
    Actually, what I did was installed Adblock while having the page in question opened on a different tab, then tested the element inspector, realized it won't work (it can hide elements, but not this specifically for my need), and then upon refreshing the page realized the site won't work if I have Adblock. And it also detects Ublock, so that won't work either.
     
  4. Scorpion Ghost

    Scorpion Ghost Senior Member

    Joined:
    Mar 22, 2013
    Messages:
    1,026
    Likes Received:
    218
    Occupation:
    Internet!
    Location:
    On the Interwebz
    Home Page:
    What the script would technically have to do is to say, "start with span text or img src, and hide the elements above it in order of div/center/div/div/div/div."

    That's it from the technical aspect frankly.
     
  5. HoNeYBiRD

    HoNeYBiRD Jr. VIP Jr. VIP

    Joined:
    May 1, 2009
    Messages:
    6,954
    Likes Received:
    7,984
    Gender:
    Male
    Occupation:
    Geographer, Tourism Manager
    Location:
    Ghosted
    Bummer.

    You can search for "hide element browser addon" in Google:
    https://addons.mozilla.org/en-US/firefox/addon/hideelement/
    https://chrome.google.com/webstore/...lement/jcgpghgjhhahcefnfpbncdmhhddedhnk?hl=en
    https://chrome.google.com/webstore/detail/contentblockhelper/ahnpejopbfnjicblkhclaaefhblgkfpd?hl=en
    The first two aren't ad blockers, so they won't get picked up by the site and maybe one of those will work.

    Or try to hide the fact that you're using an ad blocker: http://reek.github.io/anti-adblock-killer/ and try uBlock Origin after that.
     
  6. Scorpion Ghost

    Scorpion Ghost Senior Member

    Joined:
    Mar 22, 2013
    Messages:
    1,026
    Likes Received:
    218
    Occupation:
    Internet!
    Location:
    On the Interwebz
    Home Page: