Skip to content

Instantly share code, notes, and snippets.

@dangerouse
dangerouse / alwaysShowCTA.html
Created April 24, 2017 18:03
CloudSponge Widget Reference - always display the button to export 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 own CloudSponge Widget Key)
-->
<script src="//api.cloudsponge.com/widget/localhost-only.js"></script>
<script>
cloudsponge.init({
@dangerouse
dangerouse / postContacts.html
Last active August 8, 2016 22:50
CloudSponge Widget Reference - Post selected contacts to your server
<!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:
@dangerouse
dangerouse / localeData.html
Last active April 12, 2017 21:18
CloudSponge Widget Reference - Override Locale Data
<!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>
// extra widget options go here:
@dangerouse
dangerouse / en-us.json
Last active October 29, 2020 19:20
CloudSponge Widget Reference - Locale Data Structure
{
"POWERED_BY" : "powered by",
"ADDRESS_BOOK" : "Choose Your Address Book",
"AUTHORIZATION" : "Authenticating",
"AUTHORIZATION_FOCUS" : "Click here to authenticate",
"SIGN_IN" : "Sign in",
"LOADING_CONTACTS" : "<span class=\"cloudsponge-icon ${provider}\"></span> ${name}",
"SEARCH_CONTACTS" : "Search ${name}",
"SEARCH_SELECTED" : "Search selected contacts",
"NO_SELECTED_CONTACTS" : "There are no selected contacts",
@dangerouse
dangerouse / lazy-load.html
Last active July 20, 2016 18:56
CloudSponge Widget Reference - Lazy load the widget as needed
<!DOCTYPE html>
<html>
<body>
<script>
// statically declare your cloudsponge options *before* including your widget script
window.csPageOptions = {
// you can set your configuration options here
// ...
// setting lazyLoad to true will delay loading the cloudsponge object
// you must call cloudsponge.load() before any interaction with the widget
@dangerouse
dangerouse / custom-sources.css
Created April 20, 2016 22:15
CloudSponge Widget Reference - Example CSS to replace source icons
/* suppress the default logo by cloudsponge */
.source-logo img {
display: none;
}
/* set the padding on the source-logo div to accomodate the custom logo. assumes a 32px by 32px logo in this case */
.source-logo {
padding-top: 16px;
padding-left: 32px;
}
/* insert a new logo for Gmail */
@dangerouse
dangerouse / solo-auth-proxy.html
Last active July 24, 2022 18:38
CloudSponge HTML-only Proxy Page
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>OAuth Proxy Page</title>
<!-- Including the CloudSponge proxy script here to redirect to the CloudSponge server -->
<script>
// This auth-proxy.js can be placed on any HTML page to turn it into a
// CloudSponge Proxy URL.
// It pulls the proper OAuth parameters out and sends them to CloudSponge
@dangerouse
dangerouse / auth-proxy.html
Last active August 9, 2018 11:06
CloudSponge HTML/JS Proxy Endopoint
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>OAuth Proxy Page</title>
<!-- Including the CloudSponge proxy script here to redirect to the CloudSponge server -->
<script src="auth-proxy.js"></script>
</head>
<body>
<p>Thank you for completing the OAuth flow.</p>
@dangerouse
dangerouse / api-csv-import.md
Created December 11, 2015 17:37
CloudSponge API - Generic CSV import example

Step 1: Begin Import

~ $ curl -u [user_info] -d "" "https://api.cloudsponge.com/begin_import/user_consent?service=csv"
{
    "echo": null,
    "id": 82261119,
    "import_id": 82261119,
    "import_type": "CSV",
    "status": "success",

"url": "https://api.cloudsponge.com/csv/RW3C2BC",

@dangerouse
dangerouse / cloudsponge-angular.js
Last active March 31, 2020 23:58
CloudSponge Widget Reference - AngularJS sample controller
<!DOCTYPE html>
<html ng-app="cloudspongeApp">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>CloudSponge Example using AngularJS</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js"></script>
<script>
window.csPageOptions = {
// configure the widget for a friendlyer mobile interface