diff options
author | 2022-11-10 10:11:12 -0500 | |
---|---|---|
committer | 2022-11-10 10:11:12 -0500 | |
commit | 2abb4ac621261afcca2407e0fc02181a7a1fa1e9 (patch) | |
tree | 3f73b0299a8898458e14fe3eab03be42ca7dfc38 | |
parent | Ensure jquery is loaded as a resource (diff) | |
download | skin-tyrian-2abb4ac621261afcca2407e0fc02181a7a1fa1e9.tar.gz skin-tyrian-2abb4ac621261afcca2407e0fc02181a7a1fa1e9.tar.bz2 skin-tyrian-2abb4ac621261afcca2407e0fc02181a7a1fa1e9.zip |
Defer loading script
Signed-off-by: Brian Evans <grknight@gentoo.org>
-rw-r--r-- | TyrianTemplate.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/TyrianTemplate.php b/TyrianTemplate.php index 48819fc..93d8e73 100644 --- a/TyrianTemplate.php +++ b/TyrianTemplate.php @@ -205,7 +205,8 @@ class TyrianTemplate extends BaseTemplate { </div> </div> </footer> - <script src="https://assets.gentoo.org/tyrian/bootstrap.min.js"></script> + <script>function defer(method) { if (window.jQuery) { method(); } else { setTimeout(function() { defer(method) }, 50); } } + defer(function() { mw.loader.load( 'https://assets.gentoo.org/tyrian/bootstrap.min.js'); });</script> <?php } |