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
//Only show five promoted articles | |
$(document).ready(function () { | |
if(typeof $('.promoted-articles ul').get(0) != 'undefined') { | |
var _sectionArticles = $('.promoted-articles ul'); | |
_sectionArticles.each(function(_aidx, _aitm) { | |
var _itmCount = $(_aitm).find('li').length; | |
var _allLink = $(_aitm).prev('h3').find('a').attr('href'); | |
if(_itmCount > 5) { | |
for(var x = (_itmCount - 1); x > 4; x--) { | |
$($(_aitm).find('li')[x]).remove(); |
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
//Link to Font Awesome for the icon | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"> |
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
<!--This code goes in your document head --> | |
<!-- Font Awesome --> | |
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"> |
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
/*Custom CSS for Video Icons on ArticleList */ | |
.video:before{ | |
content: "\f1c8"; | |
color: #585858; | |
font-family: FontAwesome; | |
font-style: normal; | |
font-weight: normal; | |
text-decoration: none; | |
font-size: 18px; | |
} |
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
//Adding text under Title for Humble Squid theme | |
$( ".category-list li:nth-child(1) a " ).after( "<p>description 1 goes here</p> " ); | |
$( ".category-list li:nth-child(2) a" ).after( "<p>description 2 goes here</p> "); | |
$( ".category-list li:nth-child(3) a" ).after( "<p>description 3 is a really really realy really really long description </p> " ); |
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
//Hiding the 5th and 6th so only 4 will show | |
$( "section.related-articles li:nth-child(5)" ).hide(); | |
$( "section.related-articles li:nth-child(6)" ).hide(); |
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
// Removing the article dropdown | |
$('.article-list a[aria-selected]').removeAttr('aria-selected').removeAttr('data-asynchtml-ressource') | |
}); |
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
//Change text of Promoted Articles | |
$("h3:contains('Promoted articles')").text('Important Information'); |
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
//Remove author from articles | |
$(".article-author").first("a").html( | |
$(".article-author").first("a").html().replace("Inactive Agent", "Support Team") | |
); |
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
//Change wording of voting controls if article is in a certain category | |
if ($('.breadcrumbs li:nth-child(2) :contains("Technical")').size() == 1) { | |
$('.article-vote-question').text("Do you like this"); | |
} | |
else{ | |
$('.article-vote-question').text("Was this article helpful"); | |
} |