Skip to content

Instantly share code, notes, and snippets.

@ibernabel
Created February 9, 2024 16:04
Show Gist options
  • Select an option

  • Save ibernabel/f01540b5f5d9b324f6706af7cdfc4179 to your computer and use it in GitHub Desktop.

Select an option

Save ibernabel/f01540b5f5d9b324f6706af7cdfc4179 to your computer and use it in GitHub Desktop.

Revisions

  1. ibernabel created this gist Feb 9, 2024.
    11 changes: 11 additions & 0 deletions click-to-web-whatsapp.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    setTimeout(function(){
    const url = window.location.href;
    if(url.includes("api.whatsapp.com")){
    let button = document.querySelector("#action-button");
    button.click();
    setTimeout(function(){
    let link = document.querySelector("#fallback_block > div > div > h4:nth-child(2) > a");
    link.click();
    },300);
    }
    },300);