0

Is there a way to hide the Share button from all the SharePoint online pages:-

enter image description here

thanks

2 Answers 2

1

For modern UI, anyway you can use a modern script editor to do the same thing. However once you switch to another page, the button still will returns. If you want to restrict users from sharing, it may be better to change the sharing settings to make only owners can share.

enter image description here

Then other members will not have this button on the right top.

enter image description here

1
0

You simply need to add a Script Editor or a Content Editor webpart and add the following script (QCB1_Button4 should be the id of the button, but this may change, check with F12 in browser):

<script type="text/javascript">
    function hideEdit() {
        var edit = document.getElementById("QCB1_Button4");
        edit.style.display = "none";
    }       
    _spBodyOnLoadFunctionNames.push("hideEdit");
</script>

Please mark the answer if it works for you!

1
  • Script Editor or a Content Editor webpart are not available inside Modern Ui
    – John John
    Nov 27, 2020 at 17:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.