NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name Add Anti-Clickbait Snippets to Sydney Morning Herald Headings // @namespace https://openuserjs.org/users/mrj // @version 1 // @description The Sydney Morning Herald website has made their article headings super-clickbaity. More information about an article is often hidden in article URLs. This script displays this info under each article heading. // @match http*://www.smh.com.au/* // @grant none // @license MIT // ==/UserScript== $('h3.story__headline a').each(function () { var link = $(this); if (!link.hasClass('huffingtonpost')) { var path = link.prop('pathname'); var headingStart = path.lastIndexOf('/') + 1; var heading = path.charAt(headingStart).toUpperCase() + path.slice(headingStart+1, -21).replace(/-/g,' '); link.parent().after('<div><small>' + heading + '</small></div>'); } });