Hi All!
I’m posting my latest newsletter today because I’m excited to show you my latest short story – it’s a featured original on Tor.com! I love the artwork they created for it. Hop on over to Tor.com and see what you think.
|
function add_click_handlers() { jQuery('.social_link').click(function(e) { e.preventDefault(); track_click(e); }); }
function animateShare(name) { var elem = document.getElementById("mimio_share_" + name); if(elem) { elem.className += " animation"; } }
function show_share(share) { hide_all_shares(); var mimioShare = document.getElementById('mimio_share_' + share); console.log(share, mimioShare) if(mimioShare) { document.getElementById('overlay_block').style.display = 'block' mimioShare.style.display = 'block'; animateShare(share); } }
function hide_share(share) { var mimioShare = document.getElementById('mimio_share_' + share); if(mimioShare) { mimioShare.style.display = 'none'; document.getElementById('overlay_block').style.display = 'none' } }
function hide_all_shares() {
var share_types = ["facebook","twitter","plusone","pinterest","linked_in"];
for(var i = 0; i < share_types.length; i++) {
hide_share(share_types[i]);
}
}
function track_click(e) {
var statUrl = e.currentTarget.attributes['data-mimi-stat-url'];
if (statUrl != undefined) {
var href = statUrl.value;
// If we're viewing a promotion with a 'fake' promotion attempt, then these values will be macros, like [[facebook_like]]
if(href.toString().indexOf('[[') != 0) {
jQuery.ajax({
url: href,
dataType: 'jsonp'
});
}
}
}
var wrapper = document.getElementById("madmimi_outer_wrapper");
if (wrapper) {
wrapper.className = "animation";
}