Last active
April 12, 2017 09:54
-
-
Save metaquanta/a3b06a96c314f00f6078064b86c7882f to your computer and use it in GitHub Desktop.
Gmail Priority Inbox - Labelled and Unread Sections
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
Array.from( | |
document.querySelectorAll('div.J-N') | |
).filter( | |
function(option) { | |
return option.attributes.cfg && option.attributes.cfg.nodeValue.indexOf("^all,") != -1; | |
} | |
).forEach( | |
function(option) { | |
option.attributes.cfg.nodeValue = option.attributes.cfg.nodeValue.replace("^all","^u"); | |
option.firstChild.innerText = option.firstChild.innerText + " and unread"; | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment