add a fixed text (configurable) before the selection and search the set on Google

Original in French; automatic translation by G……
Hello,

Sorry if the question has already been asked.

I would like to add a fixed text (configurable) before the selection and search the set on Google for example.

Example:

I select STAR WARS
The “Popclip” adds ALLOCINE
The “Popclip” Google searches ALLOCINE STAR WARS

I hope it’s clear.
Does this exist? Where ?
How to do ?

Thanks for your help. Luc

1 Like

I have no idea, but I agree that it would be useful!

1 Like

This should do it:

#popclip
name: Allocine Prefix
title: Allo
javascript:
  const query = encodeURIComponent('ALLOCINE ' + popclip.input.text);
  popclip.openUrl('https://google.com/search?q=' + query)

(The above block is an extension snippet - select it to install the extension with PopClip)

CleanShot 2022-04-04 at 11.08.19

If you want to change the prefix, copy and paste into a text editor and change ALLOCINE to whatever you want.

1 Like

Thank you very much Nick.

Thank you for your reactivity and thanks to you I learn other things, it’s great.

I looked how to do it in “Introducing Extension Snippets”
And I found that ANGE posted pretty much the same request, only better.
I don’t see the end of the message.
How can I retrieve the Allocine3 PopClip?

Thanks again, PopClip is awesome. Luc

Hi @Luc_VIENNE, sorry for the late reply. To install the snippet, highlight the whole text with your mouse like this:
CleanShot 2022-11-21 at 10.19.59

Hi Nick,

thks for your reply, but you have already reply 8 month ago.
But twice is better that once.

Best regards. Thanks again for your job. Luc