Regarding usage of JavaScript

On 20.02.2022 I decided to lift the “ban” on usage of JavaScript in this website. This gives me the freedom to implement some useful features for those that have it enabled. Any content that doesn’t depend on JavaScript will be perfectly consumable without it!

Any user data that might be saved isn’t, and never will be, used for purposes not listed here. There isn’t, and won’t ever be, any form of tracking or data collection that isn’t required for some feature (listed here).

Implemented features

Script Description GitLab source Size Lines
Click to zoom on images 551B 24
Automatically appearing button to scroll to top 378B 15
Disable/enable certain stylesheets before page rendering 385B 13
Change theme between light and dark (split in two files) 468B 18
Change whether text covers the whole width of the page or only the middle (applicable to wide screens) 640B 23
Button to shrink and expand the sidebar 728B 20
Presentation logic (button capabilities and other) Loaded only on pages with presentations! 5.0KB 154
Implements keyboard shortcuts 810B 40
Total without presentation.js: 4.0KB 153
Total with presentation.js: 9.0KB 307

Data in browser storage

Local storage

Key Values Description
theme dark | light Saves which theme should be loaded
width norm | wide Saves in which width pages should be shown
navbar norm | hidden Saves whether the navbar should be expanded or shrunk