Bug in plugin
-
There’s a bug in the most recent version of this plugin.
This code is loaded in the footer of every page on the site – whether or not there’s a video on the page. This unnecessary code is added a massive extra load to each page.
<script type=”aef93484dfb200770b1ddef5-text/javascript”>function lazyLoadThumb(e){var t=’
<noscript>
</noscript>’,a='<div class=”play”></div>’;return t.replace(“ID”,e)+a}function lazyLoadYoutubeIframe(){var e=document.createElement(“iframe”),t=”ID?autoplay=1″;t+=0===this.dataset.query.length?”:’&’+this.dataset.query;e.setAttribute(“src”,t.replace(“ID”,this.dataset.src)),e.setAttribute(“frameborder”,”0″),e.setAttribute(“allowfullscreen”,”1″),e.setAttribute(“allow”, “accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture”),this.parentNode.replaceChild(e,this)}document.addEventListener(“DOMContentLoaded”,function(){var e,t,a=document.getElementsByClassName(“rll-youtube-player”);for(t=0;t<a.length;t++)e=document.createElement(“div”),e.setAttribute(“data-id”,a[t].dataset.id),e.setAttribute(“data-query”, a[t].dataset.query),e.setAttribute(“data-src”, a[t].dataset.src),e.innerHTML=lazyLoadThumb(a[t].dataset.id),e.onclick=lazyLoadYoutubeIframe,a[t].appendChild(e)});</script>
Please can you fix this and/or in the meantime provide a hotfix to strip out this code? Thanks.
- The topic ‘Bug in plugin’ is closed to new replies.