Fix Self-closing
Fix eval(json)
Replace <font> tags with <small>
Added error: console.error(...) callbacks
Replace var with const/let
Added escapeHtml() helper used on all server-derived values
Wrapped g_outpath with encodeURIComponent() in updateSysInfo() and sendCommand()
Added encodeURIComponent(dev) for mount/umount commands
Added clamp() helper clamping progress values to [0, 100]
Added visibilitychange listener to stop/restart timers; triggers immediate refresh on tab restore