1

I'm attempting to inject jQuery into a site that's not mine, and is in an iOS webview. I'd like to change a few things like the background color, font, etc.

I read the answers here... How to inject JQuery into existing page within a UIWebView?

But couldn't figure out a way to do it.

All the solutions I've read suggest using stringByEvaluatingJavaScriptFromString to inject jQuery. I believe this solution only injects JavaScript though, while I think what might work is how jQuery is normally installed with the html head tag inside a script tag like this

<head>
    <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.2.1.min.js">
    </script>
</head>

I don't know how to inject that though? Or maybe there's a different way entirely?

ɢʀᴜɴᴛ
  • 32,025
  • 15
  • 116
  • 110
Ed Fisher
  • 21
  • 3
  • check this https://stackoverflow.com/questions/26573076/how-to-inject-jquery-to-any-webpage and executejavascript in the webview with that JS code – UXDart Jul 30 '17 at 18:56
  • thanks @UXDart I saw that one, but assumed it wasn't an IOS webview solution, if you know something that would work in IOS please let me know! – Ed Fisher Aug 01 '17 at 18:35

0 Answers0