Still, almost all pages (at least most web applications) need media queries for their layout as well as for their individual components.
I think the author of this little 10LOC script is well aware of the style attribute so I fail to see what you want to say with your original comment.
Especially the link - you do realize that this script is written in simple "vanilla js", right?
But soon grows into a mess. Legitimate use cases exist, but there are many obvious reasons to avoid using it as the main driver of page css.