Skip to content

Instantly share code, notes, and snippets.

@metaquanta
Last active April 12, 2017 09:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save metaquanta/a3b06a96c314f00f6078064b86c7882f to your computer and use it in GitHub Desktop.
Save metaquanta/a3b06a96c314f00f6078064b86c7882f to your computer and use it in GitHub Desktop.
Gmail Priority Inbox - Labelled and Unread Sections
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