mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-03 13:19:16 -05:00
testing safari
This commit is contained in:
@@ -46,6 +46,7 @@
|
|||||||
function openRecipe(id) {
|
function openRecipe(id) {
|
||||||
var link = $('#a_recipe_open');
|
var link = $('#a_recipe_open');
|
||||||
link.hide();
|
link.hide();
|
||||||
|
$('#div_loader').show();
|
||||||
|
|
||||||
var url = "{% url 'api_get_file_link' recipe_id=12345 %}".replace(/12345/, id);
|
var url = "{% url 'api_get_file_link' recipe_id=12345 %}".replace(/12345/, id);
|
||||||
|
|
||||||
@@ -55,7 +56,7 @@
|
|||||||
var xhttp = new XMLHttpRequest();
|
var xhttp = new XMLHttpRequest();
|
||||||
xhttp.onreadystatechange = function () {
|
xhttp.onreadystatechange = function () {
|
||||||
if (this.readyState === 4 && this.status === 200) {
|
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.attr("href", this.responseText);
|
||||||
link.show();
|
link.show();
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
Reference in New Issue
Block a user