From 98f4a70b2358ee5fa26f6bc4120ffac02a6f2452 Mon Sep 17 00:00:00 2001 From: bekuno <> Date: Thu, 3 Dec 2020 00:28:03 +0100 Subject: [PATCH] resolve lint shadowed error Description: Variables should not be shadowed javascript:S1117 Overriding or shadowing a variable declared in an outer scope can strongly impact the readability, and therefore the maintainability, of a piece of code. Further, it could lead maintainers to introduce bugs because they think they're using one variable but are really using another. --- send2cgeo.user.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/send2cgeo.user.js b/send2cgeo.user.js index 8ec3eaa..997346a 100644 --- a/send2cgeo.user.js +++ b/send2cgeo.user.js @@ -280,8 +280,8 @@ function s2cgGCMain() { $('.section-controls').after('
'); // Send selected if (whatSend == 'selected') { - var caches = $.find('.geocache-table tbody tr'); - $(caches).each( + var caches1 = $.find('.geocache-table tbody tr'); + $(caches1).each( function() { if ($(this).find('.gc-checkbox').hasClass('checked')) { var text = $(this).find('.geocache-code').text().split('|'); @@ -298,10 +298,10 @@ function s2cgGCMain() { var GCCode = $(cachesToSend[i]).attr('s2cgeo-send'); if (isUseWithoutThirdPartyCookies()) { var padding = i%10 * 30 + 10; - let sendCache = window.open('https://send2.cgeo.org/add.html?cache=' + GCCode, 'send' + GCCode, 'width=200,height=100,top=' + padding +',left=' + padding + ',menubar=no,status=no'); + let sendCache1 = window.open('https://send2.cgeo.org/add.html?cache=' + GCCode, 'send' + GCCode, 'width=200,height=100,top=' + padding +',left=' + padding + ',menubar=no,status=no'); window.setTimeout( function() { - sendCache.close(); + sendCache1.close(); }, 900 ); @@ -383,14 +383,14 @@ function s2cgGCMain() { // Send to c:geo on browsemap (old map) if (document.location.href.match(/\.com\/map/)) { var template = $("#cacheDetailsTemplate").html(); - var html = '' + var html0 = '' + '