Skip to content

Commit

Permalink
Update embedded checkout eventbrite
Browse files Browse the repository at this point in the history
  • Loading branch information
svenvanderburg committed Nov 9, 2024
1 parent a797699 commit 5ee6955
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
7 changes: 0 additions & 7 deletions _includes/javascript.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,6 @@
show_instructions();
});

// detect misssing iframe for Eventbrite
$(document).ready(function(){
if ($('iframe').height() == 0) {
$('iframe').before('<p>Looks like your adblocker blocked the registration window. Please navigate to <a href="https://www.eventbrite.com/tickets-external?eid={{info.eventbrite}}&ref=etckt">https://www.eventbrite.com/tickets-external?eid={{info.eventbrite}}&ref=etckt</a> to register.</p>');
}
});

// hide alerts when site is rendered on carpentries.github.io
$(document).ready(function() {
if (location.href.startsWith("https://carpentries.github.io/workshop-template/")) {
Expand Down
23 changes: 16 additions & 7 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,23 @@ displayed if the 'eventbrite' field in the header is not set.
{% if eventbrite %}
<strong>Some adblockers block the registration window. If you do not see the
registration box below, please check your adblocker settings.</strong>
<iframe
src="https://www.eventbrite.com/tickets-external?eid={{eventbrite}}&ref=etckt"
frameborder="0"
width="100%"
height="400px"
scrolling="auto">
</iframe>

<div id="eventbrite-widget-container"></div>

<script src="https://www.eventbrite.nl/static/widgets/eb_widgets.js"></script>

<script type="text/javascript">
window.EBWidgets.createWidget({
// Required
widgetType: 'checkout',
eventId: {{eventbrite}},
iframeContainerId: 'eventbrite-widget-container',
});
</script>
{% endif %}



<h2 id="general">General Information</h2>

{% comment %}
Expand Down

0 comments on commit 5ee6955

Please sign in to comment.