*
*
* Optional fields:
+ *
+ * initCommand: a function called before the regExp is matched, this can
+ * be useful in cases when some action needs to be done in
+ * order to make the element containing the regExp be actually
+ * rendered. It must accept a 'site' parameter.
+ *
* onEvent: used to delay the urlRegexp matching to a certain event like
* 'DOMNodeInserted' useful when the URL is added by some javascript
* library. It has two fields:
var result = window.location.href.match(site.locationRegexp);
if (result) {
+ if (site.initCommand) {
+ site.initCommand(site);
+ }
direct_download_link_add(window.location.href, site);
}
}