dvadf
File manager - Edit - /home/centroca/public_html/wp/wp-content/plugins/nextgen-gallery/static/Lightbox/nextgen_custom_lightbox_tiktok_init.min.js
Back
(l=>{function i(){e&&window.console&&console.log.apply(console,["[NGG Custom Lightbox TikTok]"].concat(Array.prototype.slice.call(arguments)))}function a(t){var e;return window.ngg_video_gallery_settings?(e=window.ngg_video_gallery_settings,(t=t?String(t):null)&&e["gallery_"+t]?e["gallery_"+t]:e.global||{show_video_controls:!0,show_play_pause_controls:!0,autoplay_videos:!1}):{show_video_controls:!0,show_play_pause_controls:!0,autoplay_videos:!1}}function r(t){function e(){var t=n.find("video");t.length&&(t[0].pause(),t.attr("src","")),(t=n.find("iframe")).length&&t.attr("src",""),n.remove()}l("#ngg-custom-lightbox-overlay").remove();var n=l('<div id="ngg-custom-lightbox-overlay"></div>').css({position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"transparent",zIndex:999999,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"}),o=l('<button type="button" class="ngg-custom-lightbox-close">×</button>').css({position:"absolute",top:"20px",right:"20px",background:"transparent",border:"none",color:"#fff",fontSize:"40px",cursor:"pointer",zIndex:1e6,padding:"10px",lineHeight:1}),i=l('<div class="ngg-custom-lightbox-content"></div>').css({position:"relative",maxWidth:"90vw",maxHeight:"90vh",display:"flex",alignItems:"center",justifyContent:"center"});return i.append(t),n.append(o).append(i),o.on("click",function(t){t.stopPropagation(),e()}),n.on("click",function(t){t.target===this&&e()}),l(document).on("keydown.nggCustomLightbox",function(t){27===t.keyCode&&(e(),l(document).off("keydown.nggCustomLightbox"))}),l("body").append(n),n}function t(t){var e,n,o,i,a=(a=l(t.target)).is("a")?a:a.closest("a");if(a.length&&a.attr("data-image-id"))return e=g(a),n=d(a),o=s(a),e&&(e.playUrl||e.shareUrl)?(i=c(o),"1"===(i=String(i.link||"0"))||"2"===i?void 0:(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),void u(a,e))):void(n&&window.NextGEN_Video&&window.NextGEN_Video.detect_platform(n)&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),p(a,n,o)))}var e=!1,n=!1,g=function(t){var e=t.attr("data-tiktok-play-url"),n=t.attr("data-tiktok-share-url"),o=t.attr("data-tiktok-embed-url");return e||n||o?{playUrl:e||"",shareUrl:n||"",embedUrl:o||""}:(e=t.attr("data-image-id"))&&window.ngg_tiktok_images&&window.ngg_tiktok_images[e]?window.ngg_tiktok_images[e]:null},d=function(t){return t.attr("data-video-url")||null},s=function(t){var e=t.closest("[data-gallery-id]");return e.length?e.attr("data-gallery-id")||e.data("gallery-id"):(e=t.closest(".ngg-galleryoverview, .ngg-imagebrowser, .ngg-slideshow")).length?e.attr("data-gallery-id")||e.data("gallery-id")||e.attr("data-nextgen-gallery-id")||e.data("nextgen-gallery-id"):null},c=function(t){if(window.NggTikTokVideo&&"function"==typeof window.NggTikTokVideo.getTikTokSettings)return window.NggTikTokVideo.getTikTokSettings(t);if(window.ngg_tiktok_gallery_settings){if(t&&window.ngg_tiktok_gallery_settings["gallery_"+t])return window.ngg_tiktok_gallery_settings["gallery_"+t];if(window.ngg_tiktok_gallery_settings.global)return window.ngg_tiktok_gallery_settings.global}return{link:"0",link_target:"0"}},u=function(t,e){var n;return i("Handling TikTok click",e),!(!e.playUrl&&!e.shareUrl||(n=l('<div class="ngg-tiktok-container"></div>').css({position:"relative",display:"flex",alignItems:"center",justifyContent:"center"}),window.NextGEN_TikTok&&window.NextGEN_TikTok.handle_content?(window.NextGEN_TikTok.handle_content({playUrl:e.playUrl,shareUrl:e.shareUrl,container:n}),r(n),0):!e.playUrl||(e=l("<video></video>").attr({src:e.playUrl,controls:!0,autoplay:!0,playsinline:!0,muted:!0,loop:!0}).css({maxWidth:"90vw",maxHeight:"90vh",width:"auto",height:"auto"}),n.append(e),r(n),e.on("click",function(){this.muted=!1}),0)))},p=function(t,e,n){var o;return i("Handling video click",e),!!e&&!(!window.NextGEN_Video||!window.NextGEN_Video.detect_platform(e)||(n=a(n),o=l('<div class="ngg-video-container"></div>').css({position:"relative",display:"flex",alignItems:"center",justifyContent:"center"}),!window.NextGEN_Video.handle_content)||(window.NextGEN_Video.handle_content({videoUrl:e,container:o[0],settings:n,containerClass:"ngg-video-container",videoClass:"ngg-video-player",errorClass:"ngg-video-error"}),r(o),0))};l(function(){n||(n=!0,i("Initializing custom lightbox TikTok/video handler"),document.addEventListener("click",t,!0))}),l(window).on("refreshed",function(){i("Refreshed event - reinitializing")}),window.NggCustomLightboxTikTok={showOverlay:r,handleTikTokClick:u,handleVideoClick:p}})(jQuery);
dvadf
dvadf
| ver. 1.4 |
Github
|
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings