How-to create WRT widgets with remote code
First of all, put the .js file in a public URL.
In the WRT application the developer can use the following code to load the .js file, put in the <head>
var date = new Date();
The 'd=date.getMilliseconds()' variable is very important because with it, the WRT application doesn't use the cached .js file.
But this cached file could be used to performance, just removing the 'd=date.getMilliseconds()' variable, the WRT application will download the code only at the first time the application is opened.
When to use
The developer can use this code to load anything, external variables for use in the application or the complete application.