<commit_before>// ==UserScript==
// @name         Gmail Hacks for Mailtrack and Asana
// @namespace    http://tampermonkey.net/
// @version      0.5
// @description  
// @author       You
// @match        https://mail.google.com/mail/u/*
// @grant        none
// ==/UserScript==

(function() {
	'use strict';
	setInterval(function() {
		/* auto click 'remove' signature button */
		var removes = document.getElementsByClassName('mt-remove');
		for( var i = 0; i < removes.length; i++ ) {
			removes[i].click();
			
			/* clean junk spaces of mailtrack */
			var $editable = document.getElementsByClassName('editable');
			if($editable.length > 0) {
				if($editable[0].getElementsByClassName('gmail_signature').length == 0) {
					$editable[0].innerHTML = '';
				}
			}
		}

		/* removes any modal of mailtrack */
		var deletar = [
		document.getElementsByClassName('mt-modal-iframe'),
		document.getElementsByClassName('modal-backdrop'),
		document.querySelectorAll('[id*=intercom], [id=fred]')
		];

		for(var i in deletar) {
			if( deletar[i].length > 0 ) {
				for(var j = 0; j < deletar[i].length; j++) {
					deletar[i][j].remove();
				}
			}
		}

		/* remove signature of asana reply */
		var $from = document.querySelectorAll('h3.iw span.gD');
		if($from.length > 0) {
			$from = $from[0].getAttribute('email');
			if( /<EMAIL>/.test($from) ) {
				var $dots = document.querySelectorAll('.aH1');
				if( $dots.length > 0 ) {
					$dots[0].parentNode.click();
					document.getElementsByClassName('editable')[0].innerHTML = '';
				}
			}
		}
		
	},500);
})();<commit_msg>melhorias<commit_after>// ==UserScript==
// @name         Gmail Hacks for Mailtrack and Asana
// @namespace    http://tampermonkey.net/
// @version      0.5
// @description  
// @author       You
// @match        https://mail.google.com/mail/u/*
// @grant        none
// ==/UserScript==

(function() {
	'use strict';
	setInterval(function() {
		/* auto click 'remove' signature button */
		var removes = document.getElementsByClassName('mt-remove');
		for( var i = 0; i < removes.length; i++ ) {
			removes[i].click();
			
			/* clean junk spaces of mailtrack */
			var $editable = document.getElementsByClassName('editable');
			if($editable.length > 0) {
				if($editable[0].getElementsByClassName('gmail_signature').length == 0) {
					$editable[0].innerHTML = '';
				}
			}
		}

		/* removes any modal of mailtrack */
		var deletar = [
		document.getElementsByClassName('mt-modal-iframe'),
		document.getElementsByClassName('modal-backdrop'),
		document.querySelectorAll('[id*=intercom], [id=fred]')
		];

		for(var i in deletar) {
			if( deletar[i].length > 0 ) {
				for(var j = 0; j < deletar[i].length; j++) {
					deletar[i][j].remove();
				}
			}
		}
		
	},500);
})();
{'fraction_non_alphanumeric': 0.1839913074972836, 'fraction_numerical': 0.011227816008692503, 'mean_word_length': 2.9457142857142857, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 10, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4297418', 'n_tokens_mistral': 1089, 'n_tokens_neox': 932, 'n_words': 183}