Sha256: 3ac39ea06add962b06e7d5bb58f62512e90c912950dd21fc78c2248f1e0bab5a
Contents?: true
Size: 1.13 KB
Versions: 16
Compression:
Stored size: 1.13 KB
Contents
document.addEventListener("spree:load", function() { const LiveViewSwitcher = document.getElementById('LiveViewSwitcher') if (!LiveViewSwitcher) return LiveViewSwitcher.addEventListener('click', function(event) { if (event.target && event.target.matches("input[type='radio']")) { switchLiveViewClass(event.target.id) } }) function switchLiveViewClass(value) { const liveViewCont = document.getElementById('liveViewCont') liveViewCont.classList = '' liveViewCont.classList.add(value) } const cmsSectionEditorFullScreen = document.getElementById('cmsSectionEditorFullScreen') cmsSectionEditorFullScreen.addEventListener('click', function(event) { if (this.getAttribute('aria-pressed') === 'true') { document.body.removeAttribute('data-sections-editor-full-screen') } else { document.body.setAttribute('data-sections-editor-full-screen', '') } }) const queryString = window.location.search; const urlParams = new URLSearchParams(queryString); const fullScreenMode = urlParams.get('section_editor_full_screen_mode') if (fullScreenMode) cmsSectionEditorFullScreen.click() })
Version data entries
16 entries across 16 versions & 1 rubygems