OpenUserJs/OpenUserJS.org — pull request #449 by jerone (2014-11-26 10:45:13+00:00)
Title: Lazy load script/lib icons

I propose the following solution (see code) to fix the issue with custom userscript icons that are blocking the page.

This fix will lazy load all userscript icons when available by JavaScript, making the page load faster and stops blocking the page load when images aren't returning at all.

No functionality is removed or server-side functionality is added.

Example:
Blocking script: https://openuserjs.org/scripts/sizzle/Textarea_Keyboard_Shortcuts
Blocking image: http://sizzlemctwizzle.com/arrrkitty.jpg --> returning `502`
Results in time on the above blocking image (a clean install since 2 weeks):

| Browser: | Result:
| --- | ---
| Chrome | avg. 5 seconds
| IE11 | avg. 5 seconds
| Firefox | 42 seconds (might be an interference with an addon)

This will solve:
* Images that take a long time to load because of external server processing.
* Images that take a long time to load because of their size.
* Images that return an error (e.g. `4xx` or `5xx`).

Other solutions:
* Validate on our back-end upon request. _Cons_: takes time and extra processing.
* Validate on script upload/update. _Cons_: images can disappear after they were validated.
* Host them ourselves. _Cons_: huge storage required.
All other solutions above can coexists with proposed solution.