unable to hide smileys, avis, sigs and images

Ed MOTHEREFFING G

Chances make champions
Joined
Sep 27, 2012
Messages
15,899
Reputation
3,883
Daps
56,662
Reppin
206 x 734
yeah i just made a similar thread below regarding vulgarity. It seems Monday morning kind of exposed a lot of this stuff for us workday warriors.

I'm logging off and using my phone until thats corrected :whoa:
 

bnew

Veteran
Joined
Nov 1, 2015
Messages
63,087
Reputation
9,641
Daps
172,661
hide smilies and profile pics on the coli. option to hide giphy.com gifs too.

This bookmarklet is a small script that lets you hide and show specific images on any webpage you visit. It works by toggling the visibility of the images when you click it: the first click hides the images, and the second click restores them to their original state. It's like a "hide and seek" feature for images.

What the Bookmarklet Does:​

  1. Finds and Hides Images:
    • The bookmarklet looks at every image (<img> tag) on the webpage.
    • It checks if the URL (the src attribute) of the image matches certain keywords or patterns. If it matches, it hides the image.
    • For example, it can hide images that come from specific parts of the website, like smilies or avatars from thecoli.com.
  2. Toggles Visibility (Hide and Show):
    • When you click the bookmarklet, it checks all the images on the page.
    • The first time you click it, the images that match the keywords (like smilies or avatars) will disappear.
    • If you click the bookmarklet again, the hidden images will reappear.
    • Every time you click, the visibility of the images will toggle between hidden and visible.
  3. Matches Image URLs Based on Keywords:
    • Instead of hardcoding exact URLs, it uses keywords to match images. This way, it can hide images that share a common URL pattern.
    • For example:
      • Images with the URL containing "thecoli.com/styles/default/xenforo/smilies/" will be hidden (these are likely emoticons or smilies).
      • Images with the URL containing "thecoli.com/data/avatars/" will also be hidden (these are likely profile pictures or avatars).
    • You can easily add or change these keywords if you want to match different images or other parts of the website.
  4. Optional Giphy Image Hiding:
    • If you want to hide animated GIFs from Giphy (a popular GIF-sharing website), you can enable this feature by changing a setting.
    • When you set the hideGiphy option to true, all images from giphy.com will be hidden as well.
  5. Tracks Hidden Images:
    • The bookmarklet remembers which images have been hidden, so when you click again, it knows which images to show or hide.
    • It uses a special map to track the visibility of each image. The map stores whether an image is hidden or shown, and it updates each time you click the bookmarklet.

How It Works (Step-by-Step):​

  1. Create the Bookmarklet:
    • You add the bookmarklet to your browser’s bookmarks bar. It’s just a little piece of code saved as a bookmark.
  2. Click the Bookmarklet:
    • When you visit a webpage, you click on the bookmarklet. The script runs and starts looking at all the images on the page.
  3. Hide the Images:
    • The first time you click it, it hides any images that match the keywords you’ve set (like smilies or avatars).
  4. Click Again to Restore:
    • When you click the bookmarklet again, the images that were hidden will be restored to their original state (visible again).
  5. Toggling:
    • Every click will toggle the images between being hidden and visible. This is like turning them on and off.

Example Use Case:​

Let’s say you’re reading a thread on a forum like thecoli.com, and there are a lot of distracting images like smilies and avatars that you don’t want to see right now. You can click the bookmarklet, and it will hide all those distracting images. Later, if you decide you want to see them again, you click the bookmarklet once more, and they’ll be back. It’s an easy way to clear up distractions without needing to reload the page.

Why Would You Use This Bookmarklet?​

  • Hide Distractions: If there are lots of images on the page that you don’t need to see (like emoticons, avatars, or GIFs), you can hide them temporarily.
  • Save Bandwidth: If you’re on a slow internet connection, hiding images can help the page load faster and reduce data usage.
  • Improved Focus: If you need to focus on the text content of a page and not on images, this tool can help you focus by hiding the images.
  • Control Over Content: It gives you control over what images you want to see and what you don’t, without having to reload or change the page.

How to Modify:​

  • Add More Keywords: If you want to hide more types of images, you can add more URL patterns to the imgKeywords array.
  • Enable Giphy Option: You can choose whether or not to hide images from Giphy. If you set hideGiphy = true, all images from giphy.com will be hidden.

Simple Summary:​

The bookmarklet lets you hide or show specific images on any webpage you visit. By clicking it once, you can hide distracting images, like smilies or avatars. Click it again to make the images visible again. It helps you clear distractions or save data, and it works on images that match certain parts of their URLs.
Let me know if you need more details or have other questions!


updated 1/8/25
restores images when ran again



userscript with button to activate/deactivate:



original 12/16/24


added 1/8/24
doesn't hide by dimensions.


7Al6Hfa.gif
 
Top