Forum Discussion

RicardoC15's avatar
RicardoC15
Copper Contributor
May 16, 2020

Adding Javascript to Sharepoint Online Modern page? Cant find how to do it.

I need to add a Javascript to sharepoint online Modern page in order to be able to hide the Gear Icon (Settings) for certain users.

 

Someone already provided the code but cant find a way to upload it. Is there an editor or something. I am a total newbie to SPO Modern Sites.

2 Replies

  • RobElliott's avatar
    RobElliott
    Silver Contributor

    RicardoC15 there is no script editor in the modern experience, nor (out-of-the-box) can you change the CSS so you won't at the moment  be able to hide the gear.

     

    Rob
    Los Gallardos
    Microsoft Power Automate Community Super User

    • DLMDC's avatar
      DLMDC
      Copper Contributor

      Hi RobElliott 

       

      You should take a look at https://github.com/pnp/sp-dev-fx-webparts/tree/master/samples/react-script-editor It allows you to add a webpart where you can add custom js,html, css code

Resources