Hi friends, made this Cardhop extension.
There is an official one too, but I wanted to:
- Make sure it only showed up when I select a valid phone number. The official one shows up for even 4 digit numbers (e.g., 7890)
- Change the icon
This would only work on a valid number, so keeps your PopClip popups clean and only show up extensions, when they need to and can be applied.
(just select the text in the below code snippet, PopClip should show up, click install, and done, it’s that simple!!)
// # popclip extension for Cardhop Contacts
// name: Cardhop Contacts
// icon: iconify:teenyicons:contact-outline
// regex: (^\+?[1-9]\d{0,2}[-.\s]?(\(?\d{2,4}\)?)?[-.\s]?(\d[-.\s]?){9,}$)
// lang: js
const query = encodeURIComponent(popclip.input.text);
popclip.openUrl("x-cardhop://parse?s=" + query);
PopClip’s inverted syntax + regex is