# Advice on a hide admin from about page theme component--is this going to slow things down?

**URL:** <https://meta.discourse.org/t/advice-on-a-hide-admin-from-about-page-theme-component-is-this-going-to-slow-things-down/256877>\
**Category:** Development\
**Created:** [March 2, 2023, 8:19pm UTC](https://meta.discourse.org/t/advice-on-a-hide-admin-from-about-page-theme-component-is-this-going-to-slow-things-down/256877 "2023-03-02T20:19:07Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [March 2, 2023, 8:19pm UTC](https://meta.discourse.org/t/advice-on-a-hide-admin-from-about-page-theme-component-is-this-going-to-slow-things-down/256877/1 "2023-03-02T20:19:07Z")

</div>

I’m wanting to remove my user from the about page of some sites I manage. I’m not the one who’s going to delete your account, or anything else. . .

One way is this:

> [@How to hide admins from /about page](https://meta.discourse.org/t/how-to-hide-admins-from-about-page/43678/2):
>
> Since we often have to be admin to diagnose issues or change settings on our customer’s Discourse, we decided to hide all our @discourse.org accounts from the admins lists. That way, we’re not polluting our customer’s admins lists. We do this using a plugin that is automatically installed to all the Discourse we host and does something like after\_initialize do add\_to\_serializer(:about, :admins) do object.admins.reject { |u| u.email =~ /@discourse\.org/i } end end

But a plugin seems a bit heavy-handed these days, so I have a theme component that does this:

```plaintext
import { withPluginApi } from "discourse/lib/plugin-api";

const hidden_admins = settings.hidden_admins.split("|");
const PLUGIN_ID = "hide-admins";

export default {
  name: "theme-javascript-initializer",
  initialize() {
    withPluginApi("0.8.30", (api) => {
      api.onPageChange((url) => {
        if (url != "/about") {
          return;
        }
        for (const admin of hidden_admins) {
          var element = document.querySelector(`[data-username=${admin}]`);
          if (element === null) {
            break;
          }
          element.classList.add("hide-me");
        }
      });
    });
  },
};

```

Is that stupid for some reason? Does that onPageChange cost very much? The plugin would affect only the about serializer, this does a check on every page change. Is that bad?

There was a topic about just this issue lately that just hard-coded the user in the CSS. Would having just a single CSS in a theme that just did:

```plaintext
.about-page div[data-username="pfaffman"] {
  display: none !important;
}

```

be better? It wouldn’t be useful for anyone other than me, which is why I sort of like this theme component idea.

---

_[View the full topic](https://meta.discourse.org/t/advice-on-a-hide-admin-from-about-page-theme-component-is-this-going-to-slow-things-down/256877)._
