Skip to content

Instantly share code, notes, and snippets.

@dgershman
Created May 9, 2020 16:09
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 dgershman/4a2196e15bb26e71a4ee8a38baeed594 to your computer and use it in GitHub Desktop.
Save dgershman/4a2196e15bb26e71a4ee8a38baeed594 to your computer and use it in GitHub Desktop.
<link rel="stylesheet" type="text/css" href="/javascripts/croutonjs/crouton.min.css" />
<div style="padding:25px;">
<span id="page-title"></span>
<span id="meeting-count"></span>, <span id="group-count"></span>
<div id="bmlt-tabs"></div>
</div>
<script src="/javascripts/croutonjs/crouton.min.js"></script>
<script type="text/javascript">
function getParameterByName(name, url) {
if (!url) url = window.location.href;
name = name.replace(/[\[\]]/g, '\\$&');
var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, ' '));
}
var crouton = new Crouton({
"root_server": "https://canaacna.org/meetings/main_server/",
"service_body": [ 6 ],
"recurse_service_bodies": true,
"show_map": true,
"has_areas": true,
"google_api_key": "",
"template_path": "/javascripts/croutonjs/templates",
"distance_units": "km"
});
if (getParameterByName("filter") === "virtual") {
crouton.config["auto_tz_adjust"] = true;
crouton.config["base_tz"] = "America/Vancouver";
crouton.config["time_format"] = "h:mma z";
crouton.config["filter_tabs"] = true;
crouton.config["default_filter_dropdown"] = "formats=virtual-meeting"
}
crouton.render();
crouton.meetingCount(function(res) {
document.getElementById("meeting-count").innerHTML = "Meeting count: " + res;
});
crouton.groupCount(function(res) {
document.getElementById("group-count").innerHTML = "Group count: " + res;
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment