diff options
Diffstat (limited to 'static/js/story.js')
-rw-r--r-- | static/js/story.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/static/js/story.js b/static/js/story.js index 5f5432b..ff247f5 100644 --- a/static/js/story.js +++ b/static/js/story.js @@ -38,6 +38,18 @@ $( function() { } }); +// Render tweet-styled blockquotes, if <body> has the class feature-tweetquote and the blockquote ends +// with a twitter permalink URL. +$( function() { + if ( $( "body.feature-tweetquote:not(.feature-notweetquote)" ).length ) { + $("blockquote p:last-child a[href*='twitter.com']").each(function(i, e){ + $(this.parentElement.parentElement).addClass("tweet sans-serif mw6"); + $(this).addClass("no-underline link dim"); + $(this).append(' <i class="fab fa-twitter fa-lg">'); + }); + } +}); + // Render perspective book images, if <body> has the class // feature-3dbook-covers $( function() { |