Skip to content

Instantly share code, notes, and snippets.

@keg
Created October 31, 2014 19:36
Show Gist options
  • Select an option

  • Save keg/7d02206855dc8f481f11 to your computer and use it in GitHub Desktop.

Select an option

Save keg/7d02206855dc8f481f11 to your computer and use it in GitHub Desktop.
function thatKindofDay(headlineLinkPrepend,subhedDayPrepend,linkDayHash,topHeaderDayPrepend) {
// Rewrite the links on the page, adding the hash to article urls.
dfm.$('a.complexListingLink, a.listingItemTitle, h1.articleTitle, #mc-widget-container-large a').prepend(headlineLinkPrepend);
if ( dfm.$('#articleSubTitle').length ) dfm.$('#articleSubTitle').prepend(subhedDayPrepend);
// Rewrite the links on the page, adding the hash to article urls.
dfm.$('a').attr('href', function()
{
return this + 'linkDayHash';
});
dfm.$('.topic-header, .complexListingTitle').prepend(topHeaderDayPrepend);
}
if ( document.location.hash == '#sadday' ) {
thatKindofDay("It's a sad day for kids as ","","#sadday","Sad ");
}
if ( document.location.hash == '#happyday' ) {
thatKindofDay("It's a happy day for kids as ","","#happyday","Happy ");
}
if ( document.location.hash == '#dumbday' ) {
thatKindofDay("How dumb: ","","#dumbday","Dumb ");
}
if ( document.location.hash == '#dumberday' ) {
thatKindofDay("Super dumb: ","Dumb dumb dumb dumb dumb. ","#dumberday","Dumb ");
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment