Created
June 13, 2014 17:43
-
-
Save skipjac/bdaee1ce41e65c2166cf to your computer and use it in GitHub Desktop.
Proof of concept to get labels for article pages in zendesk helpcenter
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
<script> | |
var getPath = document.location.pathname; | |
var locID = getPath.split('/'); | |
$.ajax({ | |
type: "GET", | |
url: 'https://yourdomain.zendesk.com/api/v2/help_center/articles/'+locID[locID.length -1]+'.json', | |
success: function(data){console.log(data)}, | |
dataType: 'application/json', | |
contentType: 'application/json' | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment