@sylumer thanks a lot for the answer!
So I assume the only way to import/use a widget’s code from a .js file on GitHub/Gist would be downloading that file on iCloud/local and then import it on the script?
They was I was thinking of doing it was:
Let’s say I want to use this .js file:
So in my script on Scriptable, instead of copy/pasting that code, I’m trying to do something like this:
const scriptUrl = "https://raw.githubusercontent.com/p0fi/skiable-for-scriptable/main/skiable.js";
let req = new Request(scriptUrl);
req.allowInsecureRequest = true;
let response = await req.loadString();
Would it be possible to execute ‘response’ code? (the actual GitHub .js file)
I tried using
eval(response); and also executing it using a function:
var F=new Function (response);
But neither worked.
If any of you think this can be done, it would be amazing to know how! Thanks a lot!