From: Antonio Ospite Date: Sat, 10 Dec 2011 00:21:56 +0000 (+0100) Subject: Rename the 'links' variable in _add_link() to 'destination' X-Git-Tag: 0.3~7 X-Git-Url: https://git.ao2.it/GM_direct_download_links.git/commitdiff_plain/5acbbffe01cfc5d603dbfc5177b092a879286a75 Rename the 'links' variable in _add_link() to 'destination' This is a better name to show that we are dealing with the destination element where the Direct Download Link is going. Signed-off-by: Antonio Ospite --- diff --git a/direct_download_links.user.js b/direct_download_links.user.js index eb4175a..d430887 100644 --- a/direct_download_links.user.js +++ b/direct_download_links.user.js @@ -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) {