| Signature |
hs.webview.usercontent:userScripts() -> array |
| Type |
Method |
| Description |
Get a table containing all of the currently defined injection scripts for this user content controller |
| Parameters |
|
| Returns |
- An array of injected user scripts. Each entry in the array will be a table containing the following keys:
- source - the javascript which is injected
- mainFrame - a boolean value which indicates whether this script is only injected for the main webview frame (true) or for all frames within the webview (false)
- injectionTime - a string which indicates whether the script is injected at "documentStart" or "documentEnd".
|
| Notes |
- Because the WKUserContentController class only allows for removing all scripts, you can use this method to generate a list of all scripts, modify it, and then use it in a loop to reapply the scripts if you need to remove just a few scripts.
|
| Source |
extensions/webview/usercontent.m |