Last active
July 11, 2019 10:47
-
-
Save aarongarciah/2cb0016c8e198ae87b2340b8c31c768c to your computer and use it in GitHub Desktop.
Hide Google Calendar Event Names
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
javascript:(function(){var a=document.querySelectorAll('[data-eventchip]');Array.from(a).forEach(function(b){var c=b.querySelector('[aria-hidden="true"]');if(c){var d=c.childNodes;Array.from(d).forEach(function(e){if(window.eventNamesHidden){var f=e.dataset.oldText;f&&(e.textContent=f)}else e.dataset.oldText=e.textContent,e.textContent=''})}}),window.eventNamesHidden=!!!window.eventNamesHidden})(); |
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() { | |
var nodes = document.querySelectorAll('[data-eventchip]'); | |
Array.from(nodes).forEach(elem => { | |
var inner = elem.querySelector('[aria-hidden="true"]'); | |
if (!inner) return; | |
var children = inner.childNodes; | |
Array.from(children).forEach(child => { | |
if (window.eventNamesHidden) { | |
var oldText = child.dataset['oldText']; | |
if (oldText) child.textContent = oldText; | |
} else { | |
child.dataset['oldText'] = child.textContent; | |
child.textContent = ''; | |
} | |
}); | |
}); | |
window.eventNamesHidden = !Boolean(window.eventNamesHidden); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment