Building nothing, laying bricks

Update: Sorry guys, the game is up. Gmail has now moved 100% to the new look

If you prefer the old gmail interface, you can keep it a little while longer. The settings menu option to revert to the old look is still around, only hidden. Run the script below to bring it back.

Run as a bookmarklet

Drag it to your bookmarks toolbar, refresh gmail, and click

revert gmail

you really should look over the source first

Run in the console

Refresh gmail and paste the code below into the console

  function search(root, matchers, maxDepth, depth){
    depth = depth||0;
    maxDepth = maxDepth||matchers.length;
    if(depth == maxDepth) return [root];
    for(var key in root){ 
        if(root[key] !== root && (!matchers[depth] || matchers[depth](key, root[key]))){ 
          var path = search(root[key], matchers, maxDepth, depth+1); 
            return [key].concat(path);

  function searchDom(root, match){
    if(match(root)) return root;
    var child = root.firstChild;
      var found = searchDom(child, match);
      if(found) return found;
      child = child.nextSibling;
  var settingsEl = searchDom(frames[3].document.body, function(el){ 
    return (el instanceof frames[3].HTMLDivElement) && el.getAttribute("title") == "Settings"

    console.log("Settings element found:", settingsEl);
      alert("Run this script before clicking the settings menu. Refresh the page and try again"); 
    alert("Reversion failed. Couldn't find settings menu element.");

  var settingsParent = settingsEl.parentElement;

  var root = frames[0];
  var path = search(root, [
      function(k,v){ return v && v.src == settingsParent}, 
      function(k,v){ return typeof(v) === "object"}, 
      function(k,v){ return v == settingsParent}]);

    alert("Reversion failed. Couldn't find settings object");

  console.log("Path found:", path);
  var settings = root;
  for(var i=0; i<3; i++){
    settings = settings[path[i]];

  console.log("Settings found:", settings);
  console.log("Oa:", settings.Oa);
  if(settings.Oa === false){
    settings.Oa = true;
    alert('Settings menu updated. Click "revert to old look temporarily" in the settings menu to complete.');
    for(var k in settings){
      if(settings[k] === false){
        settings[k] = true;
    alert('Settings menu probably updated. Click "revert to old look temporarily" in the settings menu to complete.');
  return void(0);

blog comments powered by Disqus