27 lines
830 B
JavaScript
Executable File
27 lines
830 B
JavaScript
Executable File
$(document).ready(function () {
|
|
var nextCtl = $('#vars').attr('nextCtl');
|
|
var c = $('button.accordion-button[data-bs-target="#ctl' + nextCtl + '"]');
|
|
$(c).click();
|
|
$('button[action]').click(function() {
|
|
var action = $(this).attr('action');
|
|
var url = null;
|
|
var target = action;
|
|
if ( action == 'jitsi' ) {
|
|
url = 'https://meet.homelabbrisbane.com.au/hlb';
|
|
}
|
|
if ( action == 'map' ) {
|
|
url = 'https://www.google.com/maps/place/' + $(this).attr('coordinates');
|
|
}
|
|
if ( action == 'copy' ) {
|
|
navigator.clipboard.writeText( $(this).attr('value') );
|
|
}
|
|
if ( url != null ) {
|
|
window.open( url, target );
|
|
}
|
|
});
|
|
var isPhone = /Mobi|Android|iPhone|iPod/i.test(navigator.userAgent) || window.innerWidth <= 768;
|
|
if (isPhone) {
|
|
$("body").addClass("phone");
|
|
}
|
|
});
|