How to remove CSS Class with Tampermonkey?

后端 未结 3 1121
孤街浪徒
孤街浪徒 2021-01-26 21:07

I am very new to CSS and javascript, so take it easy on me.

I am trying to remove the class disable-stream from each of the div elements under the div class

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-26 21:28

    var divs =document.getElementsByClassName("stream-notifications");
    
    divs=Array.from(divs);
    
    divs.forEach(function(div){
      div.classList.remove('disable-stream');
     });
    

提交回复
热议问题