Last active
October 10, 2016 17:36
-
-
Save JDMcKinstry/561c23c51cb01f229ee3733277b718c6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;(function() { | |
if (/(\/$)|\/(hot|trending)/.test(location.href)) { | |
var art = $('article:first').clone(), | |
/* REPLACEMENTS MADE BELOW */ | |
title = "YOU'RE AWESOME!", // replace between "" with what you want it to say | |
picLink = 'http://some.picture.com/pic.png', // replace this with a link to a pic you want on hots | |
profileLink = 'http://9gag.com/u/your_username'; // replace this with link to your profile | |
/* REPLACEMENTS MADE ABOVE */ | |
img = $('<img />', { 'alt': "Your pic link is incorrect.", 'src': picLink }).addClass('badge-item-img'); | |
art.find('.badge-item-title a').text(title); | |
art.find('.badge-post-container a:first').empty().css({ 'min-height': '' }).append(img); | |
art.find('.badge-item-title a, .badge-post-container a:first').prop('href', profileLink) | |
$('.badge-entry-collection').prepend(art); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment