change javascript code in firefox using the inspect element

JS will get parsed and run as soon as it’s in the DOM. Changing the page markup after the JS has run will not change the running of the JS. You’ll need to change it some other way.

One option would be to overwrite the .timer function with your own function. After the page script has run, open your console and run:

// save a reference to the original function if you need to
const origTimer = javascript_countdown.timer;
javascript_countdown.timer = () => null;

This will prevent the page’s calls to .timer from doing anything. Then, once you want to submit the form, just call document.FormAzmoon.submit(); manually.

Also teach me how can i rewrite and manipulate a variable inside a function via console!

If you actually had to resort to that approach, it’s just barely possible, see this question for details. In short, you’d need to use a userscript (or something else that runs at the beginning of pageload), use a MutationObserver to intercept the addition of the <script> tag, and fiddle with its textContent once you detect the addition of the script.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top