diff --git a/README.md b/README.md index b869a4e..3e6767d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ # Spoiler▓Alert This MediaWiki extension allows users to create spoiler tags that reveal content on click. - I am a spoiler +<spoiler> I am a spoiler </spoiler> diff --git a/extension.json b/extension.json index 000caf0..480dcb1 100644 --- a/extension.json +++ b/extension.json @@ -20,8 +20,6 @@ }, "ResourceModules": { "ext.spoileralert": { - "scripts": [ - ], "styles": [ "/modules/ext.spoileralert.css" ], diff --git a/includes/SpoilerAlertHooks.php b/includes/SpoilerAlertHooks.php index 3c9524f..ce59915 100644 --- a/includes/SpoilerAlertHooks.php +++ b/includes/SpoilerAlertHooks.php @@ -11,7 +11,7 @@ class SpoilerAlertHooks { } public static function onBeforePageDisplay( OutputPage &$out, Skin &$skin ) { - $out->addModules( ['ext.spoileralert'] ); + $out->addModuleStyles( ['ext.spoileralert'] ); return true; } } diff --git a/modules/ext.spoileralert.css b/modules/ext.spoileralert.css index 6d7043c..165bc98 100644 --- a/modules/ext.spoileralert.css +++ b/modules/ext.spoileralert.css @@ -8,3 +8,11 @@ .spoiler.revealed { color: white; } + +.spoiler:after { + content: " " +} + +.spoiler:before { + content: " " +}