Skip to content

Instantly share code, notes, and snippets.

@hmelenok
Created December 16, 2022 10:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hmelenok/03fea9037afea28b03f1bef1b4615f54 to your computer and use it in GitHub Desktop.
Save hmelenok/03fea9037afea28b03f1bef1b4615f54 to your computer and use it in GitHub Desktop.
remove colors from bg of elements
Array.from(document.querySelectorAll('.edit-detailed-section *')).filter(el => {
if(el.style["background-color"] === 'rgb(255, 255, 255)' || el.style["background-color"] === 'white'){
el.style["background-color"] = '';
}
});
//Remove any color
Array.from(document.querySelectorAll('.edit-detailed-section *')).filter(el => {
if(el.style["background-color"]){
el.style["background-color"] = '';
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment