TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Spoiler Alert – JQuery plugin for sensitive content

99 pointsby joshbuddyover 12 years ago

15 comments

underwaterover 12 years ago
You could achieve the same effect with a couple of lines of CSS. As a bonus you wouldn't pop up the same alert box six times during page load for Internet Explorer users.
评论 #5277747 未加载
anonymouzover 12 years ago
If JavaScript is disabled it falls back to simply displaying the spoiler. That's a really bad default.
评论 #5283231 未加载
评论 #5278319 未加载
DigitalSeaover 12 years ago
Not bad, but pretty buggy even in Chrome on Windows. Selecting the text sometimes doesn't de-blur it, hovering images only results in partial blur (I later realised you click to get it to work). Great idea, but definitely needs some more work before it can be considered a definitive solution for blurring out text and imagery. I forked the project and made some adjustments that were annoying me and submitted a pull request. The lack of semicolons and shorthand if statements bothered me, as did the lack of support for chainability as well. I might contribute a little more to it later on with some newer ideas and support for older browsers.
pizzaover 12 years ago
Wouldn't the spoiler still show up in Google searches? An alternative would be to obfuscate (i.e. randomly arrange the letters) the spoiler text and then make the script de-obfuscate it on-hover. Just a thought.
评论 #5277659 未加载
评论 #5277530 未加载
thegrimmestover 12 years ago
Does not seem to be working in Chrome for Android, version 18.0.1025469. Spoilers do not appear blurred.
评论 #5277775 未加载
javajoshover 12 years ago
Less blurry is a hint? Legibility is a binary value, and beyond a certain threshold of blur, the value is false. Period. Plus, that behavior is confusing - you should have a tool tip on hover, explaining that you need to click to reveal. You should also explain any cross-browser tricks you needed to do to get it to work, otherwise people will think this is trivial and pointless.
评论 #5277931 未加载
beefsackover 12 years ago
Fantastic work, looks really sweet too. Would be great to see without the jQuery dependency if possible.
评论 #5277573 未加载
callmecosmasover 12 years ago
Cool work but doesn't mix well with text selection. I'm not into js but I wonder if it would be easy to distinguish between clicking on one spot and clicking and dragging for say copy-pasting.
awadover 12 years ago
Doesn't seem to work on Safari for me, is fine in Chrome though.
评论 #5277424 未加载
nemesisjover 12 years ago
Spoiler alert: doesn't work on iOS. Tapping just reveals it.
评论 #5277819 未加载
thesisover 12 years ago
Works for me in Chrome. Really cool.
评论 #5277456 未加载
Mahnover 12 years ago
Initial thoughts before clicking: "Oh, I bet it's an effect inspired on Quora". Bingo.
ProNihilistover 12 years ago
Does not work on Opera 12.14 (thank you for trying to be accommodating though <3)
评论 #5288966 未加载
dmakover 12 years ago
Sweet! I initially thought it was a security thing after reading the title.
ankit84over 12 years ago
Why they did not test for IE 10?