From 7ac35363e35e32adbd42dfa1537ea7956bbe5847 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 14 May 2014 17:18:54 -0400 Subject: [PATCH] Clear guidance panel before adding text This is probably only necessary if the pref is reset manually, but this prevents duplicate text in that situation. --- chrome/content/zotero/bindings/guidancepanel.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/chrome/content/zotero/bindings/guidancepanel.xml b/chrome/content/zotero/bindings/guidancepanel.xml index 6703bb9b94..41560f908f 100644 --- a/chrome/content/zotero/bindings/guidancepanel.xml +++ b/chrome/content/zotero/bindings/guidancepanel.xml @@ -54,6 +54,11 @@ if(!text) text = Zotero.getString("firstRunGuidance."+about); text = text.split("\n"); var descriptionNode = panel.lastChild; + + while (descriptionNode.hasChildNodes()) { + descriptionNode.removeChild(descriptionNode.firstChild); + } + while(text.length) { var textLine = text.shift(); descriptionNode.appendChild(document.createTextNode(textLine));