Skip to content

Instantly share code, notes, and snippets.

@boertel
Created September 27, 2012 21:31
Show Gist options
  • Save boertel/3796586 to your computer and use it in GitHub Desktop.
Save boertel/3796586 to your computer and use it in GitHub Desktop.
PunchTab snippet
var _ptq = _ptq || [];
var _punchtab_settings = {
key: "2fed406f5ea11a79372eabadfe03aec3",
bar: {
text:{
loggedOut:"Look for <img src='http://rewards.alexiafoods.com/wp-content/uploads/2012/10/punchtab_share_icon.png'/> to collect more points",
},
tweet: {
text: "PREFIX " + document.title
},
referral:true
},
activity : {like:100,tweet:100,plusone:100},
defaultearning:{comment:false}
};
window.ptReady = window.ptReady || [];
window.ptReady.push(function () {
// Reward enable every comment
PT.event.bind('main.comment', function (response) {
if (response && response.commentID) {
_ptq.push(['comment', {points: 100, ref_id: response.commentID}]);
}
});
});
(function() {
var pt = document.createElement('script'); pt.type = 'text/javascript'; pt.async = true;
pt.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'static.punchtab.com/js/pt.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(pt, s);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment