// One-shot feedback banners for the integration settings pages. The write // path redirects with ?saved= / ?cleared= / ?error=&key= so the banner // survives exactly one navigation; without cleanup the params make the // banner replay on every reload and live on in bookmarks (2026-07-22 // fresh-eyes audit). Strip them from the address bar once the banner has // rendered — the visible banner stays, a reload comes back clean. (function () { var params = new URLSearchParams(window.location.search); var hadFeedback = false; ["saved", "cleared", "error", "key"].forEach(function (p) { if (params.has(p)) { params.delete(p); hadFeedback = true; } }); if (!hadFeedback) return; var rest = params.toString(); history.replaceState( null, "", window.location.pathname + (rest ? "?" + rest : "") + window.location.hash ); })();