If using a script that applies display: none is an acceptable solution, is there a reason you can’t just use CSS from the start?
.admin-main-nav a[href="/admin/api"] {
display: none;
}
If using a script that applies display: none is an acceptable solution, is there a reason you can’t just use CSS from the start?
.admin-main-nav a[href="/admin/api"] {
display: none;
}