The goal is to remove (not hide) all HTML elements based on a match to their name or class with a userscript. Here is a portion of the userscript in question. It doesn't remove the elements. What should be changed?
// ==UserScript==
// @name Clean Giveaway sites
// @version 1.0
// @namespace namespace
// @description Remove junk from giveaway sites
// @include http://udemy.com/*
// @include http://udemyar.com/*
// @include http://www.udemy.com/*
// @include http://www.udemyar.com/*
// @include https://udemy.com/*
// @include https://udemyar.com/*
// @include https://www.udemy.com/*
// @include https://www.udemyar.com/*
// @grant none
// ==/UserScript==
var killit = document.querySelectorAll('c_header__left');
if (killit[0]) {
killit[0].parentNode.removeChild(killit[0]);
}
var killit = document.querySelectorAll('c_header__right');
if (killit[0]) {
killit[0].parentNode.removeChild(killit[0]);
}
var killit = document.querySelectorAll('more-from-instructor ud-react-loader ud-component--more-courses-by-instructor--app ud-react-loaded');
if (killit[0]) {
killit[0].parentNode.removeChild(killit[0]);
}