Create a vector 2022 skin with filtering on pages not so safe for work. This skin will put a spoiler on a picture like on discord.
Description
Event Timeline
FYI, just a few hours ago svwiki added a gadget doing this, perhaps it could be resued or inspiration. The gadget is: https://sv.wikipedia.org/wiki/MediaWiki:Gadget-sensitiveViewer.js and uses a json file where the community can list the images they want to blur.
I adapted the Swedish sensitiveViewer script for use on the Dutch Wikipedia. While implementing it, I made several major improvements and bug fixes that you might consider incorporating into the original version. Here is a summary of the new features I added:
- Interactive "Reveal" Button: Instead of just blurring the image permanently, the script now overlays a warning button directly on top of the blurred image (e.g., "Warning: Sensitive image"). Clicking this button instantly removes the blur and the button itself, allowing users to choose whether they want to see the image. (Depending on the image size it blurs, gives a short message or the full message)
- Support for Dynamic Content (Popups/Search): I added a MutationObserver to ensure that images loaded dynamically after the initial page load are also correctly identified and blurred. This works for the Page Preview popups (mwe-popups), the search bar typeahead dropdown (cdx-menu), and dynamically loaded search results.
- Handling of Small Thumbnails: Since overlaying a large button on tiny thumbnails (like in the search dropdown results) makes the page look messy, the script detects the context or size of the image. For tiny thumbnails (.cdx-thumbnail__image), it solely applies the blur without appending the interactable overlay button. For slightly larger thumbnails (like on the Special:Search page), it dynamically shortens the warning text and shrinks the font size via CSS to make it fit appropriately.
You can find the updated code on https://nl.wikipedia.org/wiki/MediaWiki:Gadget-sensitiveViewer.js
Perhaps there could be some relation to/use of the existing https://nl.wikipedia.org/wiki/MediaWiki:Bad_image_list ?
@ItsNyoty: If tasks are done tasks are done. :) If you want to have stuff "visible on board", please adjust the view of the board to show all - thanks!