Rename the 'links' variable in _add_link() to 'destination'
[GM_direct_download_links.git] / direct_download_links.user.js
index eb4175a..d430887 100644 (file)
@@ -179,8 +179,8 @@ function _add_link(e) {
   var site = e.site;
   var URL = e.URL;;
 
-  var links = document.getElementById(site.linkDest);
-  if (!links) {
+  var destination = document.getElementById(site.linkDest);
+  if (!destination) {
     DDL_log('DirectDl (' + site.pageURL + '): Cannot add the direct download link.');
     return;
   }
@@ -194,7 +194,7 @@ function _add_link(e) {
   style += ' padding: .5em; margin: 1em;'
   download_link.setAttribute('style', style);
 
-  links.insertBefore(download_link, links.firstChild);
+  destination.insertBefore(download_link, destination.firstChild);
 }
 
 function DDL_log(message) {