Javascript listen for style changes made in developer-tools
Is there a way to detect style changes made only in the developer-tools (inspect element)? I want to allow to save them if the user is logged in as admin. You can access the styles of a HTMLElement using element.style in JavaScript. So you could probably save the styles on page load, check them again when the user initiates a save and compare -- the difference would be the users changes. As for detecting them as soon as they happen, you can use MutationObserver to get notified of attribute changes on the page. This works for when you add styles to a specific element in the Devtools, but not