Skip to content

Instantly share code, notes, and snippets.

@codingthat
Last active May 6, 2020 07:49
Show Gist options
  • Save codingthat/6d405392aeea21dbcfa7b6b2a963f36d to your computer and use it in GitHub Desktop.
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
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);
})();
@amingilani
Copy link

Thank you!!

@codingthat
Copy link
Author

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