"CONFIDENTIAL_IDS not found in shield"]); exit; } $c = str_replace($old, $new, $c); // Also neutralize the window.__opusPatternOpen function (prevent opening) $old2 = "console.log('[ambre-confidential-shield] active on public page: ' + path);"; $new2 = "// Neutralize global opusPatternOpen function (prevents programmatic opening) try { Object.defineProperty(window, '__opusPatternOpen', { value: function(){}, writable: false, configurable: false }); Object.defineProperty(window, '__opusPatternClose', { value: function(){}, writable: false, configurable: false }); } catch(e) {} console.log('[ambre-confidential-shield] active on public page: ' + path);"; $c = str_replace($old2, $new2, $c); $backup = "/opt/wevads/vault/shield.GOLD-" . date("Ymd-His") . "-wave262-v2"; @copy($path, $backup); $wrote = @file_put_contents($path, $c); echo json_encode([ "delta" => strlen($c) - $orig, "wrote" => $wrote, ]);