diff options
Diffstat (limited to 'SkinTyrian.php')
-rw-r--r-- | SkinTyrian.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/SkinTyrian.php b/SkinTyrian.php index edc0aa4..9a731ff 100644 --- a/SkinTyrian.php +++ b/SkinTyrian.php @@ -40,4 +40,20 @@ class SkinTyrian extends SkinTemplate { $out->addMeta('theme-color', '#54487a'); return true; } + + public function initPage( OutputPage $out ) { + parent::initPage( $out ); + $cdnURL = self::CDN_URL . 'bootstrap.min.js'; + $script = <<<EOS +function defer(method) { + if (window.jQuery) { + method(); + } else { + setTimeout(function() { defer(method) }, 50); + } +} +defer(function() { mw.loader.load( '$cdnURL'); }); +EOS; + $out->addInlineScript($script); + } } |