How to ignore Port on the Grand Forks Herald website

(Updated 2021-04-09) If you really don’t care what Rob Port has to say, here’s a Greasemonkey script to hide his articles from appearing on the Grand Forks Herald website:

// ==UserScript==
// @name     _Remove Port
// @include  https://www.grandforksherald.com/*
// @require  http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js
// @grant    GM_addStyle
// ==/UserScript==
//- The @grant directive is needed to restore the proper sandbox.

/*--- Use the jQuery contains selector to find content to remove.
    Beware that not all whitespace is as it appears.
*/
var badDivs1 = $(".section-article-teaser-item:contains('Port:')");
var badDivs2 = $(".section-article-teaser-item:contains('Mailbag:')");
var badDivs3 = $(".section-article-teaser-item:contains('Plain Talk Live:')");

badDivs1.remove ();
badDivs2.remove ();
badDivs3.remove ();

//-- Or use badDivs.hide(); to just hide the content.

Taken almost entirely from https://stackoverflow.com/a/9169236/2152245.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.