From 2e186b0d25c39dd068cbe9563f178e7576e329b8 Mon Sep 17 00:00:00 2001 From: ashley Date: Tue, 19 Aug 2025 13:16:48 +0200 Subject: [PATCH] Update html/custom-css.ejs --- html/custom-css.ejs | 307 +++++++++++++++++++++++++------------------- 1 file changed, 177 insertions(+), 130 deletions(-) diff --git a/html/custom-css.ejs b/html/custom-css.ejs index 29968c1c..edcfd5d1 100644 --- a/html/custom-css.ejs +++ b/html/custom-css.ejs @@ -1,7 +1,4 @@ - + @@ -265,158 +262,208 @@ document.addEventListener('DOMContentLoaded', () => {
© 2021–2025 PokeTube • Free software under the GNU GPL. Customizations are stored locally on your device.
+ + +});` + }); + on($('#saveJsBtn'),'click',jsEditor.save); + on($('#formatJsBtn'),'click',jsEditor.format); + on($('#copyJsBtn'),'click',jsEditor.copy); + on($('#exportJsBtn'),'click',jsEditor.exportFile); + on($('#resetJsBtn'),'click',jsEditor.reset); + on($('#importJsFile'),'change', async e=>{ const f=e.target.files?.[0]; if(f) await jsEditor.importFrom(f); }); + on($('#wrapJsBtn'),'click', e=>{ + const b=e.currentTarget; const onw=b.getAttribute('data-wrap')==='1'; + jsEditor.setWrap(!onw); b.setAttribute('data-wrap', onw?'0':'1'); b.textContent='Wrap: ' + (onw?'Off':'On'); + }); + + on(document,'keydown',e=>{ + if((e.ctrlKey||e.metaKey)&&e.key.toLowerCase()==='s'){ e.preventDefault(); jsEditor.save(); } + }); + <% } %> + + +