Skip to content

Instantly share code, notes, and snippets.

@boertel
Created May 23, 2013 18:43
Show Gist options
  • Save boertel/5638434 to your computer and use it in GitHub Desktop.
Save boertel/5638434 to your computer and use it in GitHub Desktop.
PunchTab connect button
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<button id="connect-button">Connect</button>
<script type="text/javascript" charset="utf-8">
var _ptq = _ptq || [];
var _punchtab_settings = {
bar: {},
key: "<YOUR PUNCHTAB KEY"
};
(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);
})();
window.ptReady = window.ptReady || [];
window.ptReady.push(function () {
var connectButton = PT.dom.$("connect-button");
PT.widget.connect.attachConnect(connectButton);
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment