window.onload = function () {
  var isAndroid = /(android)/i.test(navigator.userAgent);
  var backToAppLink = document.getElementById('backToAppLink');
  if (isAndroid) {
    backToAppLink.href = "firstscotrail://com.firstscotrail/deeplink";
  } else {
    backToAppLink.href = "scotrail://";
  }
}
