>>822464While I'm at it again, I might well post my script again (>>714030) since the original thread got deleted.
(function() {
const links = document.getElementsByTagName("a");
for (let i = 0; i < links.length; i++) {
const link = links[i];
if (
link.href &&
link.href.match(/(\.png|\.jpg|\.jpeg|\.webp)$/) &&
link.children.length == 1 &&
link.children[0].tagName == 'IMG' &&
link.children[0].src.match('/static/spoiler_alunya.png$')
) {
const image = link.children[0];
function unspoiler(event) {
image.src = link.href;
function resize(event) {
const width = image.naturalWidth;
const height = image.naturalHeight;
const scale = Math.min(255/width, 255/height);
image.style.width = width*scale + 'px';
image.style.height = height*scale + 'px';
image.removeEventListener('load', resize)
}
image.addEventListener('load', resize);
image.removeEventListener('mouseover', unspoiler);
}
image.addEventListener('mouseover', unspoiler);
}
}
})();Paste this into your browser's console or make a bookmarklet so you can mouse over and unspoiler things.