Skip to content

Instantly share code, notes, and snippets.

<html dir="ltr" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Cross-Domain Ajax Demo</title>
<link rel="stylesheet" type="text/css" media="screen" href="css/reset.css">
<link rel="stylesheet" type="text/css" media="screen" href="css/main.css">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.xdomainajax.js"></script>
@deepakrpathak
deepakrpathak / wowContacts
Last active October 3, 2017 18:10
Contact book creator for Whatsapp on web
/* Whatsapp on Web Contacts
Author : Deepak Pathak
*/
(function() {
function t() {
var t = "<style>div{margin:1em;display:inline-block;max-width:300px}img{object-fit:cover;width:300px;height:200px;}span{float:right;font-size:.85em}h3{padding:10px 5px;font-size:1em}h2{margin:2em;font-size:1.1em;line-height:1.4em}</style>";
for (var e in list) t += action ? '<div><img src="' + list[e].thumb.replace("t=s", "t=l") + '"><h3>' + list[e].name + "<span>+" + e + "</span></h3></div>" : list[e].name + "," + e + "<br>";
action && (t += "<h2>Save as PDF by right-click -> Print.. or ctrl/cmd+p. <em>Written by <a href='http://deepakpathak.ghost.io/'>Deepak Pathak</a></em>.</h2>"), $("body").html(t).css("padding", "10px").css("overflow", "visible")
}