Got this to work, but couldnt get the Icon to work. Anyway, if you want a PopClip for Perplexity:
# popclip
name: Perplexity
url: https://www.perplexity.ai/search/new?q=***
Got this to work, but couldnt get the Icon to work. Anyway, if you want a PopClip for Perplexity:
# popclip
name: Perplexity
url: https://www.perplexity.ai/search/new?q=***
// # popclip extension for Perplexity
// name: Perplexity Search | ⌥ for Browser
// icon: iconify:simple-icons:perplexity
// requirements: ["!urls"]
// lang: js
const query = encodeURIComponent(popclip.input.text);
if (popclip.modifiers.option) {
popclip.openUrl("");
} else {
popclip.openUrl("");
}
I should probably add this one to the official list, it’s pretty straightforward after all. @andy4222 your code doesn’t have anything in the strings, what’s meant to be in there?
Not sure on your code as it didnt work, but I got this to work with the icon, which I borrowed from you:
# popclip
name: Perplexity
icon: iconify:simple-icons:perplexity
url: https://www.perplexity.ai/search/new?q=***
@nick I thought @zimbow would just add the URL there for whatever they had to do lol.
Any way see this, modified for perplexity.
// # popclip extension for Perplexity
// name: Perplexity Search
// icon: iconify:simple-icons:perplexity
// requirements: ["!urls"]
// lang: js
const query = encodeURIComponent(popclip.input.text);
popclip.openUrl("https://www.perplexity.ai/search?q=" + query);
Haha, I see. Thanks! It’s because you had two URL slots so I though you were suggesting two different URLs for different purposes. I was curious what those were.
I just copy pasted my extension . I usually have two to do different operations and use ⌥ key for that
Thanks for sharing!
To promote a new feature that people may not know, with recent PopClip versions you achieve the exact same result without JS by using the alternate url
property as follows:
# popclip
name: Example
icon: iconify:simple-icons:perplexity
url: https://example.com/?q=***
alternate url: https://example.com/alternate?q=***
The alternate URL will be triggered by option.
(I skipped the requirements key in this example for simplicity.)
so we now have two popclip perplexity.ai extensions right? one for the website and another for the offical macos app.
Depends on how you define 'official extension"! There’s only the App one in the directory. I think there’s a website snippet floating up above. Forgot we had two different approaches going.