mirror of
https://github.com/StarCitizenTools/mediawiki-extensions-TabberNeue.git
synced 2024-11-27 17:50:55 +00:00
Potential resource loader fixes for cache issues.
This commit is contained in:
parent
317539693e
commit
3fb66106dd
|
@ -35,7 +35,7 @@ class TabberHooks {
|
||||||
* @return string HTML
|
* @return string HTML
|
||||||
*/
|
*/
|
||||||
static public function renderTabber($input, array $args, Parser $parser, PPFrame $frame) {
|
static public function renderTabber($input, array $args, Parser $parser, PPFrame $frame) {
|
||||||
RequestContext::getMain()->getOutput()->addModules('ext.Tabber');
|
$parser->getOutput()->addModules('ext.Tabber');
|
||||||
|
|
||||||
$arr = explode("|-|", $input);
|
$arr = explode("|-|", $input);
|
||||||
foreach ($arr as $tab) {
|
foreach ($arr as $tab) {
|
||||||
|
|
|
@ -36,7 +36,7 @@ $wgAutoloadClasses['TabberHooks'] = "{$extDir}/Tabber.hooks.php";
|
||||||
|
|
||||||
$wgHooks['ParserFirstCallInit'][] = 'TabberHooks::onParserFirstCallInit';
|
$wgHooks['ParserFirstCallInit'][] = 'TabberHooks::onParserFirstCallInit';
|
||||||
|
|
||||||
$wgResourceModules['ext.Social'] = [
|
$wgResourceModules['ext.Tabber'] = [
|
||||||
'localBasePath' => __DIR__,
|
'localBasePath' => __DIR__,
|
||||||
'remoteExtPath' => 'Tabber',
|
'remoteExtPath' => 'Tabber',
|
||||||
'styles' => ['css/tabber.css'],
|
'styles' => ['css/tabber.css'],
|
||||||
|
|
18
js/tabber.js
18
js/tabber.js
|
@ -346,24 +346,12 @@ function tabberAutomatic(tabberArgs) {
|
||||||
} /*==================================================*/
|
} /*==================================================*/
|
||||||
|
|
||||||
function tabberAutomaticOnLoad(tabberArgs) {
|
function tabberAutomaticOnLoad(tabberArgs) {
|
||||||
/* This function adds tabberAutomatic to the window.onload event,
|
|
||||||
so it will run after the document has finished loading.
|
|
||||||
*/
|
|
||||||
var oldOnLoad;
|
|
||||||
if (!tabberArgs) {
|
if (!tabberArgs) {
|
||||||
tabberArgs = {};
|
tabberArgs = {};
|
||||||
} /* Taken from: http://simon.incutio.com/archive/2004/05/26/addLoadEvent */
|
|
||||||
oldOnLoad = window.onload;
|
|
||||||
if (typeof window.onload != 'function') {
|
|
||||||
window.onload = function() {
|
|
||||||
tabberAutomatic(tabberArgs);
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
window.onload = function() {
|
|
||||||
oldOnLoad();
|
|
||||||
tabberAutomatic(tabberArgs);
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
jQuery(function() {
|
||||||
|
tabberAutomatic(tabberArgs);
|
||||||
|
});
|
||||||
} /*==================================================*/
|
} /*==================================================*/
|
||||||
/* Run tabberAutomaticOnload() unless the "manualStartup" option was specified */
|
/* Run tabberAutomaticOnload() unless the "manualStartup" option was specified */
|
||||||
if (typeof tabberOptions == 'undefined') {
|
if (typeof tabberOptions == 'undefined') {
|
||||||
|
|
Loading…
Reference in a new issue