Geenstijl add remover

Remove adds articles from Geenstijl.nl

目前为 2019-02-12 提交的版本。查看 最新版本

// ==UserScript==
// @name         Geenstijl add remover
// @namespace    https://www.geenstijl.nl/
// @version      0.1
// @description  Remove adds articles from Geenstijl.nl
// @author       Rick van der Staaij
// @require      http://code.jquery.com/jquery-latest.min.js
// @include      https://www.geenstijl.nl/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    function removeAddArticles() {
        var cleanCounter = 0;
        $('article').each(function() {
            if ($(this).find(".compost-warn:contains('- Ingezonden mededeling -')").length > 0) {
                cleanCounter++;
                $(this).remove();
            }
        });
        if (cleanCounter > 0) {
            console.log('[Geenstijl add killer] Removed ' + cleanCounter + ' spam cards.');
        }
    }

    console.log('[Geenstijl add killer] Killing spam...');
    removeAddArticles();
})();