Remove clutter from DuckDuckGo search

Removes ads, products and news.

// ==UserScript==
// @name         Remove clutter from DuckDuckGo search
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Removes ads, products and news.
// @author       Junglized
// @match        https://duckduckgo.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=duckduckgo.com
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    var observer = new MutationObserver(function(mutations) {
        mutations.forEach(function(mutation) {
            const ads = document.querySelectorAll('li');
            ads.forEach(ad => {
                const datasets = ['ad', 'products', 'products_middle', 'news'];
                datasets.forEach(dataset => {
                    if (ad.dataset.layout === dataset) {
                        ad.remove();
                    }
                });
            });
        });
    });


    var observerConfig = {
        attributes: true,
        childList: true,
        characterData: true
    };

    var targetNode = document.body;
    observer.observe(targetNode, observerConfig);
})();