Skip to content

Instantly share code, notes, and snippets.

@mattsmallman
Created July 23, 2013 15:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattsmallman/6063153 to your computer and use it in GitHub Desktop.
Save mattsmallman/6063153 to your computer and use it in GitHub Desktop.
<html>
<head>
<!--
Shows total of funds raised, on and offline including gift aid (UK Tax refund) from justgiving.com on Panic Status Board: http://panic.com/statusboard/
Instructions:
1. Register for an API key and access at: https://api.justgiving.com/docs
2. Replace: https://api.justgiving.com/your-api-key/v1/fundraising/pages/your-page-name with the appropriate api-key and your-page-name
3. Place the page on an accessible web server
4. Install into Status Board using the DIY option
-->
<title>Justgiving.com Totaliser</title>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0">
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.6.2.min.js"></script>
<script>
$(document).ready(function(){
update();
setInterval(function(){update()},6000);
});
function update()
{
$.getJSON("https://api.justgiving.com/your-api-key/v1/fundraising/pages/your-page-name", {}, function (data) {
var total = Number(data.totalRaisedOnline) + Number(data.totalRaisedOffline) + Number(data.totalEstimatedGiftAid) ;
$('#raised').html(total);
})
};
</script>
</head>
<body>
<table style='border-spacing:0; border-collapse:collapse; width:100%; height:100%;'>
<tr>
<td style='padding-left:10px; font-size:36px; '> FUNDRAISING:</td>
<td style='font-size:36px; text-align:right;'> &pound <span id='raised'></span></div>
</td>
</tr>
</table>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment