From fc74787b781221f0a7920077323f4d9ebf0f7421 Mon Sep 17 00:00:00 2001 From: Valentin Silytuin Date: Tue, 21 Jan 2025 15:43:11 +0400 Subject: [PATCH] Prettier for JS --- index.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/index.js b/index.js index ec1f326..6b666bc 100644 --- a/index.js +++ b/index.js @@ -100,7 +100,7 @@ const setVideoSize = (gallery) => { const hide = async (duration = 500, easing = 'linear') => { const gallery = document.body.querySelector('.advdominion-lg'); - await gallery.animate([{opacity: 1}, {opacity: 0}], { + await gallery.animate([{ opacity: 1 }, { opacity: 0 }], { duration, easing, }).finished; @@ -121,14 +121,14 @@ const show = async (duration = 500, easing = 'linear') => { margin-right: ${getScrollbarWidth()}px `; - await gallery.animate([{opacity: 0}, {opacity: 1}], { + await gallery.animate([{ opacity: 0 }, { opacity: 1 }], { duration, easing, }).finished; }; const init = async (items = [], options = {}, index = 0) => { - const [{default: Swiper}, {Navigation, Pagination}] = await Promise.all([ + const [{ default: Swiper }, { Navigation, Pagination }] = await Promise.all([ import('swiper'), import('swiper/modules'), ]); @@ -244,7 +244,7 @@ const init = async (items = [], options = {}, index = 0) => { ${options.navigation || ''} - ` + `, ); const gallery = document.body.querySelector('.advdominion-lg'); @@ -257,7 +257,7 @@ const init = async (items = [], options = {}, index = 0) => { const swiper = new Swiper( gallery.querySelector('.advdominion-lg__container'), - Object.assign({modules: [Navigation, Pagination], init: false, initialSlide: index}, options.swiper) + Object.assign({ modules: [Navigation, Pagination], init: false, initialSlide: index }, options.swiper), ); swiper.on('init', function () { @@ -304,7 +304,7 @@ const init = async (items = [], options = {}, index = 0) => { }, { once: true, - } + }, ); };