Skip to content

Instantly share code, notes, and snippets.

@diogok
Created May 10, 2017 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diogok/399d74ce9c70e434a48ce6f697ed293d to your computer and use it in GitHub Desktop.
Save diogok/399d74ce9c70e434a48ce6f697ed293d to your computer and use it in GitHub Desktop.
Zendesk new request filler
location
.search
.match(/([^&=?]+)=([^&]+)/g)
.map(function(kv) {
return kv.split("=")
}).map(function(kv) {
document.getElementById(kv[0]).value = decodeURIComponent(kv[1]).replace("+", " ")
});
// Usage: https://myohmy.zendesk.com/hc/pt-br/requests/new?request_anonymous_requester_email=joe@zendesk.com&request_custom_fields_77509687=Diogo+Silva&request_subject=Help+me
eval(atob("bG9jYXRpb24uc2VhcmNoLm1hdGNoKC8oW14mPT9dKyk9KFteJl0rKS9nKS5tYXAoZnVuY3Rpb24oa3YpIHsgcmV0dXJuIGt2LnNwbGl0KCI9IikgfSkubWFwKGZ1bmN0aW9uKGt2KXtkb2N1bWVudC5nZXRFbGVtZW50QnlJZChrdlswXSkudmFsdWU9ZGVjb2RlVVJJQ29tcG9uZW50KGt2WzFdKS5yZXBsYWNlKCIrIiwiICIpfSk7"))
// why not...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment