Set site.pageURL so the log prints correctly show where the failure was
[GM_direct_download_links.git] / direct_download_links.user.js
index bd8e32a..6fa53ed 100644 (file)
@@ -146,6 +146,7 @@ function getElementByXPath(query, root) {
  * @return: null on error, true on success
  */
 function direct_download_link_add(pageURL, site) {
+  site.pageURL = pageURL
   var element = getElementByXPath(site.urlContainerXPath);
   if (!element) {
     DDL_log('DirectDL (' + site.pageURL  + '): Cannot find the element ' + site.urlContainerXPath + ' containing the URL.');