PluginProbe
Video Player for YouTube – Embed Videos Your Visitors Will Love to Watch / trunk
Video Player for YouTube – Embed Videos Your Visitors Will Love to Watch vtrunk
2.1.1 2.1.0 trunk 1.0 1.1 1.2 1.4.2 1.5.2 1.5.5 1.6.1 1.6.2 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9
yt-player / build / post.js

post.js in Video Player for YouTube – Embed Videos Your Visitors Will Love to Watch trunk, at build/post.js

1 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 window.copyBPlAdminShortcode=async function(t){const e=document.querySelector(`#bPlAdminShortcode-${t}`);if(!e)return;const o=e.querySelector("input"),n=e.querySelector(".tooltip"),i=o.value;try{await navigator.clipboard.writeText(i),n.textContent="Copied!",n.style.opacity=1,n.style.visibility="visible",setTimeout((()=>{n.style.opacity=0,n.style.visibility="hidden",n.textContent="Copy to Clipboard"}),1500)}catch(t){!function(t,e){const o=document.createElement("textarea");o.value=t,document.body.appendChild(o),o.select(),o.setSelectionRange(0,99999);try{document.execCommand("copy"),e.textContent="Successful Copied!"}catch(t){e.textContent="Failed!"}e.style.opacity=1,e.style.visibility="visible",e.style.width="120px",e.style.textAlign="center",e.style.fontWeight="400",e.style.fontSize="14px",e.style.padding="3px 5px",setTimeout((()=>{e.style.opacity=0,e.style.visibility="hidden",e.textContent="Copy to Clipboard"}),1500),document.body.removeChild(o)}(i,n)}},document.addEventListener("DOMContentLoaded",(function(){document.body.addEventListener("click",(function(t){const e=t.target.closest(".ytp_shortcode_copy_btn");if(!e)return;t.preventDefault();const o=e.getAttribute("data-shortcode");if(o){const t=e.querySelector(".copy-text")||e.parentElement&&e.parentElement.querySelector(".copy-text"),n=t?t.textContent:"",i=()=>{t&&(t.textContent="Copied!",setTimeout((()=>{t.textContent=n}),1500))};let c=!1;try{const t=document.createElement("textarea");t.value=o,document.body.appendChild(t),t.select(),t.setSelectionRange(0,99999),c=document.execCommand("copy"),document.body.removeChild(t)}catch(t){c=!1}c?i():navigator.clipboard&&window.isSecureContext&&navigator.clipboard.writeText(o).then(i).catch((t=>{console.error("Copy failed",t)}))}}))}));