Skip to content

Instantly share code, notes, and snippets.

@moderatorwes
moderatorwes / zendesk.js
Created August 27, 2014 20:29
Zendesk: Hide Entire Category when using Category_Tree
//Hide certain categories/section from HomePage using {Category_Tree}}
$('h2 a:contains("KNOWLEDGE BASE")').hide();
$('h2 a:contains("KNOWLEDGE BASE")').closest('.category').hide();
$('h2 a:contains("FAQs")').hide();
$('h2 a:contains("FAQs")').closest('.category').hide();
@moderatorwes
moderatorwes / zendesk.css
Created September 9, 2014 17:46
Zendesk: Change color of font on attachment area
.upload-dropzone span {
color: red !important;
}
@moderatorwes
moderatorwes / zendesk.js
Created September 11, 2014 02:31
Zendesk: Hide the Contribution Link from My Activities
// Hide the Contribution Link from My-Activities
$("nav.my-activities-nav").find('li:nth-child(2)').remove();
@moderatorwes
moderatorwes / zendesk.js
Last active March 2, 2016 14:44
Zendesk: Hide Articles List on HomePage
if (window.location.href == "https://yoururl.zendesk.com/hc/en-us") {
$('ul.article-list').hide();
}
@moderatorwes
moderatorwes / zendesk.js
Created October 4, 2014 14:32
Zendesk: Humble Squid Blocks - Different Color Blocks
//Chage background color of Humble Squid blocks
$( ".category-list li:nth-child(1)" ).css( "backgroundColor", "#00628B" );
$( ".category-list li:nth-child(2)" ).css( "backgroundColor", "#E6E6DC" );
$( ".category-list li:nth-child(3)" ).css( "backgroundColor", "#81A594" );
//Change Text color of the second block
$( ".category-list li:nth-child(2)" ).css( "color", "#000" );
@moderatorwes
moderatorwes / zendesk.js
Created October 17, 2014 19:40
Zendesk: Change voting wording if article is in a certain category
//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");
}
@moderatorwes
moderatorwes / zendesk.js
Last active August 29, 2015 14:07
Zendesk: Remove Author and replace with another author
//Remove author from articles
$(".article-author").first("a").html(
$(".article-author").first("a").html().replace("Inactive Agent", "Support Team")
);
@moderatorwes
moderatorwes / zendesk.js
Created December 17, 2014 16:35
Zendesk: Change text of Promoted Articles
//Change text of Promoted Articles
$("h3:contains('Promoted articles')").text('Important Information');
@moderatorwes
moderatorwes / zendesk.js
Created December 18, 2014 17:04
Zendesk: Section Tree with Article
// Removing the article dropdown
$('.article-list a[aria-selected]').removeAttr('aria-selected').removeAttr('data-asynchtml-ressource')
});
@moderatorwes
moderatorwes / zendesk.js
Created December 18, 2014 17:39
Zendesk: Related Articles & Recently Viewed Articles show only 4
//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();