Set site.pageURL so the log prints correctly show where the failure was
authorAntonio Ospite <ospite@studenti.unina.it>
Sun, 12 Feb 2012 15:49:49 +0000 (16:49 +0100)
committerAntonio Ospite <ospite@studenti.unina.it>
Sun, 12 Feb 2012 15:49:49 +0000 (16:49 +0100)
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
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.');