TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Spoiler Alert – JQuery plugin for sensitive content

99 点作者 joshbuddy超过 12 年前

15 条评论

underwater超过 12 年前
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 未加载
anonymouz超过 12 年前
If JavaScript is disabled it falls back to simply displaying the spoiler. That's a really bad default.
评论 #5283231 未加载
评论 #5278319 未加载
DigitalSea超过 12 年前
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.
pizza超过 12 年前
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 未加载
thegrimmest超过 12 年前
Does not seem to be working in Chrome for Android, version 18.0.1025469. Spoilers do not appear blurred.
评论 #5277775 未加载
javajosh超过 12 年前
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 未加载
beefsack超过 12 年前
Fantastic work, looks really sweet too. Would be great to see without the jQuery dependency if possible.
评论 #5277573 未加载
callmecosmas超过 12 年前
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.
awad超过 12 年前
Doesn't seem to work on Safari for me, is fine in Chrome though.
评论 #5277424 未加载
nemesisj超过 12 年前
Spoiler alert: doesn't work on iOS. Tapping just reveals it.
评论 #5277819 未加载
thesis超过 12 年前
Works for me in Chrome. Really cool.
评论 #5277456 未加载
Mahn超过 12 年前
Initial thoughts before clicking: "Oh, I bet it's an effect inspired on Quora". Bingo.
ProNihilist超过 12 年前
Does not work on Opera 12.14 (thank you for trying to be accommodating though <3)
评论 #5288966 未加载
dmak超过 12 年前
Sweet! I initially thought it was a security thing after reading the title.
ankit84超过 12 年前
Why they did not test for IE 10?