mirror of
https://github.com/lhns/steam-frame-nix.git
synced 2026-10-06 09:00:25 +02:00
Document the patch calling convention once in lib/default.nix; patch headers say what, target, hook, state and contracts. Comments only, no code changes.
15 lines
600 B
JavaScript
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';
|
|
})()
|