文件操作 - zoo-product-embed.js
返回文件管理
返回主菜单
删除本文件
文件: /root/Desktop/OLD/temi wordpress/anon/assets/js/zoo-product-embed.js
编辑文件内容
/** * Product embed js * Allow control light box video on single product page */ (function ($) { 'use strict'; var player; if ($('.wrap-product-video.vimeo-embed')[0]) { player = new Vimeo.Player($('.wrap-product-video.vimeo-embed iframe')); } $(document).on('click', '.video-lb-control', function (e) { e.preventDefault(); $('.wrap-product-video').addClass('video-active'); $('.product-extended-button').addClass('active'); let window_w; window_w = $(window).width(); let frame_w, frame_h; frame_w = window_w > 1170 ? 1170 : window_w - 60; frame_h = frame_w * 9 / 16; $('.wrap-product-video iframe').width(frame_w); $('.wrap-product-video iframe').height(frame_h); if ($('.wrap-product-video.vimeo-embed')[0]) { player.play(); } }); $(document).on('click', '.mask-product-video', function () { $('.video-active').removeClass('video-active'); $('.product-extended-button').removeClass('active'); if ($('.wrap-product-video.vimeo-embed')[0]) { player.pause(); } }); $(window).resize(function () { if ($('.video-active')[0]) { let window_w; window_w = $(window).width(); let frame_w, frame_h; frame_w = window_w > 1170 ? 1170 : window_w - 60; frame_h = frame_w * 9 / 16; $('.wrap-product-video iframe').width(frame_w); $('.wrap-product-video iframe').height(frame_h); } }); })(jQuery); var player; function onYouTubePlayerAPIReady() { // create the global player from the specific iframe (#video) player = new YT.Player(jQuery('.wrap-product-video.youtube-embed iframe').attr('id'), { events: { // call this function when player is ready to use 'onReady':onPlayerReady } }); } function onPlayerReady(event) { jQuery(document).on('click', '.video-lb-control', function (e) { player.playVideo(); }); jQuery(document).on('click', '.mask-product-video', function () { player.pauseVideo(); }); }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件