Created
October 15, 2018 13:29
-
-
Save johnstanfield/e703566d9125aababfe716e576e3662f to your computer and use it in GitHub Desktop.
GMail diet - Greasemonkey / Tampermonkey script that makes the new GMail a bit more like the old GMail
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name GMail Diet | |
// @namespace http://johnstanfield.com/ | |
// @version 0.1 | |
// @description deflates the ~3Q2018 GMail web app. The GMail web app prior to the version released around Q3 2018 was nice and compact. The new version has extra padding that is trimmed by this script. Tested in Tampermonkey on Chrome 56. | |
// @author John Stanfield | |
// @match *://mail.google.com/* | |
// @grant none | |
// ==/UserScript== | |
// thank you Hors Sujet | |
// https://stackoverflow.com/questions/23683439/gm-addstyle-equivalent-in-tampermonkey#answer-33176845 | |
function GM_addStyle(css) { | |
const style = document.getElementById("GM_addStyleBy8626") || (function() { | |
const style = document.createElement('style'); | |
style.type = 'text/css'; | |
style.id = "GM_addStyleBy8626"; | |
document.head.appendChild(style); | |
return style; | |
})(); | |
const sheet = style.sheet; | |
sheet.insertRule(css, (sheet.rules || sheet.cssRules || []).length); | |
} | |
(function() { | |
'use strict'; | |
// deflate emails in list | |
GM_addStyle('tr.zA { padding-top: 2px; padding-bottom: 2px; }'); | |
// remove right sidebar | |
GM_addStyle('.nH.bAw.nn { display:none }'); | |
// deflate labels | |
GM_addStyle('.TN.bzz, .TN.aY7xie { height: 20px }'); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment