Skip to main content

Questions tagged [wkuserscript]

Used when a user script is to be injected into a webpage.

wkuserscript
0 votes
1 answer
31 views

Why is my select element not changing options?

I am using Jquery and Jquery-UI 1.7.2. The code itself is a tampermonkey script with the grants necessary for GM_setValue and GM_getValue already written. The part of the code that has the issue is ...
deniz's user avatar
  • 1
2 votes
0 answers
125 views

How to evaluateJavaScript when app goes to background WKWebView?

I am create html page with HTML5 IMA SDK player and then load this page to WKWebView, all work fine pause, playing content etc, but I want "pause" content when app goes to background for ...
Ice's user avatar
  • 730
-1 votes
1 answer
484 views

WKUserScript init Crash on iOS 14: Use of unimplemented initializer init(source:injectionTime:forMainFrameOnly:in:)

Crash while executing this init method in ios 14 Use of unimplemented initializer init(source:injectionTime:forMainFrameOnly:in:) class MyScript: WKUserScript { init(source: String) { super.init(...
Saqib2235's user avatar
2 votes
0 answers
77 views

javascript injection not being executed

I have included my function and the way im calling it it does print "injecting" in console but the javascript dosent seem to be injected i have tested the js in safari console and chrome console it ...
kishan's user avatar
  • 57
1 vote
2 answers
1k views

Removing a single specific user script from WKUserContentController

I'm using addUserScript() to add a user script to my WKWebView's WKUserContentController. I noticed that even if call loadRequest() the script stays around. For certain use cases I may need to ...
Locksleyu's user avatar
  • 5,352
2 votes
2 answers
1k views

Refresh an external webpage every few seconds

For work, I spend a lot of time on domain-specific forums. Throughout the day, I check those forums to see if there are any questions and answers relevant to what I am working on. However, the ...
Arik Rundquist's user avatar
0 votes
1 answer
946 views

WKUserScript forMainFrameOnly

WKUserScript has this init init(source: String, injectionTime: WKUserScriptInjectionTime, forMainFrameOnly: Bool) Simply what is meant by 'MainFrame' ?
RyanTCB's user avatar
  • 7,994
0 votes
1 answer
771 views

WKUserScript not call in iOS10, but works in iOS9

I'm having code which perfectly works in iOS 9, but not working in iOS 10, specifically doBar() not called. Here in WKWebView I'm injecting javascript code. let jsFoo = "function doFoo() { window....
Jurasic's user avatar
  • 1,946
7 votes
2 answers
10k views

WKUserScript not working

I want to inject a script using WKWebview API. For some reason it isn't working and I can't figure it out. I've tried debugging in Safari developer console and I can't find the JavaScript code in ...
Avba's user avatar
  • 15.1k