Indeed.com Remove Sponsor

Removes sponsored companies when job searching

// ==UserScript==
// @name         Indeed.com Remove Sponsor
// @namespace    http://joeyism.com/
// @version      1.1.2
// @description  Removes sponsored companies when job searching
// @author       joeyism
// @include      http*://*.indeed.com/*
// @include      http*://*.indeed.co.uk/*
// @include      http*://*indeed.tld/*
// @include      http*://*.indeed.*/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    function remove(elem){
        elem.parentNode.removeChild(elem);
    }

    function removeSponsor(allSponsors){
        while(allSponsors.length > 0){
            var elem = allSponsors[0];
            var sponsor = elem.parentElement.parentElement.parentElement.parentElement;
            remove(sponsor);
        }
    }

    function removeRecommendedSponsor(allSponsors){
        while(allSponsors.length > 0){
            var elem = allSponsors[0];
            var sponsor = elem.parentElement;
            remove(sponsor);
        }
    }
    removeSponsor(document.getElementsByClassName("sponsoredGray"));
    removeRecommendedSponsor(document.getElementsByClassName("sdn"));
})();