Last active
May 6, 2020 07:49
-
-
Save codingthat/6d405392aeea21dbcfa7b6b2a963f36d to your computer and use it in GitHub Desktop.
Bookmarklet to make Trello errors absurdly big (if also unreadable) so they're impossible to miss
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
javascript:(function () { | |
const notification_element = document.getElementById('notification'); | |
notification_element.style.cssText = 'position: static; left: 0;'; | |
const set_errors_huge = (a,b) => { | |
const huge_css = ` | |
display: block; | |
min-width: 100%; | |
max-width: 100%; | |
position: absolute; | |
left: 0; | |
top: 0; | |
font-size: 400%; | |
height: 100%; | |
`; | |
notification_element.children.forEach(e=>{e.style.cssText = huge_css}); | |
}; | |
const config = { childList: true, subtree: true }; | |
let bootstrap_observer; | |
bootstrap_observer = new MutationObserver(set_errors_huge); | |
bootstrap_observer.observe(notification_element, config); | |
})(); |
You're welcome @amingilani — BTW this morning I found it sometimes made Trello a bit laggy. This version improves it by targeting the notification element for observation, since it always exists from the beginning anyway. (I'm not sure why that should make a difference, though...my other Trello bookmarklet also targets trello-root and it still works. ¯_(ツ)_/¯ )
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you!!