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(); }
+ });
+ <% } %>
+
+
+