Changeset 3432223
- Timestamp:
- 01/04/2026 07:34:24 PM (3 months ago)
- Location:
- simple-lazy-load-videos/trunk
- Files:
-
- 5 edited
-
assets/img/play-vimeo.svg (modified) (1 diff)
-
assets/img/play-youtube.svg (modified) (1 diff)
-
assets/js/scripts.js (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
simple-lazy-load-videos.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
simple-lazy-load-videos/trunk/assets/img/play-vimeo.svg
r3300823 r3432223 1 <svg width="76" height="43" ><path class="sllv-video__button-shape" d="M5 0h65.5a5.3 5.3 0 015.333 5v33a5.3 5.3 0 01-5.333 5H5a5 5 0 01-5-5V5a5 5 0 015-5z"/><path class="sllv-video__button-icon" d="M31.034 30.98L31 31V12l15.834 9.456z"/></svg>1 <svg width="76" height="43" viewBox="0 0 76 43"><path class="sllv-video__button-shape" d="M5 0h65.5a5.3 5.3 0 015.333 5v33a5.3 5.3 0 01-5.333 5H5a5 5 0 01-5-5V5a5 5 0 015-5z"/><path class="sllv-video__button-icon" d="M31.034 30.98L31 31V12l15.834 9.456z"/></svg> -
simple-lazy-load-videos/trunk/assets/img/play-youtube.svg
r3300823 r3432223 1 <svg width="68" height="48" ><path class="sllv-video__button-shape" d="M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55c-2.93.78-4.63 3.26-5.42 6.19C.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z"/><path class="sllv-video__button-icon" d="M45 24L27 14v20"/></svg>1 <svg width="68" height="48" viewBox="0 0 68 48"><path class="sllv-video__button-shape" d="M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55c-2.93.78-4.63 3.26-5.42 6.19C.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z"/><path class="sllv-video__button-icon" d="M45 24L27 14v20"/></svg> -
simple-lazy-load-videos/trunk/assets/js/scripts.js
r3300823 r3432223 1 "use strict";!function(){function find_videos(){const videos=document.querySelectorAll(".sllv-video");videos.length>0&&videos.forEach( (video=>{video.classList.contains("-state_enabled")||function(video){video.querySelector(".sllv-video__link");const provider=video.getAttribute("data-provider"),id=video.getAttribute("data-video");video.addEventListener("click",(event=>{event.preventDefault();const iframe=function(provider,id){const iframe=document.createElement("iframe");return iframe.setAttribute("allowfullscreen",""),iframe.setAttribute("allow","autoplay"),iframe.setAttribute("src",function(provider,id){let url="";"youtube"==provider?url="https://www.youtube.com/embed/"+id+"?rel=0&showinfo=0&autoplay=1":"vimeo"==provider&&(url="https://player.vimeo.com/video/"+id+"?autoplay=1");return url}(provider,id)),iframe.classList.add("sllv-video__iframe"),iframe}(provider,id);stop_all_video(),function(){const html_media=document.querySelectorAll("video, audio");html_media.length>0&&html_media.forEach((media=>{media.pause()}))}(),video.appendChild(iframe),video.classList.add("-state_started")})),video.classList.add("-state_enabled")}(video)}))}function stop_all_video(){const videos=document.querySelectorAll(".sllv-video.-state_started");videos.length>0&&videos.forEach((video=>{video.querySelector(".sllv-video__iframe").remove(),video.classList.remove("-state_started")}))}find_videos(),document.querySelectorAll("video, audio").forEach((media=>{media.addEventListener("play",(()=>{stop_all_video()}))})),jQuery(document).ajaxComplete((function(event,request,settings){setTimeout((function(){find_videos()}),500)}))}();1 "use strict";!function(){function find_videos(){const videos=document.querySelectorAll(".sllv-video");videos.length>0&&videos.forEach(video=>{video.classList.contains("-state_enabled")||function(video){video.querySelector(".sllv-video__link");const provider=video.getAttribute("data-provider"),id=video.getAttribute("data-video");video.addEventListener("click",event=>{event.preventDefault();const iframe=function(provider,id){const iframe=document.createElement("iframe");return iframe.setAttribute("allowfullscreen",""),iframe.setAttribute("allow","autoplay"),iframe.setAttribute("src",function(provider,id){let url="";"youtube"==provider?url="https://www.youtube.com/embed/"+id+"?rel=0&showinfo=0&autoplay=1":"vimeo"==provider&&(url="https://player.vimeo.com/video/"+id+"?autoplay=1");return url}(provider,id)),iframe.classList.add("sllv-video__iframe"),iframe}(provider,id);stop_all_video(),function(){const html_media=document.querySelectorAll("video, audio");html_media.length>0&&html_media.forEach(media=>{media.pause()})}(),video.appendChild(iframe),video.classList.add("-state_started")}),video.classList.add("-state_enabled")}(video)})}function stop_all_video(){const videos=document.querySelectorAll(".sllv-video.-state_started");videos.length>0&&videos.forEach(video=>{video.querySelector(".sllv-video__iframe").remove(),video.classList.remove("-state_started")})}find_videos(),document.querySelectorAll("video, audio").forEach(media=>{media.addEventListener("play",()=>{stop_all_video()})}),jQuery(document).ajaxComplete(function(event,request,settings){setTimeout(function(){find_videos()},500)})}(); -
simple-lazy-load-videos/trunk/readme.txt
r3300865 r3432223 4 4 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=V5Q9SBB54LMDC&source=url 5 5 Requires at least: 4.9 6 Tested up to: 6. 8.16 Tested up to: 6.9 7 7 Requires PHP: 5.6 8 Stable tag: 1.7. 18 Stable tag: 1.7.2 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
simple-lazy-load-videos/trunk/simple-lazy-load-videos.php
r3300865 r3432223 4 4 * Plugin URI: https://github.com/radkill/simple-lazy-load-videos 5 5 * Description: Simple Lazy Load for embedded video from YouTube and Vimeo. 6 * Version: 1.7. 16 * Version: 1.7.2 7 7 * Requires at least: 4.9 8 8 * Requires PHP: 5.6
Note: See TracChangeset
for help on using the changeset viewer.