// DOM elements const cpuTempSpan = document.getElementById('cpuTempValue'); const thermalLoadSpan = document.getElementById('thermalLoadValue'); const fanSlider = document.getElementById('fanSlider'); const fanRpmDisplay = document.getElementById('fanRpmDisplay'); const logListDiv = document.getElementById('logList'); const clearLogBtn = document.getElementById('clearLogBtn'); const modeBtns = document.querySelectorAll('.mode-btn');
// --- Thermal simulation: temperature depends on load + fan cooling efficiency --- function updateThermalSimulation() // simulate dynamic load (like background processes) workloadCycle = (workloadCycle + 0.6) % 100; let simulatedLoad = 28 + 18 * Math.sin(workloadCycle * 0.12) + (Math.random() * 8); // also add small random walk for realism simulatedLoad = Math.min(95, Math.max(12, simulatedLoad)); currentLoad = Math.floor(simulatedLoad); // Cooling factor based on fan percent (0..1) + base cooling let fanCoolingFactor = (currentFanPercent / 100) * 0.65; // max 65% reduction effect let ambientEffect = 0.25; let rawTemp = 35 + (currentLoad * 0.55); // load impact let afterCooling = rawTemp - (fanCoolingFactor * 18) - ambientEffect; let newTemp = Math.min(98, Math.max(28, afterCooling + (Math.random() * 1.2 - 0.6))); newTemp = parseFloat(newTemp.toFixed(1)); // temperature inertia: smooth transition currentTemp = currentTemp * 0.75 + newTemp * 0.25; currentTemp = Math.round(currentTemp * 10) / 10; // apply thermal throttling warning register event if (currentTemp > 85 && lastTempLog !== 2) addLogEntry(`⚠️ THERMAL ALERT! CPU at $currentTemp°C · cooling power $currentFanPercent%`, true); lastTempLog = 2; else if (currentTemp > 72 && lastTempLog !== 1 && currentTemp <= 85) addLogEntry(`🔆 High thermal load: $currentTemp°C · fan @ $currentFanPercent%`); lastTempLog = 1; else if (currentTemp < 55 && lastTempLog === 2) addLogEntry(`✅ Temperature stabilized at $currentTemp°C`); lastTempLog = 0; else if (currentTemp <= 65 && lastTempLog === 1) lastTempLog = 0; // Update UI with colors if critical cpuTempSpan.innerHTML = `$currentTemp<span>°C</span>`; if (currentTemp > 80) cpuTempSpan.classList.add('temp-critical'); else cpuTempSpan.classList.remove('temp-critical'); thermalLoadSpan.innerHTML = `$Math.floor(currentLoad)<span>%</span>`;
clearLogBtn.addEventListener('click', () => while (logListDiv.firstChild) logListDiv.removeChild(logListDiv.firstChild); addLogEntry("🧹 Register log cleared · new session"); addLogEntry(`📊 current status: $currentTemp°C · fan $currentFanPercent% · $activeMode profile`); ); cpu cooling master register code free
let activeMode = "balanced"; // silent, balanced, performance, full
// For dynamic simulation (background workload fluctuation) let workloadCycle = 0; let lastTempLog = 0; // DOM elements const cpuTempSpan = document
// apply fan speed (update UI and RPM) function setFanSpeed(percent) percent = Math.min(100, Math.max(0, percent)); currentFanPercent = percent; fanSlider.value = percent; let newRPM = computeRPM(percent); currentRPM = newRPM; fanRpmDisplay.innerText = currentRPM + " RPM"; // add log only when significant change (avoid spam, but register cool events) // but we log only if changed by more than 3% or mode switch handled separately
.log-title font-weight: bold; letter-spacing: 1px; margin-bottom: 8px; display: flex; gap: 12px; align-items: center; const fanSlider = document.getElementById('fanSlider')
footer font-size: 0.65rem; text-align: center; margin-top: 28px; color: #4b6589; </style> </head> <body>