Thanks that works.
Edit: I changed it to this to make it case insensitive:
<script type="text/discourse-plugin" version="1.4.0">
function shouldHideLastSeen() {
const p = location.pathname.toLowerCase();
return p === "/u/username" || p.startsWith("/u/username/");
}
function hideLastSeen() {
if (shouldHideLastSeen()) {
document.querySelectorAll(".last-seen-at").forEach(el => el.remove());
}
}
api.onPageChange(hideLastSeen);
document.addEventListener("DOMContentLoaded", hideLastSeen);
</script>