Last active
December 23, 2023 01:40
-
-
Save shahnhogan/b05f819905abc1488b7d693d1eae2c74 to your computer and use it in GitHub Desktop.
Elm Debugger - nudge the debugger over when multiple Elm apps are on the same page
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
const elmDebuggers = document.querySelectorAll('[viewBox="-300 -300 600 600"]'); | |
Array.from(elmDebuggers).forEach((elmDebugger, index) => { | |
const nudgeAmount = `${1.5 + 6 * index}rem`; | |
elmDebugger.parentNode.style.right = nudgeAmount; | |
}); | |
// Thanks to https://github.com/lucamug for sharing this on Twitter | |
// Original thread -- https://x.com/luca_mug/status/1737954346745401590?s=20 | |
// @luca_mug example code: https://x.com/luca_mug/status/1738077153277931961?s=20 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment