From: Antonio Ospite Date: Sun, 12 Feb 2012 15:49:49 +0000 (+0100) Subject: Set site.pageURL so the log prints correctly show where the failure was X-Git-Tag: 0.4~1 X-Git-Url: https://git.ao2.it/GM_direct_download_links.git/commitdiff_plain/ad31d74355c6168d3bbccceb8bcbfbc2c20ca4d6?ds=inline Set site.pageURL so the log prints correctly show where the failure was Signed-off-by: Antonio Ospite --- diff --git a/direct_download_links.user.js b/direct_download_links.user.js index bd8e32a..6fa53ed 100644 --- a/direct_download_links.user.js +++ b/direct_download_links.user.js @@ -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.');