From 5acbbffe01cfc5d603dbfc5177b092a879286a75 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Sat, 10 Dec 2011 01:21:56 +0100 Subject: [PATCH 1/1] 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 --- direct_download_links.user.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) { -- 2.1.4