Created
July 23, 2013 15:12
-
-
Save mattsmallman/6063153 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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;'> £ <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