I need to get a params passed to JS file by an external service (I can't edit loading logic) or URL of JS script file.
For example, my script is loading by URL: /widgets/<code>/<version>/script.js?v=<version>
(version are the same)
The biggest problem associated with the fact that a lot of such scripts can appear on the page (Up to 100-150 pieces). Accordingly, you need to get the URL or parameters of the script that is currently connected
The second big problem is that scripts are loaded without using the script tag. (The service uses RequireJS).
Therefore, this answer, for example, is not relevant. How can I get URL of JS file in same JS file?
At the output, you need to get <version>