2

How can I prevent one file.js to load in page?

Like this line:

<script type="text/javascript" src="scripts/play.html.js?_v=1.1.1">

I tried to use some greasemonkey scripts but didnt work well. This script has some functions to stop one video from playing when out of focus, which is quite annoying thing and I want to prevent it from loading.

2
  • Well.. I can suggest to have a look on that culprit function..:) .. if that function is available in scope through some variable.. you can do some trick on it... but that also depend on the code, without having a look, at least I cannot suggest anything.. Commented Feb 28, 2014 at 4:56
  • Well, the script basically changes the body class, when the window is active <body class"visible"> when not active <body class"hidden">, I tried just to change this from hidden to visible but always come back to hidden Commented Feb 28, 2014 at 5:07

1 Answer 1

1

Make an extra variable along with the script file on the pages that is true or false.

Have it false or true on the one page and the opposite on the other page

Sign up to request clarification or add additional context in comments.

1 Comment

I know that, the script set visible if the window is focus and hidden if the window is out of focus, I just have to have change everything to visible, but how I do this before the page load this function ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.