From df5f6048e6a177b5ce3920d10a1249129c669a1f Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Wed, 19 Jun 2024 19:50:55 -0300 Subject: client: client modules --- .../js/client/css-compatibility-assistant.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/static/js/client/css-compatibility-assistant.js (limited to 'src/static/js/client/css-compatibility-assistant.js') diff --git a/src/static/js/client/css-compatibility-assistant.js b/src/static/js/client/css-compatibility-assistant.js new file mode 100644 index 00000000..6e7b15b5 --- /dev/null +++ b/src/static/js/client/css-compatibility-assistant.js @@ -0,0 +1,22 @@ +/* eslint-env browser */ + +export const info = { + id: 'cssCompatibilityAssistantInfo', + + coverArtContainer: null, + coverArtImageDetails: null, +}; + +export function getPageReferences() { + info.coverArtContainer = + document.getElementById('cover-art-container'); + + info.coverArtImageDetails = + info.coverArtContainer?.querySelector('.image-details'); +} + +export function mutatePageContent() { + if (info.coverArtImageDetails) { + info.coverArtContainer.classList.add('has-image-details'); + } +} -- cgit 1.3.0-6-gf8a5