can't get rid of init() just yet

This commit is contained in:
David 2017-05-18 21:46:30 -04:00
parent ec8d4960cd
commit 1226b8e721

View File

@ -13,6 +13,14 @@
<script type='text/javascript'> <script type='text/javascript'>
var publicSpreadsheetUrl = 'https://docs.google.com/spreadsheets/d/1w5Dc57wV0_rrKFsG7KM-qdPWEpqYk6lFu3JzAA0cSv0/pubhtml'; var publicSpreadsheetUrl = 'https://docs.google.com/spreadsheets/d/1w5Dc57wV0_rrKFsG7KM-qdPWEpqYk6lFu3JzAA0cSv0/pubhtml';
function init() {
Tabletop.init({
key: publicSpreadsheetUrl,
callback: showInfo,
simpleSheet: true
});
}
function showInfo(data, tabletop) { function showInfo(data, tabletop) {
$("#reloadLink").unbind('click'); $("#reloadLink").unbind('click');
$("#reloadLink").on("click", function() { init(); }); $("#reloadLink").on("click", function() { init(); });
@ -74,13 +82,7 @@
.replace(/^(An?|The)\s/i, ''); .replace(/^(An?|The)\s/i, '');
} }
window.addEventListener('DOMContentLoaded', function() { window.addEventListener('DOMContentLoaded', init);
Tabletop.init({
key: publicSpreadsheetUrl,
callback: showInfo,
simpleSheet: true
});
});
</script> </script>
</head> </head>
<body> <body>