Automate WhatsApp Dialing with a Simple Bookmarklet
Introduction
Ever found yourself copying phone numbers to manually dial them on WhatsApp? Here's a simple bookmarklet to automate the process. It works directly in your browser and bypasses the need for any additional software.
What is a Bookmarklet?
A bookmarklet is a bookmark that contains JavaScript code. Instead of navigating to a webpage, clicking the bookmark runs the code on the current page.
How to Create the WhatsApp Dialer Bookmarklet
1. Open Bookmarks Manager: In your Chrome browser, open the bookmarks manager. You can do this by pressing Ctrl+Shift+O (Windows) or Cmd+Shift+O (Mac).
2. Add New Bookmark: Click on the 'Add new bookmark' option.
3. Fill in Details:
- Name: Give it a name like "WhatsApp Dialer".
- URL: Paste the following JavaScript code into the URL field:
javascript:(async () => {
const text = await navigator.clipboard.readText();
const match = text.match(/\+?\d+/g);
if (match) {
const phoneNumber = match.join('');
const waLink = `https://wa.me/${phoneNumber}`;
window.open(waLink, '_blank');
} else {
alert('No valid phone number found in clipboard.');
}
})();
4. Save: Click 'Save' to add the bookmarklet to your bookmarks bar.
How to Use
1. Copy Phone Number: Copy the phone number you want to dial. It can be in any format, e.g., "+12 34 56 78 90" or "Click to dial+12 34 56 78 90".
2. Click Bookmarklet: Simply click the "WhatsApp Dialer" bookmarklet on your bookmarks bar.
3. Done: A new tab will open, directing you to a WhatsApp chat with the dialed number.
Conclusion
This simple bookmarklet can save you time and make the process of dialing numbers on WhatsApp a breeze. Share it with your colleagues and increase productivity across the board!