diff options
author | Brian Evans <grknight@gentoo.org> | 2019-04-19 10:11:32 -0400 |
---|---|---|
committer | Brian Evans <grknight@gentoo.org> | 2019-04-19 10:11:32 -0400 |
commit | a35049f14ed3c6d78253568277969aaa4814c0eb (patch) | |
tree | cac256cd6947aa6990e2e169d000af4d1ab5f0c9 /SkinTyrian.php | |
parent | Optimize code a bit (diff) | |
parent | Remove deprecated functions (diff) | |
download | skin-tyrian-a35049f14ed3c6d78253568277969aaa4814c0eb.tar.gz skin-tyrian-a35049f14ed3c6d78253568277969aaa4814c0eb.tar.bz2 skin-tyrian-a35049f14ed3c6d78253568277969aaa4814c0eb.zip |
Merge branch 'wikitest'v1.30.1.3
Signed-off-by: Brian Evans <grknight@gentoo.org>
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); + } } |