Skip to content
function isiOS() {
return [
'iPad Simulator',
'iPhone Simulator',
'iPod Simulator',
'iPad',
'iPhone',
'iPod'
].includes(navigator.platform)
// iPad on iOS 13 detection
|| (navigator.userAgent.includes("Mac") && "ontouchend" in document)
}
let protocol;
if (isiOS() === true){
protocol = '&';
console.log ('yes iOS');
document.getElementById("textbutton").href = 'sms:+1'+protocol+'body=Hey - This is my favorite salon. I know you're going to love them! Here's a gift for $40 off you first visit! ';
} else {
protocol = '?';
console.log ('no iOS');
document.getElementById("textbutton").href = 'sms:+1'+protocol+'body=Hey - This is my favorite salon. I know you're going to love them! Here's a gift for $40 off you first visit! ';
}