Skip to content

Instantly share code, notes, and snippets.

@dangerouse
Last active October 1, 2015 11:08
Show Gist options
  • Save dangerouse/1980555 to your computer and use it in GitHub Desktop.
Save dangerouse/1980555 to your computer and use it in GitHub Desktop.
CloudSponge Widget Reference - Inline Display
<!DOCTYPE html>
<html>
<head>
<script>
// Asynchronously include the widget library.
// TODO: replace with your widget script
(function(u){
var d=document,s='script',a=d.createElement(s),m=d.getElementsByTagName(s)[0];
a.async=1;a.src=u;m.parentNode.insertBefore(a,m);
})('//api.cloudsponge.com/widget/YOUR_WIDGET_SCRIPT.js');
// extra widget options go here:
window.csPageOptions = {
textarea_id:'contact_list',
widgetContainerId:'cloudsponge_container', // suppress floatbox and display the widget inline
afterInit:function(){
cloudsponge.launch(); // display the address book sources as the page loads
}
};
</script>
</head>
<body>
<textarea id="contact_list" style="width:450px;height:82px"></textarea>
<div id="cloudsponge_container" style="width:487px;height:410px;"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment