Sha256: c16f6428e7a6ead28563da53c53048381d9c3ab0d685eab3d72332f42bec8c44
Contents?: true
Size: 1.13 KB
Versions: 7
Compression:
Stored size: 1.13 KB
Contents
document.addEventListener('DOMContentLoaded', 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
7 entries across 7 versions & 1 rubygems