ha. you are being sarcastic right? yes i tried that immediately. failed.
here is what worked:
import { apiInitializer } from "discourse/lib/api";
export default apiInitializer("1.0", (api) => {
api.onPageChange((url) => {
// url is typically the path
// but in some contexts it can be a full URL, so we handle both.
const path = url?.startsWith("http") ? new URL(url).pathname : url;
if (path === "/123") {
window.location.replace("https://dell.com/234");
}
});
Hi, just as some housekeeping I moved this from the original release notes thread to a new topic to keep the thread a little more tidy and to improve visibility. Good luck
However I did notice in your later example that you are no longer checking window.location.href. Is that the problem?