Commits

Sergey Astanin committed 883d1c8

rename script

Comments (0)

Files changed (2)

Minimize_Navigation_Bar_in_Google_Reader.user.js

+// ==UserScript==
+// @name        Minimize Navigation in Google Webapps
+// @namespace   https://github.com/astanin
+// @include     https://groups.google.tld/*
+// @include     https://mail.google.tld/*
+// @include     https://translate.google.tld/*
+// @include     http://translate.google.tld/*
+// @include     https://www.google.tld/calendar/*
+// @include     https://www.google.tld/reader/*
+// @include     http://www.google.tld/reader/*
+// @include     https://plus.google.tld/*
+// @version     1.0
+// @grant       none
+// ==/UserScript==
+
+function addToggleButton() {
+    var tb = document.getElementById("toggle_google_bars");
+    var gb = document.getElementById("gb");
+
+    if (tb) {
+        return;
+    }
+    if (!gb) { // try to add toggle button later (several times)
+        window.triedToAddToggleButton += 1;
+        if (window.triedToAddToggleButton < 5) {
+            setTimeout(addToggleButton, 2000);
+        }
+        return;
+    }
+
+    // create toggle button
+    var tb = document.createElement("div");
+    tb.setAttribute("id","toggle_google_bars");
+
+    // styles
+    tb.style.background = "url('https://ssl.gstatic.com/ui/v1/zippy/arrow_down.png') no-repeat center #f2f2f2";
+    tb.style.height = "8px";
+    tb.style.width = "100%";
+    gb.style.display = "none";
+
+    // insert toggle button after google bars
+    gb.parentNode.insertBefore(tb, gb.nextSibling);
+
+    // add callback
+    tb.addEventListener("click", function() {
+        var gb = document.getElementById("gb");
+        var tb = document.getElementById("toggle_google_bars");
+        if (gb && (gb.style.display == "block")) {
+            gb.style.display = "none";
+            tb.style.MozTransform = "rotate(0deg)";
+        } else {
+            gb.style.display = "block";
+            tb.style.MozTransform = "rotate(180deg)";
+        }
+        return false;
+    }, false);
+
+    return;
+}
+
+// wait until google bars appear, check every second
+setTimeout(addToggleButton, 1000);
+window.triedToAddToggleButton = 0;

Minimize_Navigation_in_Google_Webapps.user.js

-// ==UserScript==
-// @name        Minimize Navigation in Google Webapps
-// @namespace   https://github.com/astanin
-// @include     https://groups.google.tld/*
-// @include     https://mail.google.tld/*
-// @include     https://translate.google.tld/*
-// @include     http://translate.google.tld/*
-// @include     https://www.google.tld/calendar/*
-// @include     https://www.google.tld/reader/*
-// @include     http://www.google.tld/reader/*
-// @include     https://plus.google.tld/*
-// @version     1.0
-// @grant       none
-// ==/UserScript==
-
-function addToggleButton() {
-    var tb = document.getElementById("toggle_google_bars");
-    var gb = document.getElementById("gb");
-
-    if (tb) {
-        return;
-    }
-    if (!gb) { // try to add toggle button later (several times)
-        window.triedToAddToggleButton += 1;
-        if (window.triedToAddToggleButton < 5) {
-            setTimeout(addToggleButton, 2000);
-        }
-        return;
-    }
-
-    // create toggle button
-    var tb = document.createElement("div");
-    tb.setAttribute("id","toggle_google_bars");
-
-    // styles
-    tb.style.background = "url('https://ssl.gstatic.com/ui/v1/zippy/arrow_down.png') no-repeat center #f2f2f2";
-    tb.style.height = "8px";
-    tb.style.width = "100%";
-    gb.style.display = "none";
-
-    // insert toggle button after google bars
-    gb.parentNode.insertBefore(tb, gb.nextSibling);
-
-    // add callback
-    tb.addEventListener("click", function() {
-        var gb = document.getElementById("gb");
-        var tb = document.getElementById("toggle_google_bars");
-        if (gb && (gb.style.display == "block")) {
-            gb.style.display = "none";
-            tb.style.MozTransform = "rotate(0deg)";
-        } else {
-            gb.style.display = "block";
-            tb.style.MozTransform = "rotate(180deg)";
-        }
-        return false;
-    }, false);
-
-    return;
-}
-
-// wait until google bars appear, check every second
-setTimeout(addToggleButton, 1000);
-window.triedToAddToggleButton = 0;