Discourse Spoiler Alert provides the ability to hide content marked with a [spoiler] tag in posts.
Install Guide
This plugin is bundled with Discourse core. There is no need to install the plugin separately.
Enabling Spoiler Alert
This plugin is default enabled once installed but can be disabled/enabled from its settings, accessed from your admin/plugins page:
Features
Once enabled it adds a ‘Blur Spoiler’ option to the menu in the composer’s formatting bar. Simply highlight the text you’d like to blur and select ‘blur spoiler’ and it will wrap the selected text in the necessary [spoiler] tags:
[spoiler]
I wanna be your vacuum cleaner
Breathing in your dust
I wanna be your Ford Cortina
I will never rust
If you like your coffee hot
Let me be your coffee pot
You call the shots
I wanna be yours
https://johncooperclarke.com/poems/i-wanna-be-yours
[/spoiler]
I wanna be your vacuum cleaner
Breathing in your dust
I wanna be your Ford Cortina
I will never rust
If you like your coffee hot
Let me be your coffee pot
You call the shots
I wanna be yours
Clicking on the blur will reveal the hidden text, and clicking again will re-blur it.
It also works for images:
(to re-blur an image that is large enough to generate a lightbox, you can click on the adjacent white space or refresh the page)
Is there anyway to edit the contents of how the spoiler preview looks? The current implementation looks nice, but it doesn’t abstract enough as far as what it’s spoiling.
Here’s an example from a thread I made, where users can upload their screenshots. If the screenshot is a spoiler, it needs to be tagged as such. As you can tell, the current implementation doesn’t really work in the context of spoiler tagging screenshots of critical moments in games, movies, etc.
Anyone who is familiar with the game I shared would immediately know what it is.
Edit: It’s also come to my attention that if any user clicks the edit history of a post that contains spoilers, the edit history will not spoiler tag the contents.
이것이 별도의 버그 리포트로 가치가 있는지 확실하지 않지만, 채팅 푸시 알림을 통해 스포일러 텍스트가 다른 모든 경우와 달리 가려지지 않는다는 사실을 깨달았습니다. Chat::Message#push_notification_excerpt는 원시 마크다운을 잘라내고, 스포일러를 this is a chat notification [spoiler]and this is the spoiler[/spoiler]처럼 문자 그대로 출력합니다. 알림에 스포일러 전체가 출력된다면 스포일러 태그의 목적이 사실상 무색해지죠! 스포일러 경고의 :reduce_excerpt가 채팅 메시지의 경우 포럼 게시글과 달리 완전히 우회되는 것 같아 실수처럼 보입니다. 채팅에서는 그 외에는 정상적으로 작동합니다! 문제가 있는 것은 푸시 알림입니다.