2012 bar on Basic Gmail

Changes the Basic Gmail bar to 2012 Gmail

Versione datata 09/07/2021. Vedi la nuova versione l'ultima versione.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

You will need to install an extension such as Tampermonkey to install this script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         2012 bar on Basic Gmail
// @version      0.2
// @description  Changes the Basic Gmail bar to 2012 Gmail
// @author       Ian Hiew
// @match        *://mail.google.com/*
// @icon         https://www.google.com/s2/favicons?domain=mail.google.com
// @grant        none
// @namespace https://greasyfork.org/users/782542
// ==/UserScript==

//get user email
function readCookie(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for(var i=0;i < ca.length;i++) {
        var c = ca[i];
        while (c.charAt(0)==' ') c = c.substring(1,c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    }
    return null;
}
var name = readCookie("GAUSR");

//and do funny!!!
//add css or die
function changeDocumentHead(){
    var head = document.head;
  var link = document.createElement("link");

  link.type = "text/css";
  link.rel = "stylesheet";
  link.href = "https://cleantalk.cf/foogle/toolbar-css.css";

  head.appendChild(link);
}
window.setTimeout(changeDocumentHead,300);

//now change code
//we are funny and based
function replaceHtmlReal(){
var tochange = document.getElementById('guser');
tochange.innerHTML = `
<div id="mngb">
 <div id="gb">
  <script nonce="rQKKL1czeZ9pyOU7fZDwWw==">
   window.gbar&&gbar.eli&&gbar.eli()
  </script>
  <div id="gbw">
   <div id="gbz">
    <span class="gbtcb"></span>
    <ol id="gbzc" class="gbtc">
     <li class="gbt">
      <a
       class="gbzt"
       id="gb_1"
       href="https://www.google.com.my/webhp?tab=ww&amp;authuser=0"
       ><span class="gbtb2"></span><span class="gbts">Search</span></a
      >
     </li>
     <li class="gbt">
      <a
       class="gbzt"
       id="gb_2"
       href="https://www.google.com.my/imghp?hl=en&amp;tab=wi&amp;authuser=0"
       ><span class="gbtb2"></span><span class="gbts">Images</span></a
      >
     </li>
     <li class="gbt">
      <a
       class="gbzt"
       id="gb_8"
       href="https://maps.google.com.my/maps?hl=en&amp;tab=wl&amp;authuser=0"
       ><span class="gbtb2"></span><span class="gbts">Maps</span></a
      >
     </li>
     <li class="gbt">
      <a
       class="gbzt"
       id="gb_78"
       href="https://play.google.com/?hl=en&amp;tab=w8&amp;authuser=0"
       ><span class="gbtb2"></span><span class="gbts">Play</span></a
      >
     </li>
     <li class="gbt">
      <a
       class="gbzt"
       id="gb_36"
       href="https://www.youtube.com/?gl=MY&amp;tab=w1&amp;authuser=0"
       ><span class="gbtb2"></span><span class="gbts">YouTube</span></a
      >
     </li>
     <li class="gbt">
      <a
       class="gbzt"
       id="gb_426"
       href="https://news.google.com/?tab=wn&amp;authuser=0"
       ><span class="gbtb2"></span><span class="gbts">News</span></a
      >
     </li>
     <li class="gbt">
      <a
       class="gbzt gbz0l gbp1"
       id="gb_23"
       href="https://mail.google.com/mail/?tab=wm&amp;authuser=0"
       ><span class="gbtb2"></span><span class="gbts">Gmail</span></a
      >
     </li>
     <li class="gbt">
      <a
       class="gbzt"
       id="gb_49"
       href="https://drive.google.com/?tab=wo&amp;authuser=0"
       ><span class="gbtb2"></span><span class="gbts">Drive</span></a
      >
     </li>
     <li class="gbt">
      <a
       class="gbgt"
       id="gbztm"
       href="https://www.google.com.my/intl/en/about/products?tab=wh"
       aria-haspopup="true"
       aria-owns="gbd"
       ><span class="gbtb2"></span
       ><span id="gbztms" class="gbts gbtsa"
        ><span id="gbztms1">More</span><span class="gbma"></span></span
      ></a>
      <script nonce="rQKKL1czeZ9pyOU7fZDwWw==">
       document.getElementById('gbztm').addEventListener('click', function clickHandler() { gbar.tg(event,this); });
      </script>
      <div class="gbm" id="gbd" aria-owner="gbztm" style="visibility: hidden;">
       <div id="gbmmb" class="gbmc gbsb gbsbis">
        <ol id="gbmm" class="gbmcc gbsbic" style="max-height: 829px;">
         <li class="gbmtc">
          <a
           class="gbmt"
           id="gb_24"
           href="https://calendar.google.com/calendar?tab=wc&amp;authuser=0"
           >Calendar</a
          >
         </li>
         <li class="gbmtc">
          <a
           class="gbmt"
           id="gb_51"
           href="https://translate.google.com.my/?hl=en&amp;tab=wT&amp;authuser=0"
           >Translate</a
          >
         </li>
         <li class="gbmtc">
          <a
           class="gbmt"
           id="gb_10"
           href="https://books.google.com.my/?hl=en&amp;tab=wp&amp;authuser=0"
           >Books</a
          >
         </li>
         <li class="gbmtc">
          <a
           class="gbmt"
           id="gb_6"
           href="https://www.google.com.my/shopping?hl=en&amp;source=og&amp;tab=wf&amp;authuser=0"
           >Shopping</a
          >
         </li>
         <li class="gbmtc">
          <a
           class="gbmt"
           id="gb_31"
           href="https://photos.google.com/?tab=wq&amp;authuser=0&amp;pageId=none"
           >Photos</a
          >
         </li>
         <li class="gbmtc">
          <a
           class="gbmt"
           id="gb_25"
           href="https://docs.google.com/document/?usp=docs_alc&amp;authuser=0"
           >Docs</a
          >
         </li>
         <li class="gbmtc"><div class="gbmt gbmh"></div></li>
         <li class="gbmtc">
          <a
           href="https://www.google.com.my/intl/en/about/products?tab=wh"
           class="gbmt"
           >Even more »</a
          >
          <script nonce="rQKKL1czeZ9pyOU7fZDwWw==">
           document.querySelector('li > a.gbmt').addEventListener('click', function clickHandler() { gbar.logger.il(1,{t:66});; });
          </script>
         </li>
        </ol>
        <div class="gbsbt" style="opacity: 0;"></div>
        <div class="gbsbb" style="opacity: 0;"></div>
       </div>
      </div>
      <iframe
       tabindex="-1"
       id="gbs"
       src="javascript:''"
       aria-hidden="true"
       title="empty"
       style="visibility: hidden;"
       frameborder="0"
      ></iframe>
     </li>
    </ol>
   </div>
   <div id="gbg">
    <h2 class="gbxx">Account Options</h2>
    <span class="gbtcb"></span>
    <ol class="gbtc">
     <li class="gbt">
      <a
       class="gbgt"
       id="gbg4"
       href="https://profiles.google.com/?hl=en&amp;tab=wX&amp;authuser=0"
       aria-haspopup="true"
       aria-owns="gbd4"
       ><span class="gbtb2"></span>
       <script nonce="rQKKL1czeZ9pyOU7fZDwWw==">
        document.getElementById('gbg4').addEventListener('click', function clickHandler(event) { gbar.logger.il(50); gbar.tg(event,this); });
       </script>
       <span id="gbgs4" class="gbts gbtsa"
        ><span id="gbi4"
         ><span id="gbi4m1">[email protected]</span
         ><span class="gbma"></span></span></span
      ></a>
      <div class="gbm" id="gbd4" aria-owner="gbg4" guidedhelpid="gbd4">
       <div class="gbmc">
        <div id="gbmpdv">
         <div class="gbpc">
          <span id="gbmpn" class="gbps">Jun Ian</span>
          <script nonce="rQKKL1czeZ9pyOU7fZDwWw==">
           document.getElementById('gbmpn').addEventListener('click', function clickHandler(event) { gbar.logger.il(10,{t:69}); });
          </script>
          <span class="gbps2">[email protected]</span>
          <div class="gbmlbw">
           <a
            id="gb_150"
            href="https://myaccount.google.com/?utm_source=OGB&amp;tab=wk&amp;authuser=0"
            class="gbmlb"
            >Google Account</a
           >
           <script nonce="rQKKL1czeZ9pyOU7fZDwWw==">
            document.getElementById('gb_150').addEventListener('click', function clickHandler(event) { gbar.logger.il(10,{t:150}); });
           </script>
           –<a href="https://policies.google.com/privacy?hl=en" class="gbmlb"
            >Privacy</a
           >
           <script nonce="rQKKL1czeZ9pyOU7fZDwWw==">
            document.querySelector('div.gbmlbw > a.gbmlb').addEventListener('click', function clickHandler(event) { gbar.logger.il(10,{t:149}); });
           </script>
          </div>
         </div>
        </div>
        <div id="gbmps">
         <div id="gbmpasb" class="gbsb gbsbis">
          <div id="gbmpas" class="gbsbic">
           <div id="gbmpm_0" class="gbmtc gbp0">
            <a
             id="gbmpm_0_l"
             href="https://www.google.com/webhp?authuser=0"
             class="gbmt"
             ><span class="gbmpiaw"
              ><img
               class="gbmpia"
               data-asrc="https://lh3.googleusercontent.com/ogw/ADea4I7d7MFiPquiRH91IyG2Qoy3tlT63ffAsxnck8S1gg=s48-c-mo"
               alt="Jun Ian"
               src="https://lh3.googleusercontent.com/ogw/ADea4I7d7MFiPquiRH91IyG2Qoy3tlT63ffAsxnck8S1gg=s48-c-mo"
               width="48"
               height="48"
             /></span>
             <script nonce="rQKKL1czeZ9pyOU7fZDwWw==">
              document.querySelector('span.gbmpiaw.gbxv > img.gbmpia').addEventListener('error', function clickHandler() { window.gbar&&gbar.pae?gbar.pae(this):this.loadError=1; });
             </script>
             <span class="gbmpnw"
              ><span class="gbps">Place Holder</span
              ><span class="gbps2"
               ><span class="gbps3">[email protected]</span>
               (default)</span
              ></span
             ></a
            >
           </div>
           <div id="gbmpm_1" class="gbmtc">
            <a
             id="gbmpm_1_l"
             href="https://www.google.com/webhp?authuser=1"
             class="gbmt"
             ><span class="gbmpiaw"
              ><img
               class="gbmpia"
               data-asrc="https://lh3.googleusercontent.com/ogw/ADea4I4HxrDE_lK1ud6qdmLSOsCl4n7LWXpi3KwKyAkO=s48-c-mo"
               alt="3 idiots Studios inc"
               src="https://lh3.googleusercontent.com/ogw/ADea4I4HxrDE_lK1ud6qdmLSOsCl4n7LWXpi3KwKyAkO=s48-c-mo"
               width="48"
               height="48"
             /></span>
             <script nonce="rQKKL1czeZ9pyOU7fZDwWw==">
              document.querySelector('span.gbmpiaw.gbxv > img.gbmpia').addEventListener('error', function clickHandler() { window.gbar&&gbar.pae?gbar.pae(this):this.loadError=1; });
             </script>
             <span class="gbmpnw"
              ><span class="gbps">3 idiots Studios inc</span
              ><span class="gbps2"
               ><span class="gbps3">[email protected]</span></span
              ></span
             ></a
            >
           </div>
           <div id="gbmpm_2" class="gbmtc">
            <a
             id="gbmpm_2_l"
             href="https://www.google.com/webhp?authuser=2"
             class="gbmt"
             ><span class="gbmpiaw"
              ><img
               class="gbmpia"
               data-asrc="https://lh3.google.com/u/2/ogw/ADea4I7W7O-NqmUGqCXZj4GkLMg9MnK6d9_XPl6z3K-o=s48-c-mo"
               alt=""
               src="https://lh3.google.com/u/2/ogw/ADea4I7W7O-NqmUGqCXZj4GkLMg9MnK6d9_XPl6z3K-o=s48-c-mo"
               width="48"
               height="48"
             /></span>
             <script nonce="rQKKL1czeZ9pyOU7fZDwWw==">
              document.querySelector('span.gbmpiaw.gbxv > img.gbmpia').addEventListener('error', function clickHandler() { window.gbar&&gbar.pae?gbar.pae(this):this.loadError=1; });
             </script>
             <span class="gbmpnw"
              ><span class="gbps">Temp Name</span
              ><span class="gbps2"
               ><span class="gbps3">[email protected]</span></span
              ></span
             ></a
            >
           </div>
           <div id="gbmpm_3" class="gbmtc">
            <a
             id="gbmpm_3_l"
             href="https://www.google.com/webhp?authuser=3"
             class="gbmt"
             ><span class="gbmpiaw"
              ><img
               class="gbmpia"
               data-asrc="https://lh3.googleusercontent.com/ogw/ADea4I6uKP-snfs-0ku6CKOv_2VQ1HaTtouMpqSwePqS=s48-c-mo"
               alt="No Name"
               src="https://lh3.googleusercontent.com/ogw/ADea4I6uKP-snfs-0ku6CKOv_2VQ1HaTtouMpqSwePqS=s48-c-mo"
               width="48"
               height="48"
             /></span>
             <script nonce="rQKKL1czeZ9pyOU7fZDwWw==">
              document.querySelector('span.gbmpiaw.gbxv > img.gbmpia').addEventListener('error', function clickHandler() { window.gbar&&gbar.pae?gbar.pae(this):this.loadError=1; });
             </script>
             <span class="gbmpnw"
              ><span class="gbps">No Name</span
              ><span class="gbps2"
               ><span class="gbps3">[email protected]</span></span
              ></span
             ></a
            >
           </div>
           <div id="gbmpm_4" class="gbmtc">
            <a
             id="gbmpm_4_l"
             href="https://www.google.com/webhp?authuser=4"
             class="gbmt"
             ><span class="gbmpiaw"
              ><img
               class="gbmpia"
               data-asrc="https://lh3.googleusercontent.com/ogw/ADea4I7QVQ2UAnu5R9vmN3TgE3uyMEte9RsN68GKGUNN=s48-c-mo"
               alt="Speed cat"
               src="https://lh3.googleusercontent.com/ogw/ADea4I7QVQ2UAnu5R9vmN3TgE3uyMEte9RsN68GKGUNN=s48-c-mo"
               width="48"
               height="48"
             /></span>
             <script nonce="rQKKL1czeZ9pyOU7fZDwWw==">
              document.querySelector('span.gbmpiaw.gbxv > img.gbmpia').addEventListener('error', function clickHandler() { window.gbar&&gbar.pae?gbar.pae(this):this.loadError=1; });
             </script>
             <span class="gbmpnw"
              ><span class="gbps">E Man</span
              ><span class="gbps2"
               ><span class="gbps3">[email protected]</span></span
              ></span
             ></a
            >
           </div>
          </div>
          <div class="gbsbt" style="opacity: 0;"></div>
          <div class="gbsbb" style="opacity: 0;"></div>
         </div>
         <div id="gbmppc" class="gbxx gbmtc">
          <a class="gbmt" href="https://plus.google.com/u/0/dashboard"
           ><span class="gbmppci"></span>All your Google+ pages ›</a
          >
         </div>
        </div>
        <table id="gbmpal">
         <tbody>
          <tr>
           <td class="gbmpala">
            <a
             role="button"
             href="https://accounts.google.com/AddSession?hl=en&amp;continue=https://www.google.com/&amp;ec=GAlAAQ"
             class="gbqfbb"
             >Add account</a
            >
           </td>
           <td class="gbmpalb">
            <a
             target="_top"
             role="button"
             id="gb_71"
             href="https://accounts.google.com/Logout?hl=en&amp;continue=https://www.google.com/&amp;timeStmp=1625789247&amp;secTok=.AG5fkS8DQaQI8UgxJx-Gc2wrqfC1V06ASQ&amp;ec=GAdAAQ"
             class="gbqfbb"
             >Sign out</a
            >
            <script nonce="rQKKL1czeZ9pyOU7fZDwWw==">
             document.getElementById('gb_71').addEventListener('click', function clickHandler(event) { gbar.logger.il(9,{l:'o'}); });
            </script>
           </td>
          </tr>
         </tbody>
        </table>
       </div>
      </div>
     </li>
     <li class="gbt gbtb"><span class="gbts"></span></li>
     <noscript
      ><li class="gbt">
       <a
        class="gbgt"
        href="https://accounts.google.com/Logout?hl=en&continue=https://www.google.com/&timeStmp=1625789247&secTok=.AG5fkS8DQaQI8UgxJx-Gc2wrqfC1V06ASQ&ec=GAdAAQ"
        ><span class="gbtb2"></span><span class="gbts">Sign out</span></a
       >
      </li>
      <li class="gbt gbtb"><span class="gbts"></span></li
     ></noscript>
     <li class="gbt">
      <a
       class="gbgt"
       id="gbg5"
       href="http://www.google.com.my/preferences?hl=en"
       title="Options"
       aria-haspopup="true"
       aria-owns="gbd5"
       ><span class="gbtb2"></span
       ><span id="gbgs5" class="gbts"><span id="gbi5"></span></span
      ></a>
      <script nonce="rQKKL1czeZ9pyOU7fZDwWw==">
       document.getElementById('gbg5').addEventListener('click', function clickHandler() { gbar.tg(event,this); });
      </script>
      <div class="gbm" id="gbd5" aria-owner="gbg5">
       <div class="gbmc">
        <ol id="gbom" class="gbmcc">
         <li class="gbkc gbmtc">
          <a class="gbmt" href="/preferences?hl=en">Search settings</a>
         </li>
         <li class="gbmtc"><div class="gbmt gbmh"></div></li>
         <li class="gbkp gbmtc">
          <a
           class="gbmt"
           href="https://www.google.com/history/?hl=en&amp;authuser=0"
           >Web History</a
          >
         </li>
        </ol>
       </div>
      </div>
     </li>
    </ol>
   </div>
  </div>
  <div id="gbx3"></div>
  <div id="gbx4"></div>
  <script nonce="rQKKL1czeZ9pyOU7fZDwWw==">
   window.gbar&&gbar.elp&&gbar.elp()
  </script>
 </div>
</div>

        `
;
};
window.setTimeout(replaceHtmlReal,300);
//replace email string..and yeah
window.setTimeout(document.getElementById('gbi4m1').innerHTML = name,300);