Last active
October 11, 2019 04:41
-
-
Save tvst/0bdd07513c5abfcc465d009b99cbb9a9 to your computer and use it in GitHub Desktop.
Make Gmail more Inbox-like (RIP)
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
javascript:(() => { | |
/* Autohide header */ | |
const header = document.querySelector('.nH.w-asV.aiw'); | |
hide = () => { | |
header.style.transition = 'opacity 300ms 300ms, transform 300ms 300ms'; | |
header.style.opacity = 0; | |
header.style.transform = 'translateY(-50px)'; | |
}; | |
show = () => { | |
header.style.transition = 'opacity 150ms 0ms, transform 150ms 0ms'; | |
header.style.opacity = 1; | |
header.style.transform = ''; | |
}; | |
header.addEventListener('mouseover', show); | |
header.addEventListener('mouseout', hide); | |
hide(); | |
const css = document.createElement('style'); | |
css.innerText = ` | |
/* header */ | |
.nH.w-asV.aiw { | |
position: fixed; | |
background: #fff; | |
boxShadow: 0 2px 10px rgba(0, 0, 0, 0.2); | |
border: none; | |
} | |
/* main body */ | |
.nH.bkK.nn > .nH { | |
width: 50em; | |
margin: 20px auto; | |
} | |
/* footer */ | |
.Tm.aeJ > .aeG { | |
display: none; | |
} | |
`; | |
document.body.append(css); | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment