Since this uses the same logic, you can combine the selector and save a few lines:

    jQuery('a.shareText[href*=upworthy], a.shareText[href*=medium]').each(function() {