Skip to content

Instantly share code, notes, and snippets.

View jbdietrich's full-sized avatar

James Dietrich jbdietrich

View GitHub Profile

Search

You can use the API to search for knowledge base articles, community posts, or well as external records.

You can call this API from a JavaScript client in a domain other than your Help Center. The API implements Cross-Origin Resource Sharing (CORS). CORS lets a JavaScript client access resources in other domains.

JSON Format

#include <stdio.h>
#include <stdlib.h>
#include "rinku.h"
#include "autolink.h"
int main() {
printf("Stinku!\n");
static const char *SKIP_TAGS[] = {"a", "pre", "code", "kbd", "script", NULL};
import re
import base64
import sys
import subprocess
import tempfile
certRegex = r'Certificate>(.*?)<'
beginText = "-----BEGIN CERTIFICATE-----\n"
endText = "-----END CERTIFICATE-----"
$(function(){
var tagMap = { "An Organization of Extraordinary Gentlemen": ["peg_leg", "mast"] };
var currentOrg = HelpCenter.user.organizations.length ? HelpCenter.user.organizations[0].name : null;
if (currentOrg) {
$('body').on('DOMNodeInserted', 'ul', function(event){
for (var i = 0; i < tagMap[currentOrg].length; i++) {
$('#' + tagMap[currentOrg][i]).remove();
}
</style>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
// intercept request and send it to an endpoint that honors sessions
var redirectSearch = function(e, data) {
var queryRegex = /suggestions_query=([^&]+)/g;
if (data.url.indexOf("/hc/api/v2/dropbox/search") != -1) {
var query = queryRegex.exec(data.url)[1];
</style>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
// intercept request and send it to an endpoint that honors sessions
var redirectSearch = function(e, data) {
var queryRegex = /suggestions_query=([^&]+)/g;
if (data.url.indexOf("/categories/search") != -1) {
var query = queryRegex.exec(data.url)[1];
</style>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
$('#suggestions_query').attr('autofocus', 'value');
});
</script>
<style>
{% if ticket.cc_names != empty %}
{% capture emails %}
{% for cc in ticket.ccs %}
{% unless forloop.last %}
{{ cc.email | append: ', ' }}
{% else %}
{{ cc.email }}
{% endunless %}
$.ajax({
url: "https://someplace.zendesk.com/proxy/to/https%3A%2F%2Fwww.someplace.com",
}).done(function( data ) {
if ( console && console.log ) {
console.log( "Sample of data:", data.slice( 0, 100 ) );
}
});
https://docs.google.com/a/zendesk.com/forms/d/1TbwKpgiFvLMRJLsY9zwnZVL9g6jytBQiwosVcyKfadA/edit