diff --git a/resources/views/tracker.blade.php b/resources/views/tracker.blade.php index 8c9bdd1..c6c2e6c 100644 --- a/resources/views/tracker.blade.php +++ b/resources/views/tracker.blade.php @@ -88,8 +88,25 @@ icon: markerIcon }).addTo(map); + $popupContent = null; + @if(preg_match("/\[\[([^\]]+)\]\]/", $checkin->note, $filepath)) + @if(preg_match("/\.webm/", $filepath[1])) + @php $popupContent = ``; @endphp + @elseif(preg_match("/\.ogg/", $filepath[1])) + @php $popupContent = ``; @endphp + @endif + @else + @php $popupContent = `
{!! $checkin->note !!}
`; @endphp + @endif + popupMarkup = `{!! $checkin->note !!}
`; + popupMarkup += $popupContent; popupMarkup += ''; marker.bindPopup(popupMarkup).openPopup();