2020-10-23 22:54:30 +00:00
|
|
|
$(() => {
|
|
|
|
// Enable any tooltips on the page
|
|
|
|
$('[data-toggle="tooltip"]').tooltip()
|
|
|
|
|
|
|
|
// Enable masonry layout
|
|
|
|
$('.masonry').each(function() {
|
|
|
|
var opts = { itemSelector: '.masonry-item' }
|
|
|
|
if ($(this).hasClass('masonry-horizontal')) opts.horizontalOrder = true
|
|
|
|
|
|
|
|
$(this).masonry(opts)
|
|
|
|
})
|
|
|
|
|
|
|
|
// Resize textareas to fit their content
|
|
|
|
$('textarea').each(function() {
|
|
|
|
$(this).height($(this)[0].scrollHeight)
|
|
|
|
})
|
2020-10-25 18:40:21 +00:00
|
|
|
|
|
|
|
// Use google analytics in production
|
|
|
|
if (!window.location.hostname.includes('dev')) {
|
|
|
|
window.dataLayer = window.dataLayer || [];
|
|
|
|
function gtag(){dataLayer.push(arguments);}
|
|
|
|
gtag('js', new Date());
|
|
|
|
|
|
|
|
gtag('config', 'UA-167178542-1');
|
|
|
|
}
|
2020-10-23 22:54:30 +00:00
|
|
|
});
|