Extension:Javascript
From Organic Design wiki
<?php
- Extension:JavascriptTemplate:Php
- - Licenced under LGPL (http://www.gnu.org/copyleft/lesser.html)
- - Author: http://www.organicdesign.co.nz/nad
- - Started: 2007-06-25, see article history
if (!defined('MEDIAWIKI')) die('Not an entry point.');
define('JAVASCRIPT_VERSION','0.0.0, 2007-06-25');
$wgExtensionFunctions[] = 'wfSetupJavascript';
$wgExtensionCredits['other'][] = array( 'name' => 'Javascript', 'author' => 'User:Nad', 'description' => 'Handles the loading of Javascript files', 'url' => 'http://www.mediawiki.org/wiki/Extension:Javascript', 'version' => JAVASCRIPT_VERSION );
- Notes:
- Load all files in $JavascriptDirectory into $JavascriptScripts using filename as key
- Other extensions can add to the list if they need to
- After all extenions are loaded and $wgOut is established, add all the script
function wfSetupJavascript() { global $wgOut,$JavascriptDirectory,$JavascriptScripts; }
?>