[Pkg-mozext-commits] [wot] 40/226: Add the toolbar button after the stop button. Fixes #18
David Prévot
taffit at moszumanska.debian.org
Fri May 1 00:35:32 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository wot.
commit 371e03dc7cadfd44266ff16240664b74fd5bae12
Author: Sami Tolvanen <sami at mywot.com>
Date: Thu Sep 20 11:35:37 2012 +0300
Add the toolbar button after the stop button. Fixes #18
---
content/ui.js | 20 +++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)
diff --git a/content/ui.js b/content/ui.js
index 1a926be..fc91a43 100644
--- a/content/ui.js
+++ b/content/ui.js
@@ -161,7 +161,7 @@ var wot_ui = {
}
},
- show_toolbar_button: function(id, before)
+ show_toolbar_button: function(id, after)
{
try {
var nbr = document.getElementById("nav-bar");
@@ -185,19 +185,13 @@ var wot_ui = {
bar = bar.nextSibling;
}
- var target = document.getElementById(before);
+ var target = document.getElementById(after);
- /* The before element might not exist in the nav-bar */
- var elem = nbr.firstChild;
-
- while (elem) {
- if (elem == target) {
- break;
- }
- elem = elem.nextSibling;
+ if (target) {
+ target = target.nextSibling;
}
-
- nbr.insertItem(id, elem);
+
+ nbr.insertItem(id, target);
nbr.setAttribute("currentset", nbr.currentSet);
document.persist("nav-bar", "currentset");
} catch (e) {
@@ -212,7 +206,7 @@ var wot_ui = {
/* Toolbar */
if (!wot_prefs.button_created || wot_prefs.create_button) {
wot_prefs.setBool("button_created", true);
- this.show_toolbar_button("wot-button", "urlbar-container");
+ this.show_toolbar_button("wot-button", "stop-button");
}
/* Accessibility */
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/wot.git
More information about the Pkg-mozext-commits
mailing list