We would like to ask for advice of following customization: In Sharepoint server 2019, we hid "Manage Parent" button (when modifying permission of site or list item) by inserting a custom script to C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\TEMPLATE\LAYOUTS\user.aspx (doing directy in the server where Sharepoint server was installed).
The script:
<script type="text/javascript"> var error = document.getElementById("Ribbon.Permission.Parent.ManageParent-Large"); if(error) error.style.display = 'none'; </script>
How can we do similarly in Sharepoint 365 (online)?
Thanks in advance.