This extension gives the readers a chance not to accidentally read any spoiler information until they are prepared to do so. An example of what a spoiler tag is would be visible here. The tag is only legible once the user mouse’s over the content. It would be most useful for author’s who write movie reviews and would like to guard their reader’s from sensitive information such as plot twists or endings.
| Vendor | MindTouch |
| Type | Script |
| Categories | User Interface |
| Requires | MindTouch Deki 1.8.3 or later |
| Status | Stable |
| License | Free/Open Source |
| Manifest | http://scripts.mindtouch.com/spoiler.xml |
Table of Contents
This extension contains a function for embedding spoiler tags.
See also How to add a script, Using the Extension Dialog, Learn about DekiScript, Extensions Directory.
Insert a spoiler tag that hides sensitive text until the mouse hovers over it.
Parameters:
| Name | Type | Description |
| text | str | Spoiler text to hide. |
<extension>
<title>MindTouch Spoiler Extension</title>
<label>Spoiler</label>
<copyright>Copyright (c) 2006-2009 MindTouch, Inc.</copyright>
<description>This extension contains a function for embedding spoiler tags.</description>
<uri.help>http://wiki.developer.mindtouch.com/MindTouch_Deki/Extensions/Spoiler</uri.help>
<function>
<name>spoiler</name>
<description>Insert a spoiler tag that hides sensitive text until the mouse hovers over it.</description>
<param name="text" type="str">Spoiler text to hide.</param>
<return>
<html xmlns:eval="http://mindtouch.com/2007/dekiscript">
<body>
<span style="color: #000; background-color: #000" onmouseover="this.style.color='#FFF';" onmouseout="this.style.color=this.style.backgroundColor='#000'"><eval:expr>args.text</eval:expr></span>
</body>
</html>
</return>
</function>
</extension>