I’m developing a chrome-extension scraper for a site. What we do is that we simply retrieve the content on the page whenever a certain button is clicked on the site.
Now the site uses the state concepts. What it does is that as soon as button is clicked, it starts rendering the content and change the URL without reloading the page.
What my end goal is that whenever that button is clicked, the new content or the URL should be loaded in an iframe but the current site state should not be changed at all, that’s all I want.
I tried below soltuion
history.pushState = function(e) { return; }
But all of the time it changes the content.
I’ve tried the MutationObserver way as well but it just freezes the site.
What else options are available for me?