|
1
|
|
-(()=>{"use strict";window.tp=window.tp||{},tp.CM_custom_css=wp.codeEditor.initialize("option-custom-css",{}).codemirror;const s=tp.CM_custom_css.getWrapperElement(),t=function(){this.classList.contains("disabled")||(this.classList.add("large"),tp.CM_custom_css.refresh(),this.removeEventListener("mousedown",t))};s.addEventListener("mousedown",t);const e=document.getElementById("option-use-custom-css");e.addEventListener("change",(function(){tp.CM_custom_css.setOption("readOnly",!this.checked),s.classList.toggle("disabled",!this.checked)})),e.dispatchEvent(new Event("change"))})(); |
|
1
|
+(()=>{"use strict";window.tp=window.tp||{},document.addEventListener("DOMContentLoaded",()=>{tp.CM_custom_css=wp.codeEditor.initialize("option-custom-css",{}).codemirror;const t=tp.CM_custom_css.getWrapperElement(),e=function(){this.classList.contains("disabled")||(this.classList.add("large"),tp.CM_custom_css.refresh(),this.removeEventListener("mousedown",e))};t.addEventListener("mousedown",e);const s=document.getElementById("option-use-custom-css");s.addEventListener("change",function(){tp.CM_custom_css.setOption("readOnly",!this.checked),t.classList.toggle("disabled",!this.checked)}),s.dispatchEvent(new Event("change"))})})(); |