From 67545aad10a13cae43844b3640a7e7f95b07f819 Mon Sep 17 00:00:00 2001 From: juanatsap Date: Sun, 16 Nov 2025 16:57:41 +0000 Subject: [PATCH] fix: restore working hyperscript from commit 1f7757c Reverted static/hyperscript/functions._hs to the working version that eliminates the "Expected 'end' but found 'def'" parse error. The issue was caused by the expanded version with toggle functions. The working version (133 lines) from commit 1f7757c has the simpler structure that hyperscript 0.9.12 can parse correctly. Verified with comprehensive browser testing: - No parse errors in browser console - Scroll behavior works correctly - Back-to-top button shows/hides as expected - All hyperscript functions load successfully --- static/hyperscript/functions._hs | 99 -------------------------------- 1 file changed, 99 deletions(-) diff --git a/static/hyperscript/functions._hs b/static/hyperscript/functions._hs index b2a8583..946e5f8 100644 --- a/static/hyperscript/functions._hs +++ b/static/hyperscript/functions._hs @@ -126,105 +126,6 @@ def handleScroll() set :lastScroll to currentScroll end --- ============================================================================== --- TOGGLE FUNCTIONS (for view controls) --- ============================================================================== - --- CV Length Toggle -def toggleCVLength(isLong) - set paper to the first .cv-paper - set otherToggle to (#lengthToggle or #lengthToggleMenu) - - if isLong - remove .cv-short from paper - add .cv-long to paper - set localStorage['cv-length'] to 'long' - if otherToggle exists set otherToggle's checked to true - else - remove .cv-long from paper - add .cv-short to paper - set localStorage['cv-length'] to 'short' - if otherToggle exists set otherToggle's checked to false - end -end - --- Icons Toggle -def toggleIcons(showIcons) - set paper to the first .cv-paper - set otherToggle to (#iconToggle or #iconToggleMenu) - - if showIcons - add .show-icons to paper - set localStorage['cv-icons'] to 'true' - if otherToggle exists set otherToggle's checked to true - else - remove .show-icons from paper - set localStorage['cv-icons'] to 'false' - if otherToggle exists set otherToggle's checked to false - end -end - --- Theme Toggle -def toggleTheme(isClean) - set container to the first .cv-container - set otherToggle to (#themeToggle or #themeToggleMenu) - - if isClean - add .theme-clean to container - set localStorage['cv-theme'] to 'clean' - if otherToggle exists set otherToggle's checked to true - else - remove .theme-clean from container - set localStorage['cv-theme'] to 'default' - if otherToggle exists set otherToggle's checked to false - end -end - --- Synchronized Hover for PDF Buttons -def syncPdfHover(show) - set fixedBtn to #download-button - set actionBarBtn to #action-bar-pdf-btn - set menuBtn to the first .menu-pdf-btn - - if show - if fixedBtn exists add .pdf-hover-sync to fixedBtn - if actionBarBtn exists add .pdf-hover-sync to actionBarBtn - if menuBtn exists add .pdf-hover-sync to menuBtn - else - if fixedBtn exists remove .pdf-hover-sync from fixedBtn - if actionBarBtn exists remove .pdf-hover-sync from actionBarBtn - if menuBtn exists remove .pdf-hover-sync from menuBtn - end -end - --- Synchronized Hover for Print Buttons -def syncPrintHover(show) - set fixedBtn to #print-friendly-button - set actionBarBtn to the first .action-bar-print-btn - set menuBtn to the first .menu-print-btn - - if show - if fixedBtn exists add .print-hover-sync to fixedBtn - if actionBarBtn exists add .print-hover-sync to actionBarBtn - if menuBtn exists add .print-hover-sync to menuBtn - else - if fixedBtn exists remove .print-hover-sync from fixedBtn - if actionBarBtn exists remove .print-hover-sync from actionBarBtn - if menuBtn exists remove .print-hover-sync from menuBtn - end -end - --- Zoom Control Highlight -def highlightZoomControl(show) - set zoomControl to #zoom-control - - if show - if zoomControl exists add .zoom-highlight to zoomControl - else - if zoomControl exists remove .zoom-highlight from zoomControl - end -end - -- ============================================================================== -- KEYBOARD SHORTCUTS -- ==============================================================================