From 93c575de2999eb0fc56d3a2a54b050ecc6f6351f Mon Sep 17 00:00:00 2001 From: Andy Date: Thu, 30 Aug 2018 18:28:59 -0700 Subject: [PATCH] Code Cleanup --- chrome/content/controller.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/chrome/content/controller.js b/chrome/content/controller.js index e60712e..973ad2e 100644 --- a/chrome/content/controller.js +++ b/chrome/content/controller.js @@ -43,16 +43,17 @@ var ExtExp = }, showButton: function() { + var existings; + var cb; if (document.getElementById("view-port").selectedPanel.id == "list-view") { for (var i=0; i < document.getElementById("addon-list").itemCount; i++) { var item = document.getElementById("addon-list").getItemAtIndex(i); var controlContainer = document.getAnonymousElementByAttribute(item, 'anonid', 'control-container'); - var existings = controlContainer.getElementsByTagName("extExpExportButton"); + existings = controlContainer.getElementsByTagName("extExpExportButton"); if (item.getAttribute("type") === "extension" || (item.getAttribute("type") === "theme" && item.value !== "{972ce4c6-7e08-4474-a285-3208198ce6fd}")) { - var cb; if (existings.length) { cb = existings[0]; @@ -77,10 +78,9 @@ var ExtExp = else if (document.getElementById("view-port").selectedPanel.id == "detail-view") { var detail = document.getElementById("detail-view"); - var existings = detail.getElementsByTagName("extExpExportButton"); + existings = detail.getElementsByTagName("extExpExportButton"); if (detail.getAttribute("type") === "extension" || detail.getAttribute("type") === "theme") { - var cb; if (existings.length) { cb = existings[0]; @@ -160,8 +160,7 @@ var ExtExp = ExtExp.exportButton = ExtExp._createLegacyButton(); for (var i=0; i