Al_B on 16/6/2020 at 17:07
Should be clearer now - I'd added a censorship option and that had inadvertently broken the behaviour.
ZylonBane on 16/6/2020 at 17:24
Ah, I see. So does this do lazy loading, or does it let someone grind page load to a halt by spamming the forums with dozens of hidden images?
Al_B on 16/6/2020 at 18:50
No lazy loading but if someone posts loads of images that way then they'll earn a slap.
Nameless Voice on 16/6/2020 at 19:54
I notice that there's not actually any way to differentiate between a normal link and an expanding image.
Kolya on 17/6/2020 at 21:36
Lazy loading could work by exchanging the src attribute:
Code:
<a href="https://i.imgur.com/Wk6DTCn.jpg" style="display:block" onclick="(function(e){let el=e.nextSibling;if(el.hasAttribute('src'))el.removeAttribute('src');else el.setAttribute('src',el.getAttribute('data-src'))})(this);return false;">Unreliable reader</a><img data-src="https://i.imgur.com/Wk6DTCn.jpg">
jsfiddle: (
https://jsfiddle.net/KolyaKorruptis/uz3a0q4r/8/)
Kolya on 17/6/2020 at 21:46
@Nameless Voice It would be easy enough to style the link, but why would you need to know that?
zombe on 18/6/2020 at 07:57
Because one should never assume that clicking a link opens a new tab - i, for one, just discovered that TTLG does that for the first time ever. I always open any and all links in new tab manually (for consistency/sanity with every other darn site on the internet - you cannot assume "open in new page" behavior is default everywhere). That makes the behavior of the new link completely indistinguishable from the old - making it completely pointless. Which i would call a critical fault of even having it.
Kolya on 18/6/2020 at 12:23
Anarchic Fox asked for image links that open inline. That as is a valid request and not made pointless by your minor inconvenience of not being able to force them into a new tab right now.
These links can easily be made recognisable. Or they could possibly support opening in a new tab, when pressing Ctrl while clicking (which I assume you do). Anyway, give it some time and don't slam it as pointless right away just because it doesn't fit your particular use case.
Starker on 18/6/2020 at 12:54
You could manually write an instruction before the links. Otherwise, yeah, they'd be completely pointless for people who are used to opening links with the middle click.
Kolya on 18/6/2020 at 15:51
You seem a bit stuck on this being a link and your expectation of how a link should work. Think of them as buttons that load an inline image. Because with a little bit of styling, that's what they are.
Basically it's an interactive element. And it isn't pointless, just because it doesn't work like something else.