Javascript – Override (monkeypatch) querySelector, then restore the original functionality back in browser JS
I have a local testing environment, where I want to temporary override querySelector. I know that monkeypatching is bad practice, but in this case this code will only be used locally on developer side. I have this snippet that I…