Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: lib/customizableUI.js

Issue 5040954746601472: Issue 186 - disabled ABP icon in tool bar re-appears after seamonkey restart (Closed)
Patch Set: Check for localname Created May 8, 2014, 3:11 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 let toolbox = event.currentTarget; 175 let toolbox = event.currentTarget;
176 for (let [id, widget] of widgets) 176 for (let [id, widget] of widgets)
177 saveState(toolbox, widget); 177 saveState(toolbox, widget);
178 } 178 }
179 179
180 function saveState(/**Element*/ toolbox, /**Widget*/ widget) 180 function saveState(/**Element*/ toolbox, /**Widget*/ widget)
181 { 181 {
182 let node = toolbox.ownerDocument.getElementById(widget.id); 182 let node = toolbox.ownerDocument.getElementById(widget.id);
183 183
184 let position = toolbox.getAttribute(widget.positionAttribute) || "hidden,,"; 184 let position = toolbox.getAttribute(widget.positionAttribute) || "hidden,,";
185 if (node) 185 if (node && node.parentNode.localName != "toolbarpalette")
186 { 186 {
187 if (typeof widget.onAdded == "function") 187 if (typeof widget.onAdded == "function")
188 widget.onAdded(node) 188 widget.onAdded(node)
189 189
190 let toolbar = getToolbar(node); 190 let toolbar = getToolbar(node);
191 position = "visible," + toolbar.id + "," + (node.nextSibling ? node.nextSibl ing.id : ""); 191 position = "visible," + toolbar.id + "," + (node.nextSibling ? node.nextSibl ing.id : "");
192 } 192 }
193 else 193 else
194 position = position.replace(/^visible,/, "hidden,") 194 position = position.replace(/^visible,/, "hidden,")
195 195
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 for (let [id, widget] of widgets) 311 for (let [id, widget] of widgets)
312 { 312 {
313 let toolbox = getToolbox(window, widget); 313 let toolbox = getToolbox(window, widget);
314 if (toolbox) 314 if (toolbox)
315 toolbox.removeEventListener("aftercustomization", onToolbarCustomization , false); 315 toolbox.removeEventListener("aftercustomization", onToolbarCustomization , false);
316 316
317 removeWidget(window, widget); 317 removeWidget(window, widget);
318 } 318 }
319 } 319 }
320 }); 320 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld