====== Differences ====== This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
script_delayedload [2015/05/17 19:49] jappie created |
script_delayedload [2015/05/17 20:08] (current) jappie |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ===== About the script ====== | ===== About the script ====== | ||
| - | * | + | * Purpose : Load multiple scripts in the right order. |
| + | * Author : Jappie Toutenhoofd (https://plus.google.com/+JappieToutenhoofd) | ||
| + | * Link : https://plus.google.com/+JappieToutenhoofd/posts/ | ||
| + | |||
| + | ===== Use of the script ====== | ||
| + | * Set this script on the load-event of your Desktop. | ||
| + | * Adjust the last lines to your needs. | ||
| + | |||
| + | ====== Script code ====== | ||
| + | ======= Loader-1 ======= | ||
| + | <code> | ||
| + | |||
| + | function delayedLoad(scrpt) | ||
| + | {var exist = LL.getScriptByName(scrpt); | ||
| + | if (exist == null) | ||
| + | { alert( scrpt + " script does not exist."); return; } | ||
| + | setTimeout(LL.runScript(scrpt, null), d); | ||
| + | d += 400; | ||
| + | } | ||
| + | |||
| + | // initial delay | ||
| + | var d = 800; | ||
| + | |||
| + | delayedLoad("APIcomm"); | ||
| + | delayedLoad("OWM-load"); | ||
| + | </code> | ||