indicate gmail focus
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
function is_non_inbox_node(node){ | |
var is_non_inbox = false; | |
if (node.isContentEditable || | |
node.tagName == 'INPUT' || | |
node.tagName == 'TEXTAREA' || | |
node.getAttribute('aria-haspopup') == 'true' | |
){ | |
is_non_inbox = true; | |
} | |
/* console.log(is_non_inbox, node); */ | |
return is_non_inbox; | |
} | |
document.addEventListener('focusin', function(e) { | |
if (is_non_inbox_node(e.target)){ | |
cursor = document.querySelector('.PF.PE'); | |
cursor.classList.remove('PE'); | |
cursor.classList.add('PE-hide'); | |
} | |
}); | |
document.addEventListener('focusout', function(e) { | |
if (is_non_inbox_node(e.target)){ | |
cursor = document.querySelector('.PF.PE-hide'); | |
cursor.classList.add('PE'); | |
cursor.classList.remove('PE-hide'); | |
} | |
}); |
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
.f7.nH { | |
/* Add a inbox-style cursor to chat boxes. */ | |
border-left-width: 5px !important; | |
} | |
.PF { | |
/* Make inbox cursor larger. */ | |
width: 3px !important; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I use this with Minmalist for Everything.