Skip to content

Instantly share code, notes, and snippets.

@jnv
Last active October 5, 2015 19:08
Show Gist options
  • Save jnv/2860629 to your computer and use it in GitHub Desktop.
Save jnv/2860629 to your computer and use it in GitHub Desktop.
During February 2011 Google rolled out new top navigation bar, which is used for switching services, access to settings and also account switching. Unlike the old bar, the new one requires 3 clicks to switch account. This simple script currently just adds a few styles to show the available accounts on first click. As of June 2012, this script is…
// ==UserScript==
// @name Google Navbar Easier Account Switch
// @author Jan Vlnas
// @namespace http://jan.vlnas.cz/
// @description Saves you one click when switching accounts with the new Google top navigation bar.
// @license Creative Commons Attribution 3.0 Unported License
// @version 0.0.2
// @include http://*.google.tld/*
// @include https://*.google.tld/*
// @include http://google.tld/*
// @include https://google.tld/*
// @exclude http*://mail.google.tld/*ui=1*
// ==/UserScript==
/* Include domains ripped from
* Google Account Multi-Login by Jarrett
* http://userscripts.org/scripts/show/16341
*/
if (typeof GM_addStyle == "undefined")
{
function GM_addStyle(css)
{
var heads = document.getElementsByTagName("head");
if (heads.length > 0)
{
var node = document.createElement("style");
node.type = "text/css";
node.appendChild(document.createTextNode(css));
heads[0].appendChild(node);
}
}
}
var style = '#gbmpal .gbmpal2, #gbmp2, #gbmps .gbmptc, #gbmpsb {display: none;} #gbmps {display: block !important;}';
GM_addStyle(style);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment