Replace outdated `CM_App.getLocation` with direct `window.location`.