Last active
June 18, 2017 11:14
-
-
Save ElfhirDev/fc7d2ce38f457395631c22438b337c64 to your computer and use it in GitHub Desktop.
gmail-enhancer
This file contains hidden or 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-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); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 ...