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)
Discourse Spoiler Alert è ora incluso in Discourse core, quindi questo plugin non dovrà più essere installato separatamente.
Se self-host, dovresti vedere alcune informazioni nella tua dashboard su come rimuoverlo dal tuo app.yml.
\u003e:discourse2: Ospitato da noi? Questa modifica non ti influenzerà in alcun modo. Puoi continuare a goderti questo plugin senza preoccuparti di nulla.
C’è un modo per modificare l’aspetto dell’anteprima dello spoiler? L’implementazione attuale è bella, ma non astrae abbastanza per quanto riguarda ciò che sta spoilerando.
Ecco un esempio da un thread che ho creato, dove gli utenti possono caricare i loro screenshot. Se lo screenshot è uno spoiler, deve essere contrassegnato come tale. Come puoi vedere, l’implementazione attuale non funziona davvero nel contesto del tagging spoiler di screenshot di momenti critici nei giochi, film, ecc.
Chiunque abbia familiarità con il gioco che ho condiviso saprebbe immediatamente di cosa si tratta.
Modifica: Mi è anche stato segnalato che se un utente clicca sulla cronologia delle modifiche di un post che contiene spoiler, la cronologia delle modifiche non contrassegnerà spoiler i contenuti.