Skip to content

Instantly share code, notes, and snippets.

@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
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 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.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 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.js
Last active August 29, 2015 14:05
Zendesk: Changing wording of link "See all # of Articles"
//Change wording of link "See all # of articles" to "click to see more"
$('a.see-all-articles').text('Click to see more...');
@moderatorwes
moderatorwes / zendesk.js
Created August 3, 2014 03:51
Zendesk: Add attachment warning to Submit Ticket Screen
//add message about attachment
$('.upload-dropzone').before("<p>**attachments must be less than 5mb</p>");
@moderatorwes
moderatorwes / zendesk.js
Last active June 29, 2016 18:18
Zendesk: Show less than 6 articles
//Step by Step article located here: https://support.zendesk.com/entries/31041636-Show-less-than-6-articles-in-a-section-in-Help-Center
//Show less than 6 articles
if( document.location.href.indexOf('section') == -1 ) {
var categories = $('ul.article-list');
for (var j = categories.length - 1; j >= 0; j--) {
var articles = $(categories[j]).find('li'),
nativeMore = $(categories[j]).siblings('.see-all-articles');
if ( articles.length > 3 ) {
for (var k = 3; k < articles.length; k++ ) {
$(articles[k]).hide();
@moderatorwes
moderatorwes / zendesk.css
Created July 8, 2014 21:26
Zendesk: Placing icons beside Title on Category and Sections
h1.imageheading a, h2.imageheading a, h3.imageheading a,h1.imageheading, h2.imageheading,h3.imageheading, .section > h2,.section h3
{
font-size: 32px;
line-height: 64px;
padding-left: 80px;
}
.imageheading.general-icon {
background: #fff url(//p2.zdassets.com/hc/theme_assets/path to your image.png) top left no-repeat;
}
@moderatorwes
moderatorwes / zendesk.js
Last active June 8, 2021 00:47
Zendesk: Send Category to Community (Humble Squid Theme)
//send category links to community - Change category and google.com to your helpcenter
$('a').each(function() {
var value = $(this).attr('href');
if(value=='/hc/en-us/categories/200108526-Technical')
{
$(this).attr('href', 'http://google.com');
}
});