Вырезать код из Webpack
Есть часть сгенерированного кода:
function r() { function t(t) { (void 0 === swiper_options[t].autoplayDisableOnInteraction || swiper_options[t].autoplayDisableOnInteraction) && e(t) } function e(t) { clearTimeout(r[t]), s[t] = !0, $(swiper_options[t].id_st + " .swiper_custom_bar").hide() } function i(t) { if (clearTimeout(r[t]), s[t]) return !1; a[t] = 0, o[t] = !1, r[t] = setInterval(function () { !1 === o[t] ? (a[t] += 1e3 / swiper_options[t].bar_time, $(swiper_options[t].id_st + " .swiper_custom_bar").css({width: a[t] + "%"}), a[t] >= 100 && (clearTimeout(r[t]), void 0 !== swiper_options[t].autoplay && swiper_options[t].autoplay || n[t].slideNext())) : (a[t] = 0, (void 0 === swiper_options[t].autoplayDisableOnInteraction || swiper_options[t].autoplayDisableOnInteraction) && clearTimeout(r[t])) }, 10) } var n = [], a = [], o = [], r = [], s = []; "undefined" != typeof swiper_options && swiper_options.length && $.each(swiper_options, function (a, r) { if (void 0 === r.st_inited) { var s = $.extend({}, X, r); void 0 !== s.st_full_screen && s.st_full_screen && $(window).height() > s.st_height && $(r.id_st).height($(window).height()), n[a] = new Swiper(r.id_st, s), swiper_options[a].st_inited = !0, void 0 !== s.custom_progress_bar && (i(a), n[a].on("slideChangeStart", function (t) { i(a) }), n[a].on("touchStart", function (e) { o[a] = !0, t(a) }), n[a].on("touchEnd", function (t) { o[a] = !1 }), n[a].on("autoplayStop", function (t) { e(a) })) } }) } Наверное все сделано с использованием webpack. Как эту часть кода вырезать и использовать как независимый скрипт? |
Часовой пояс GMT +3, время: 02:36. |