0

I need to disable reloading on a specific page.

This is a part of some js code from this website:

document.onreadystatechange = function() {
    if (document.readyState === "complete") {
        setTimeout(function() {
            location.reload();
        }, 1500)
    }
}

I really want to stop reloading this page, but i don't know how...

(I have a Firefox (nightly) browser. I don't want to install Chrome because of an add-on.)


Second question:

Can I disable a specific script on the page?

This is the script that I want to disable:

(it's inside <head> with an id of ixqzxn - the only information I have)

enter image description here

War10ck
  • 12,387
  • 7
  • 41
  • 54
Łukasz Rząsa
  • 171
  • 3
  • 10
  • 1
    why don't you just rewrite the function on those pages? `document.onreadystatechange = function() {}` – epascarello Oct 26 '17 at 18:00
  • how can i rewrite functions without name since I'm not the owner – Łukasz Rząsa Oct 26 '17 at 18:02
  • put it in the console and run it – epascarello Oct 26 '17 at 18:02
  • @Latreso You're not the owner of the website which you want to modify? – War10ck Oct 26 '17 at 18:03
  • 1
    @war10ck probably monkey patching another ones banana – Jonas Wilms Oct 26 '17 at 18:04
  • For personal (browser side) use (improvements, etc.) – Łukasz Rząsa Oct 26 '17 at 18:05
  • What are you **actually trying to do**. Why do you want to prevent reloading? Trying to prevent users from reloading a page is like trying to stop a user from saving an image off of your page: an exercise in futility. – zero298 Oct 26 '17 at 18:10
  • This might help you to understand about preventing browser refresh. https://stackoverflow.com/questions/2482059/disable-f5-and-browser-refresh-using-javascript. Regarding your second question , From the DOM using `document.querySelector("script#ixqzxn").remove()` you can remove the script. – Vali Shah Oct 26 '17 at 18:55

0 Answers0