From 8d6376fc495020a0031430e9f67edd36daedcf56 Mon Sep 17 00:00:00 2001 From: Tony Air Date: Wed, 9 Sep 2020 22:06:20 +0700 Subject: [PATCH] IMPR: minor loading updates --- src/js/meta-lightbox.js | 94 ++++++++++++++++++++++++----------------- 1 file changed, 56 insertions(+), 38 deletions(-) diff --git a/src/js/meta-lightbox.js b/src/js/meta-lightbox.js index 1926f33..9313afe 100755 --- a/src/js/meta-lightbox.js +++ b/src/js/meta-lightbox.js @@ -24,14 +24,14 @@ const MetaLightboxUI = (($) => { class MetaLightboxUI { static init() { - console.log(`Initializing: ${NAME}`); + console.log(`${NAME}: init ...`); const ui = this; ui.isMSIE = /*@cc_on!@*/ 0; try { ui.isHidpi = ui.is_hdpi(); } catch (e) { - console.log(ui); + console.log(`${NAME}: catch`); } $(`.js${NAME},[data-toggle="lightbox"],[data-lightbox-gallery]`).on( @@ -78,11 +78,6 @@ const MetaLightboxUI = (($) => { `[data-lightbox-gallery="${$link.data('lightbox-gallery')}"]`, ); - console.log( - `[data-lightbox-gallery="${$link.data('lightbox-gallery')}"]`, - ); - console.log($galleryItems); - if ($galleryItems.length === 1) { $('.meta-lightbox-nav').hide(); } else { @@ -284,29 +279,7 @@ const MetaLightboxUI = (($) => { } if (src) { - const $iframe = $('