From 263677a46ee031277fae07109acac17b5ef821c4 Mon Sep 17 00:00:00 2001 From: yo momma Date: Tue, 3 Feb 2026 21:30:24 +0000 Subject: Refactor: extract page init snippets --- static/js/pages/scroll_pane_init.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 static/js/pages/scroll_pane_init.js (limited to 'static/js/pages/scroll_pane_init.js') diff --git a/static/js/pages/scroll_pane_init.js b/static/js/pages/scroll_pane_init.js new file mode 100644 index 0000000..1508418 --- /dev/null +++ b/static/js/pages/scroll_pane_init.js @@ -0,0 +1,13 @@ +// Optional jScrollPane initializer for legacy pages that use `.scroll-pane`. +// Keep it defensive: some pages may not load the plugin. + +(function() { + if (typeof jQuery !== 'function') { return; } + + jQuery(function() { + if (jQuery.fn && typeof jQuery.fn.jScrollPane === 'function') { + jQuery('.scroll-pane').jScrollPane(); + } + }); +})(); + -- cgit v1.2.3-70-g09d2