console.log( 'function addToHome() {
  var isSafari = navigator.userAgent.indexOf("Safari") > -1;
  var isIos = /(iPad|iPhone|iPod)/g.test(navigator.userAgent);

  if (isIos && isSafari) {
    var iconUrl = "http://comunidadepadremarcosrogerio.com.br";
    var appName = "Comunidade Padre Marcos"; // Substitua pelo nome que deseja usar para o atalho

    var a = document.createElement("a");
    a.setAttribute("href", "/");
    a.setAttribute("onclick", "addToHome()");
    a.innerHTML = "Adicionar à Tela Inicial";
    document.body.appendChild(a);

    setTimeout(function() {
      var event = new MouseEvent("click", {
        view: window,
        bubbles: true,
        cancelable: true
      });
      a.dispatchEvent(event);

      setTimeout(function() {
        var event = new MouseEvent("click", {
          view: window,
          bubbles: true,
          cancelable: true
        });
        document.querySelector(".popover a").dispatchEvent(event);

        var event = new MouseEvent("click", {
          view: window,
          bubbles: true,
          cancelable: true
        });
        document.querySelector(".popover .add-to-home-screen-modal-add-button").dispatchEvent(event);

        document.querySelector(".popover").remove();
      }, 500);
    }, 100);
  }
}
' );