Skip to content

Instantly share code, notes, and snippets.

@dangerouse
dangerouse / afterSubmit.html
Last active July 20, 2016 20:10
Cloudsponge Widget Reference - The afterSubmitContacts callback
<!DOCTYPE html>
<html>
<head>
<!--
Include the script anywhere on your page, usually in the head
(don't forget to replace `localhost-only` with your own CloudSponge Widget Key)
-->
<script src="//api.cloudsponge.com/widget/localhost-only.js"></script>
<script>
// these values will hold the owner information
@dangerouse
dangerouse / child.html
Last active October 5, 2015 00:17
CloudSponge Widget Reference - CloudSponge on an iFrame (same domain as parent)
<!DOCTYPE html>
<html>
<head>
<title>CloudSponge Widget inside an iFrame</title>
</head>
<body>
<h1>Child!</h1>
<script>
// add the cloudsponge script to the parent document
var cloudspongeScript = parent.document.createElement('script');
@dangerouse
dangerouse / cross-domain-child.html
Last active October 5, 2015 00:17
CloudSponge Widget Reference - CloudSponge on an iFrame (different domain from parent)
<!DOCTYPE html>
<html>
<head>
<title>CloudSponge Widget inside an iFrame (cross-domain)</title>
</head>
<body>
<h1>Cross-frame Child!</h1>
<script>
// Asynchronously include the widget library.
// TODO: replace with your widget script
@dangerouse
dangerouse / cs_red.js
Last active October 6, 2015 15:28
CloudSponge Widget Reference - Changing the background color
window.csPageOptions = {
// other options ...
floatbox:{ mainColor:'#FF0000' },
stylesheet:'https://gist.githubusercontent.com/dangerouse/3014353/raw/50a9c4c1ca239529e48547de96e8a30be15c3501/red_address_books.css'
}
@dangerouse
dangerouse / beforeDisplayContacts.html
Last active January 23, 2024 21:22
Cloudsponge Widget Reference - The beforeDisplayContacts callback
<!DOCTYPE html>
<html>
<head>
<!--
Include the script anywhere on your page, usually in the head
(don't forget to replace `localhost-only` with your own CloudSponge Widget Key)
-->
<script src="https://api.cloudsponge.com/widget/localhost-only.js"></script>
<script>
// variable to hold the complete address book returned from api.cloudsponge.com
@dangerouse
dangerouse / selection.html
Last active July 20, 2016 20:13
Cloudsponge Widget Reference - Modify Selection of Contacts
<!DOCTYPE html>
<html>
<head>
<!--
Include the script anywhere on your page, usually in the head
(don't forget to replace `localhost-only` with your CloudSponge key)
-->
<script src="//api.cloudsponge.com/widget/localhost-only.js"></script>
<script>
@dangerouse
dangerouse / force_net.html
Last active October 6, 2015 16:08
Cloudsponge Widget Reference - Force .Net Outlook Import
<!DOCTYPE html>
<html>
<body>
<script type='text/javascript'>
// 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');
@dangerouse
dangerouse / all_none.html
Last active July 20, 2016 20:13
CloudSponge Widget Reference - Suppress All/None Links
<!DOCTYPE html>
<html>
<head>
<!--
Include the script anywhere on your page, usually in the head
(don't forget to replace `localhost-only` with your CloudSponge key)
-->
<script src="//api.cloudsponge.com/widget/localhost-only.js"></script>
<script>
// suppresses the 'All' and 'None' links on the contacts form
@dangerouse
dangerouse / csv.html
Last active October 7, 2015 23:49
CloudSponge Widget Reference - Forcing the CSV import
<!DOCTYPE html>
<html>
<body>
<a class="cs_import">Add from Address Book</a>
<textarea id="contact_list" style="width:450px;height:82px"></textarea>
<script type='text/javascript'>
// 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];
@dangerouse
dangerouse / afterImport.html
Last active July 20, 2016 20:09
Cloudsponge Widget Reference - The afterImport callback
<!DOCTYPE html>
<html>
<head>
<!--
Include the script anywhere on your page, usually in the head
(don't forget to replace `localhost-only` with your own CloudSponge Widget Key)
-->
<script src="//api.cloudsponge.com/widget/localhost-only.js"></script>
<script>
// extra widget options go here: