Title: Duplicate Script Injected
Last modified: July 27, 2022

---

# Duplicate Script Injected

 *  Resolved [Jundell Agbo](https://wordpress.org/support/users/jundellagbo/)
 * (@jundellagbo)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/duplicate-script-injected/)
 * Hello,
 * I have noticed it will injecting multiple scripts on the site, after viewing 
   it in the page source.
 *     ```
       <script type="rocketlazyloadscript" data-rocket-type="text/javascript" id="flying-scripts">const loadScriptsTimer=setTimeout(loadScripts,5*1000);const userInteractionEvents=["mouseover","keydown","touchstart","touchmove","wheel"];userInteractionEvents.forEach(function(event){window.addEventListener(event,triggerScriptLoader,{passive:!0})});function triggerScriptLoader(){loadScripts();clearTimeout(loadScriptsTimer);userInteractionEvents.forEach(function(event){window.removeEventListener(event,triggerScriptLoader,{passive:!0})})}
       function loadScripts(){document.querySelectorAll("script[data-type='lazy']").forEach(function(elem){elem.setAttribute("src",elem.getAttribute("data-src"))})}</script>
           <script type="rocketlazyloadscript" data-rocket-type="text/javascript" id="flying-scripts">const loadScriptsTimer=setTimeout(loadScripts,5*1000);const userInteractionEvents=["mouseover","keydown","touchstart","touchmove","wheel"];userInteractionEvents.forEach(function(event){window.addEventListener(event,triggerScriptLoader,{passive:!0})});function triggerScriptLoader(){loadScripts();clearTimeout(loadScriptsTimer);userInteractionEvents.forEach(function(event){window.removeEventListener(event,triggerScriptLoader,{passive:!0})})}
       function loadScripts(){document.querySelectorAll("script[data-type='lazy']").forEach(function(elem){elem.setAttribute("src",elem.getAttribute("data-src"))})}</script>
       ```
   
 * Here is the error I received in console.
    VM1120:1 Uncaught SyntaxError: Identifier‘
   loadScriptsTimer’ has already been declared.
 * Thanks,

Viewing 1 replies (of 1 total)

 *  Plugin Author [Gijo Varghese](https://wordpress.org/support/users/gijo/)
 * (@gijo)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/duplicate-script-injected/#post-15863625)
 * [@jundellagbo](https://wordpress.org/support/users/jundellagbo/) it seems to 
   be injected by WP Rocket. Contact their support

Viewing 1 replies (of 1 total)

The topic ‘Duplicate Script Injected’ is closed to new replies.

 * ![](https://ps.w.org/flying-scripts/assets/icon-256x256.png?rev=2240444)
 * [Flying Scripts: Delay JavaScript to Improve Site Speed & Performance](https://wordpress.org/plugins/flying-scripts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/flying-scripts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/flying-scripts/)
 * [Active Topics](https://wordpress.org/support/plugin/flying-scripts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/flying-scripts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/flying-scripts/reviews/)

## Tags

 * [bug fix](https://wordpress.org/support/topic-tag/bug-fix/)

 * 1 reply
 * 2 participants
 * Last reply from: [Gijo Varghese](https://wordpress.org/support/users/gijo/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/duplicate-script-injected/#post-15863625)
 * Status: resolved