The first 2 instances of fes-pagelet contain the main site logo and some menu options. I added a counter and an if statement to only remove fes-pagelet if count>2. My code is a little different from yours, but I'm sure you can see where it would be insterted:
count = 0;
document.querySelectorAll('.fes-pagelet').forEach(function(a) {
count=count+1;
if (count>2) {
a.remove();
}
})
Fix Logo/page header
The first 2 instances of fes-pagelet contain the main site logo and some menu options. I added a counter and an if statement to only remove fes-pagelet if count>2. My code is a little different from yours, but I'm sure you can see where it would be insterted:
count = 0;
document.querySelectorAll('.fes-pagelet').forEach(function(a) { count=count+1; if (count>2) { a.remove(); } })