Skip to content

Instantly share code, notes, and snippets.

@skipjac
skipjac / dectect-language.js
Created February 3, 2011 18:11
detects the language of a zendesk enduser
<div id="userNamewidget">
</div>
<script>
$j(document).ready(function() {
function trim11 (str) {
str = str.replace(/^\s+/, '');
for (var i = str.length - 1; i >= 0; i--) {
if (/\S/.test(str.charAt(i))) {
str = str.substring(0, i + 1);
break;
$j(document).ready(function() {
//check to see if you are on the end users request page
if(location.pathname === '/categories/3231-faq') {
Event.observe(window, 'load', function() {
$j('li.tab_faqs').addClass('active');
$j('li.tab_forums').removeClass('active');
});
}
});
@skipjac
skipjac / change-dropbox-email-lables.css
Created February 9, 2011 18:39
change email label to an image
/** change email label to an image **/
/** reference ticket #59770 **/
label[for='ticket_email'], label[for='email']
{
text-indent:-5000px;
background-image: url('http://i.dell.com/images/ap/buttons/icons/email_en_38x38.gif');
background-repeat:no-repeat;
height:38px;
}
@skipjac
skipjac / change-text-submit-form.js
Created February 11, 2011 05:12
Change the Text under email on the anonymous ticket submit in Zendesk
message = 'If you previously signed up with Support';
message += '(to post to the Forum and/or create a Support ticket) please ';
message += '<a href=\"login?return_to=http%3A%2F%2Fsupport.zendesk.com%2Frequests%2Fnew\">login</a>';
message += ' first to submit a request.';
//check to see if you are on the end users request page
if (window.location.href.indexOf('anonymous_requests') >= 0) {
jQuery('p:contains(If you are a registered user)').html(message);
}
@skipjac
skipjac / change-new-to-zendesk.js
Created February 17, 2011 20:13
changes the H2 on the login page
message = '<h2>Test</2>';
//check to see if you are on the end users request page
if (window.location.href.indexOf('access') >= 0) {
jQuery('h2:contains(New to)').html(message);
}
/***********************************************************************************************/
/*** changing colour of big search box on homepage***/
/***********************************************************************************************/
.green_box_bottom
{
background: url("/images/composite.gif") no-repeat scroll 0 -10px white; /* light "Dark Green" */
}
.green_box_top
{
background: url("/images/composite.gif") no-repeat scroll 0 0 white;
@skipjac
skipjac / change-submit-request.js
Created February 19, 2011 20:44
change the text on submit a request in zendesk
jQuery('#top-menu li.tab_new a').html('new');
jQuery('h2:contains(Submit a request)').html('new');
@skipjac
skipjac / hide-all-registration.js
Created March 1, 2011 16:41
This widget will hide the registration links in Zendesk on the login page
$j('#top-right a:contains(sign up)').hide();
if (window.location.href.indexOf('access') >= 0) {
$j('h2:contains(New to Sutoka)').parent().hide();
$j('h2:contains(No password)').parent().hide();
}
<script>
Event.observe( document, 'dom:loaded', beg_el = function() {
var textValue = $('ticket_fields_139051').value;
return textValue;
},
beg_nl = function() {
var textValue = $('ticket_fields_114704').value;
return textValue;});
@skipjac
skipjac / append-image-zendesk-forum-header.js
Created March 14, 2011 16:02
Append a image to the category header in zendesk forums
$j(".category-name h2").append("<img src=\"http://static-2.socialgo.com/cache/7217/tiny/17008.jpg\">");