Skip to content

Instantly share code, notes, and snippets.

@ElfhirDev
Last active June 18, 2017 11:14
Show Gist options
  • Save ElfhirDev/fc7d2ce38f457395631c22438b337c64 to your computer and use it in GitHub Desktop.
Save ElfhirDev/fc7d2ce38f457395631c22438b337c64 to your computer and use it in GitHub Desktop.
gmail-enhancer
// ==UserScript==
// @name gmail-enhancer
// @namespace gmail-enhancer
// @description gmail-enhancer UX experience
// @include https://mail.google.com/mail/*
// @version 1.2
// @grant none
// ==/UserScript==
(function() {
var removeHangoutsConversation = function() {
var lines = document.querySelectorAll(".zA");
var tbody = document.querySelectorAll(".F tbody");
for (var i = 0, l = lines.length; i < l ; i++) {
if (lines[i].childNodes[6].children[0] != undefined) {
if (lines[i].childNodes[6].children[0].className = "xM aVb") {
console.info("tr hangouts "+i+" was removed.");
lines[i].style.visibility = "hidden";
lines[i].style.height = "0px";
while (lines[i].hasChildNodes()) {
lines[i].removeChild(lines[i].lastChild);
}
}
}
}
};
var time1 = setTimeout(removeHangoutsConversation, 14000);
})();
@ElfhirDev
Copy link
Author

ElfhirDev commented Oct 31, 2016

Remove Hangouts conversations. UNIX rule : do one thing and do it well. Don't mix conversation in gmail while there is a separated service for Hangout conversations already.

1.2 : Don't remove them, but height 0 and hidden because of a click bug : it was acting as they were still there ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment