I realised this did not work for the mobile version. Change the following:
// search for <tr> or <div>, in that order
let mask_pages = ["/directory_items?|tr,div", "/about.json"];
// search from parent, as closest can include the object itself
mask_user_elem.parent().closest(mask_page_spec[1]).remove();
Hope this is of some use to people. As I said, I am sure a plug in would be a far better way of being able to mask users that are ‘admins’ and do not wish to be visible to a client forum.