/* =================================================== JAESWIFT.XYZ — Top Processes Panel Live-updating process table from /api/processes =================================================== */ (function () { 'use strict'; var tbody = document.getElementById('procTableBody'); if (!tbody) return; function cpuClass(val) { if (val >= 50) return 'proc-cpu-high'; if (val >= 15) return 'proc-cpu-med'; return 'proc-cpu-low'; } function fetchProcesses() { fetch('/api/processes') .then(function (r) { return r.json(); }) .then(function (procs) { if (!procs || !procs.length) return; var html = ''; for (var i = 0; i < procs.length; i++) { var p = procs[i]; var cls = cpuClass(p.cpu); html += '