File manager - Edit - /home/contenidosenred/public_html/OD/wp-content/plugins/masvideos/assets/js/frontend/single-video.min.js
Back
jQuery(function(o){if("undefined"==typeof masvideos_single_video_params)return!1;o("body").on("init","#rating",function(){o("#rating").hide().before('<p class="stars"><span><a class="star-1" href="#">1</a><a class="star-2" href="#">2</a><a class="star-3" href="#">3</a><a class="star-4" href="#">4</a><a class="star-5" href="#">5</a><a class="star-6" href="#">6</a><a class="star-7" href="#">7</a><a class="star-8" href="#">8</a><a class="star-9" href="#">9</a><a class="star-10" href="#">10</a></span></p>')}).on("click","#respond p.stars a",function(){var e=o(this),t=o(this).closest("#respond").find("#rating"),i=o(this).closest(".stars");return t.val(e.text()),e.siblings("a").removeClass("active"),e.addClass("active"),i.addClass("selected"),!1}).on("click","#respond #submit",function(){var e=o(this).closest("#respond").find("#rating"),t=e.val();if(0<e.length&&!t&&"yes"===masvideos_single_video_params.review_rating_required)return window.alert(masvideos_single_video_params.i18n_required_rating_text),!1}),o("#rating").trigger("init");function t(e,t){this.$target=e,this.$images=o(".masvideos-gallery__image",e),0!==this.$images.length?(e.data("video_gallery",this),this.photoswipe_enabled="undefined"!=typeof PhotoSwipe&&masvideos_single_video_params.photoswipe_enabled,t&&(this.photoswipe_enabled=!1!==t.photoswipe_enabled&&this.photoswipe_enabled),this.initPhotoswipe=this.initPhotoswipe.bind(this),this.getGalleryItems=this.getGalleryItems.bind(this),this.openPhotoswipe=this.openPhotoswipe.bind(this),this.photoswipe_enabled&&this.initPhotoswipe()):this.$target.css("opacity",1)}t.prototype.initPhotoswipe=function(){this.$target.on("click",".masvideos-gallery__image a",this.openPhotoswipe)},t.prototype.getGalleryItems=function(){var e=this.$images,a=[];return 0<e.length&&e.each(function(e,t){var i=o(t).find("img");if(i.length){var s={src:i.attr("data-large_image"),w:i.attr("data-large_image_width"),h:i.attr("data-large_image_height"),title:i.attr("data-caption")?i.attr("data-caption"):i.attr("title")};a.push(s)}}),a},t.prototype.openPhotoswipe=function(e){e.preventDefault();var t,i=o(".pswp")[0],s=this.getGalleryItems();t=o(e.target).closest(".masvideos-gallery__image");var a=o.extend({index:o(t).index(),addCaptionHTMLFn:function(e,t){return e.title?(t.children[0].textContent=e.title,!0):(t.children[0].textContent="",!1)}},masvideos_single_video_params.photoswipe_options);new PhotoSwipe(i,PhotoSwipeUI_Default,s,a).init()},o.fn.masvdieos_video_gallery=function(e){return new t(this,e||masvideos_single_video_params),this},o(".masvideos-video-gallery").each(function(){o(this).trigger("masvdieos-video-gallery-before-init",[this,masvideos_single_video_params]),o(this).masvdieos_video_gallery(masvideos_single_video_params),o(this).trigger("masvdieos-video-gallery-after-init",[this,masvideos_single_video_params])})});
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings