From ce884ff98ca11638d2658c8dff6ad00f0efd411f Mon Sep 17 00:00:00 2001 From: wushin Date: Sat, 14 Feb 2015 12:04:54 -0600 Subject: Add Spoiler button to improve wiki page display --- extensions/Spoilers/Spoilers.php | 43 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 extensions/Spoilers/Spoilers.php (limited to 'extensions/Spoilers/Spoilers.php') diff --git a/extensions/Spoilers/Spoilers.php b/extensions/Spoilers/Spoilers.php new file mode 100644 index 0000000..247cfe4 --- /dev/null +++ b/extensions/Spoilers/Spoilers.php @@ -0,0 +1,43 @@ + __FILE__, + 'name' => 'Spoilers', + 'author' => 'Tim Aldridge', + 'descriptionmsg' => 'spoilers_description', + 'version' => '1.1', + 'license-name' => 'LGPLv3' + ); + +/******************************************/ +/* Language Strings, Page Aliases, Hooks */ +/******************************************/ +$extDir = dirname( __FILE__ ); + +$wgMessagesDirs['Spoilers'] = __DIR__ . '/i18n'; +$wgExtensionMessagesFiles['Spoilers'] = $extDir . "/Spoilers.i18n.php"; + +$wgAutoloadClasses['Spoilers'] = $extDir . "/Spoilers.hooks.php"; + +$wgResourceModules['ext.spoilers'] = array ( + 'styles' => array( 'css/spoilers.css' ), + 'scripts' => array( 'js/spoilers.js' ), + 'localBasePath' => __DIR__, + 'remoteExtPath' => 'Spoilers', + 'dependencies' => array() + ); + +$wgHooks['ParserFirstCallInit'][] = "Spoilers::onParserFirstCallInit"; +?> -- cgit v1.2.3-70-g09d2