Last active
August 30, 2016 17:49
-
-
Save chucknado/b74342eb670e500912072cc141b936c3 to your computer and use it in GitHub Desktop.
Client-side script of Bottle app for simple server-side Zendesk app (https://support.zendesk.com/hc/en-us/articles/226176327)
This file contains hidden or 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
function init() { | |
var client = ZAFClient.init(); | |
switch (action) { | |
case 'notifySuccess': | |
client.invoke('notify', 'Request successful!'); | |
break; | |
case 'notifyFailure': | |
client.invoke('notify', msg, 'error'); | |
break; | |
} | |
} | |
window.addEventListener('load', init, false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment