Files
lhns--steam-frame-nix/modules/dashboard-windows/unpatch.js
T
Pierre Kisters 4c843c3ce4 Patch headers and comments: concise
Document the patch calling convention once in lib/default.nix; patch
headers say what, target, hook, state and contracts. Comments only, no
code changes.
2026-09-27 23:57:50 +02:00

15 lines
600 B
JavaScript

// Reverts dashboard-windows/patch.js: removes its SendMessage hook (and a
// VERSION 2 own wrapper if on top) and resends the scene graph so the stock
// limits apply at once. Safe when not patched.
(() => {
const NAME = 'dashboard-windows';
const st = window.__sfuiDashboardWindows;
if (!st) return 'not patched';
delete window.__sfuiDashboardWindows;
window.__sfuiHooks?.remove(st.proto, 'SendMessage', NAME);
const f = st.proto.SendMessage;
if (f?.__sfuiPatch === NAME) st.proto.SendMessage = f.__sfuiOrig;
try { st.resend?.(); } catch { /* ignore */ }
return 'unpatched';
})()