Skip to content

Instantly share code, notes, and snippets.

@ericf
Created December 1, 2010 20:08
Show Gist options
  • Select an option

  • Save ericf/724127 to your computer and use it in GitHub Desktop.

Select an option

Save ericf/724127 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<title>TipTheWeb Button Test</title>
</head>
<body>
<h1>TipTheWeb Button Test</h1>
<p><a class="ttw-button" href="http://tiptheweb.org/tip/">Tip This!</a></p>
<script>
// TipTheWeb Button Config
TTW = window.TTW || {};
TTW.Button = TTW.Button || {
URL : 'http://tiptheweb.org/tip/button.js',
URL_SECURE : 'https://tiptheweb.org/tip/button.js'
};
// Load TipTheWeb Button JavaScript
(function(){
var script = document.createElement('script');
script.async = true;
script.src = window.location.protocol === 'https:' ? TTW.Button.URL_SECURE : TTW.Button.URL;
document.getElementsByTagName('head')[0].appendChild(script);
}());
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment