MenubarX Extension

I created the MenubarX extension.
When you select text and click a button, it searches for the selected word on Google and displays it on MenubarX.
Clicking the button without selecting anything on the web browser displays the currently opened page on MenubarX.
Clicking the button with no web browser open and nothing selected will open Google.

Select and install the following.

# popclip
name: Open in MenubarX
icon: search filled X
requirements: []
javascript: |
 if (popclip.input.text != '') {
  const url =  encodeURIComponent('https://www.google.com/search?q=' + encodeURIComponent(popclip.input.text) + '&ie=UTF-8&oe=UTF-8');
  popclip.openUrl('menubarx://open/?xurl='+url+'&xwidth=1024&xheight=768&xbar=1');
 }
 else{
  if (popclip.context.browserUrl != ''){
   popclip.openUrl('menubarx://open/?xurl=' + encodeURIComponent(popclip.context.browserUrl) + '&xwidth=1024&xheight=768&xbar=1');
  }
  else{
   popclip.openUrl('menubarx://open/?xurl=https://google.com/&xwidth=1024&xheight=768&xbar=1');
  }
 }
2 Likes

Interesting app and cool integration, thanks!