Ignoring some scripts in <head> #175
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi,
Is there a way to set a selector on "head" but to prevent certain scripts from being re-run on a new page load?
Andrew
Use a global variable to store whether the scripts were run already, then check that value in your scripts.
Unfortunately that won’t work in my setup as there are some CMS scripts
that I don’t have access to modify.
I was hoping that there might be a way to specify class IDs to ignore
within the head?
On Sat, Sep 8, 2018 at 9:52 PM BehindTheMath notifications@github.com
wrote:
There's no built in way to do that. Your bet bet is to move the script tag outside of any elements affected by Pjax.
For others who might be interested, I was able to put together a workaround by adding this line of code below:
Re parsing HTML using regex. 😄