From a5cc38ecbd7386509d72c3c21530f1849ce08ad6 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Mon, 23 Dec 2019 18:33:45 +0100 Subject: [PATCH] testing safari --- cookbook/templates/include/recipe_open_modal.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cookbook/templates/include/recipe_open_modal.html b/cookbook/templates/include/recipe_open_modal.html index d01ebe882..d8f4a10a5 100644 --- a/cookbook/templates/include/recipe_open_modal.html +++ b/cookbook/templates/include/recipe_open_modal.html @@ -46,6 +46,7 @@ function openRecipe(id) { var link = $('#a_recipe_open'); link.hide(); + $('#div_loader').show(); var url = "{% url 'api_get_file_link' recipe_id=12345 %}".replace(/12345/, id); @@ -55,7 +56,7 @@ var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function () { if (this.readyState === 4 && this.status === 200) { - if (navigator.userAgent.toLowerCase().indexOf('safari/') > -1){ + if ( /^((?!chrome|android).)*safari/i.test(navigator.userAgent)){ link.attr("href", this.responseText); link.show(); }else{