Hacker News new | ask | show | jobs
by d3vr 3044 days ago
You're right, I forgot to add a viewimage.min.js. I tried on Chrome mobile, but it just does a Google search, didn't know inline javascript worked on mobile browsers.

Here's the bookmarklet source for now:

javascript:void%20function(){function%20isElementVisible(el){var%20rect=el.getBoundingClientRect(),vWidth=window.innerWidth||doc.documentElement.clientWidth,vHeight=window.innerHeight||doc.documentElement.clientHeight,efp=function(x,y){return%20document.elementFromPoint(x,y)};return%20rect.right%3C0||rect.bottom%3C0||rect.left%3EvWidth||rect.top%3EvHeight%3F!1:el.contains(efp(rect.left,rect.top))||el.contains(efp(rect.right,rect.top))||el.contains(efp(rect.right,rect.bottom))||el.contains(efp(rect.left,rect.bottom))}%22undefined%22==typeof%20window.isElementVisible;{var%20imgs=document.querySelectorAll(%22.irc_mi%22);imgs.forEach(function(img){isElementVisible(img)%26%26window.open(img.src)})}}();