[Pkg-mozext-commits] [all-in-one-sidebar] 01/05: Minor: code cleanup

David Prévot taffit at moszumanska.debian.org
Mon Sep 29 22:55:15 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch upstream
in repository all-in-one-sidebar.

commit 643fa28cf2a589c8ffbd8030e413e37bf8c17473
Author: Ingo Wennemaring <github at addonlab.com>
Date:   Wed Sep 24 11:19:36 2014 +0200

    Minor: code cleanup
---
 content/_helper.js  |  8 --------
 content/aios.js     |  6 ------
 content/aios.xul    | 10 +++++-----
 content/aios_old.js | 15 ---------------
 content/aios_tbx.js | 27 ---------------------------
 content/pageinfo.js |  3 ---
 6 files changed, 5 insertions(+), 64 deletions(-)

diff --git a/content/_helper.js b/content/_helper.js
index 1579359..5a55a38 100644
--- a/content/_helper.js
+++ b/content/_helper.js
@@ -46,7 +46,6 @@ var AiOS_HELPER = {
 AiOS_HELPER.init();
 
 window.addEventListener("DOMContentLoaded", AiOS_HELPER.initOnDOMLoaded, false);
-//window.addEventListener("load", AiOS_HELPER.initOnLoad, false);
 window.addEventListener("unload", AiOS_HELPER.unload, false);
 
 
@@ -116,13 +115,6 @@ function aios_addTab(aUrl) {
         //alert(browser.getBrowserAtIndex(i).currentURI.spec);
 
         var isPermaTab = (browser.tabContainer.childNodes[i].getAttribute('isPermaTab')) ? true : false;
-        //alert(isPermaTab);
-
-        /*var attribs = browser.tabContainer.childNodes[i].attributes;
-        //var attribs = browser.mCurrentTab.attributes;
-        for(var a = 0; a < attribs.length; a++) {
-            alert(attribs[a].name + ": " + attribs[a].value);
-        }*/
 
         // wenn der Tab leer ist
         if(browserDoc.location.href == "about:blank" && browser.selectedTab.getAttribute('openBy') != "aios" && !isPermaTab && emptyTab == null)
diff --git a/content/aios.js b/content/aios.js
index 4db01a3..6446207 100644
--- a/content/aios.js
+++ b/content/aios.js
@@ -10,11 +10,6 @@ var AiOS = {
     },
 
 
-    // initOnLoad: function() {
-
-    // },
-
-
     beforeCustomization: function() {
 
         var toolbars = new Array(AiOS_HELPER.aiosToolbar, AiOS_HELPER.sbhToolbar);
@@ -88,7 +83,6 @@ var AiOS = {
 };
 
 window.addEventListener("DOMContentLoaded", AiOS.initOnDOMLoaded, false);
-//window.addEventListener("load", AiOS.initOnLoad, false);
 window.addEventListener("unload", AiOS.unload, false);
 
 gNavToolbox.addEventListener("beforecustomization", AiOS.beforeCustomization, false);
diff --git a/content/aios.xul b/content/aios.xul
index c9a8f88..d88f586 100644
--- a/content/aios.xul
+++ b/content/aios.xul
@@ -448,7 +448,7 @@
         <!-- fuer CSS benoetigt -->
         <observes element="aios-toolbar" attribute="posMode" />
 
-    <!-- Sidebar-Switch -->
+        <!-- Sidebar-Switch -->
         <toolbox id="aios-toggle-toolbox" insertafter="browser-border-start" class="chromeclass-toolbar"
             persist="hidden fsToolbar fsToolbarMode fsToolbarIconsize fsSidebar fsSwitch">
 
@@ -471,13 +471,13 @@
         </toolbox>
 
 
-    <!-- TOOLBOX LINKS NEBEN DER SIDEBAR -->
+        <!-- TOOLBOX LINKS NEBEN DER SIDEBAR -->
         <toolbox id="aios-toolbox-left" class="chromeclass-toolbar"
             insertbefore="sidebar-box"
             defaultmode="icons"
             vertical="true">
 
-        <!-- mode und iconsize noetig, um Optionen im Konfigrationsdialog syncron zu halten  -->
+            <!-- mode und iconsize noetig, um Optionen im Konfigrationsdialog syncron zu halten  -->
             <observes element="aios-toolbar" attribute="mode" />
             <observes element="aios-toolbar" attribute="defaultmode" />
             <observes element="aios-toolbar" attribute="iconsize" />
@@ -511,7 +511,7 @@
         </toolbox>
 
 
-    <!-- TOOLBOX RECHTS NEBEN DER SIDEBAR -->
+        <!-- TOOLBOX RECHTS NEBEN DER SIDEBAR -->
         <toolbox id="aios-toolbox-right" insertbefore="sidebar-splitter" defaultmode="icons" class="chromeclass-toolbar" vertical="true" palette="BrowserToolbarPalette">
 
             <observes element="aios-toolbar" attribute="mode" />
@@ -541,7 +541,7 @@
             <!-- SIDEBARHEADER -->
             <sidebarheader id="sidebar-header" tooltip="sidebarheader-tooltip">
 
-        <!-- Attribut wird in CSS benoetigt (aios.css) -->
+                <!-- Attribut wird in CSS benoetigt (aios.css) -->
                 <observes element="aios-sbhtoolbar" attribute="iconsize" />
 
                 <toolbarbutton id="sidebars-titlebutton" type="menu" ondblclick="this.childNodes[1].hidePopup();" flex="1" position="1">
diff --git a/content/aios_old.js b/content/aios_old.js
index 00ec1a0..a8ea2b7 100644
--- a/content/aios_old.js
+++ b/content/aios_old.js
@@ -1,7 +1,4 @@
 
-// dem Sidebarheader eine ID zuweisen => dann per CSS ansprechbar (bei load oder DOMContentLoaded zu spaet)
-//top.document.getElementById("sidebar-throbber").parentNode.setAttribute('id', 'sidebar-header');
-
 window.addEventListener("load", aios_initSidebar, false);
 window.addEventListener("resize", aios_checkThinSwitch, false);
 window.addEventListener("mozfullscreenchange", aios_BrowserFullScreen, false);
@@ -62,11 +59,6 @@ function aios_getObjects() {
 function aios_initSidebar() {
     aios_getObjects();
 
-    // Toolbarbuttons in der Sidebarheader Toolbar ohne Button-Gedoens anzeigen
-    /*for(var i = 0; i < document.getElementById('aios-sbhtoolbar').childNodes.length; i++) {
-        aios_stripClass(document.getElementById('aios-sbhtoolbar').childNodes[i], 'toolbarbutton-1');
-    }*/
-
     // MacOS X => Tastaturkuerzel ersetzen (Strg. wird durch Command ersetzt und Umschalt durch das Symbol dafuer)
     if(AiOS_HELPER.os == "Darwin") {
         aios_replaceKey('switch-tooltip-box', 'r2c2', 'command');
@@ -101,11 +93,6 @@ function aios_initSidebar() {
     }
 
 
-    // Sidebarheader-Symbolleiste aus der Navigations-Symbolleiste in den Sidebarheader verschieben
-    // wenn die Symbolleiste gleich im Header waere, wuerden keine Icons angezeigt werden, wenn die Sidebar beim Start geschlossen ist
-    //document.getElementById('aios-sbhtoolbox').appendChild(document.getElementById('aios-sbhtoolbar'));
-
-
     // legt commands (Ziele) fuer Manager und Fenster lt. Einstellungen fest
     window.setTimeout(function() {
         aios_setTargets();
@@ -199,8 +186,6 @@ function aios_initSidebar() {
     // Sidebars-Menue ueberwachen - noetig fuer den Fall, dass ein erster Aufruf durch das View-Menue erfolgt
     //fx_sidebarMenu.addEventListener('popupshowing', aios_modSidebarMenu, false);
 
-    // Sidebar-Ladezustand ueberwachen
-    /*document.getElementById('sidebar').addProgressListener(aiosSBListener, Components.interfaces.nsIWebProgress.NOTIFY_STATE_DOCUMENT);*/
 
     // Drag&Drop-Funktion fuer den Sidebar-Umschalter deaktivieren?
     try {
diff --git a/content/aios_tbx.js b/content/aios_tbx.js
index 8a19bf1..ea7d8b4 100644
--- a/content/aios_tbx.js
+++ b/content/aios_tbx.js
@@ -100,15 +100,6 @@ function aios_onToolbarPopupShowing(aWhich) {
 
         // Flexible Schaltflaechen
         document.getElementById('aios-view-mitem5').setAttribute('checked', aios_toolbar.getAttribute('flexbuttons') == "true");
-
-        /*/ keine Konfigurationsmoeglichkeiten in Mac OS X
-        if(AiOS_HELPER.os == "Darwin") {
-            if(document.getElementById('aios-customize-separator'))
-                document.getElementById('aios-toolbar-contextmenu').removeChild(document.getElementById('aios-customize-separator'));
-
-            if(document.getElementById('aios-customize-mitem'))
-                document.getElementById('aios-toolbar-contextmenu').removeChild(document.getElementById('aios-customize-mitem'));
-        }*/
     }
     /*
     Sidebarheader-Toolbar
@@ -121,15 +112,6 @@ function aios_onToolbarPopupShowing(aWhich) {
         // Icongroesse
         document.getElementById('aios-sbhview-mitem4').setAttribute('checked', aios_gElem("aios-sbhtoolbar").getAttribute('iconsize') == "small");
         fx_sidebarHeader.setAttribute('iconsize', aios_gElem("aios-sbhtoolbar").getAttribute('iconsize'));
-
-        /*/ keine Konfigurationsmoeglichkeiten in Mac OS X
-        if(AiOS_HELPER.os == "Darwin") {
-            if(document.getElementById('aios-sbhcustomize-separator'))
-                document.getElementById('aios-sbhtoolbar-contextmenu').removeChild(document.getElementById('aios-sbhcustomize-separator'));
-
-            if(document.getElementById('aios-sbhcustomize-mitem'))
-                document.getElementById('aios-sbhtoolbar-contextmenu').removeChild(document.getElementById('aios-sbhcustomize-mitem'));
-        }*/
     }
 }
 
@@ -273,13 +255,6 @@ function aios_toggleToolbar(aWhich) {
 
     aios_toolbar.hidden = mode;
 
-    // setting (collapsed) aus aelteren Versionen (<= 0.7.8) rueckgaengig machen (war auf persist gesetzt)
-    // wenn die Toolbox 'collapsed' ist (Observer der Toolbar), ist die Sidebargroesse nicht veraenderbar, wenn die Toolbar deaktiviert ist
-    /*if(aios_toolbar.getAttribute('collapsed')) {
-        aios_toolbar.removeAttribute('collapsed');
-        document.persist(aios_toolbar.id, 'collapsed');
-    }*/
-
     aios_adjustToolboxWidth(false);
 }
 
@@ -317,7 +292,5 @@ function aios_addToolbarMitem(aWhich) {
     }
 
     // AiOS-Toolbar einfuegen
-    //popup.insertBefore(menuItem.cloneNode(true), popup.firstChild);
-    //popup.insertBefore(menuItem.cloneNode(true), popup.lastChild.previousSibling);
     popup.insertBefore(menuItem.cloneNode(true), aios_context_sep);
 }
\ No newline at end of file
diff --git a/content/pageinfo.js b/content/pageinfo.js
index 658db12..115a99b 100644
--- a/content/pageinfo.js
+++ b/content/pageinfo.js
@@ -31,9 +31,6 @@ function aios_init() {
 
     // Tastaturkuerzel entfernen, um nicht die des Hauptbrowsers zu blockieren
     if(aios_inSidebar) aios_removeAccesskeys();
-
-    //alert(document.getElementById('topBar').clientWidth);
-    //document.getElementById('metatree').getElementsByTagName('treechildren')[0].style.maxWidth = document.getElementById('topBar').clientWidth + "px";
 }
 
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/all-in-one-sidebar.git



More information about the Pkg-mozext-commits mailing list