Hey I have a website loaded in my WKWebView. In order for my app to work, I have to comment out 2 lines of a .js that the server sends. I can do this in Chrome via the Developer Tools and my changes do work. However, I do not know how to do that with my WKWebView. Is there any method that lets me replace javascript code in the WKWebView?
One possibility might be to read the js into a String, modify its contents, and then paste it as WKUserScript. But I'd also have to make the running website ignore the "old" js for this because otherwise I think that the old one would "steal" all the method calls.
Any ideas how I could go about this?