The code above was a direct "copy-and-paste" from the `jquery.infinitescroll.js` plugin, which I presume must be out of date now. Is that plugin still in use? And if so, is there a mechanism to create common templates that can be shared by multiple components? It seems like it would be good, for example, to have a single loading indicator that all components used.

One complication is that individual components may have unique requirements. The document preview widget, for example, needs the loading indicator to have a minimum height equal to the main widget's height. That might be a general requirement, though, (or at least it might be harmless in the general case).

If if would be useful to create a general template instead of one confined to the document preview widget, any pointers on the best model to use?