GoodLinks Extensions

Hi friends, created a GoodLinks extension:

(just select the text in the below code snippet, PopClip should show up, click install, and done, it’s that simple!!)

// #popclip extension for GoodLinks
// name: GoodLinks | ⌥ for Quick Add
// icon: iconify:ri:bookmark-3-line
// lang: js
// requirements: ["urls"]
const query = encodeURIComponent(popclip.input.text);
if (popclip.modifiers.option) {
    popclip.openUrl("goodlinks://x-callback-url/save?quick=1&url=" + query);  
} else{
    popclip.openUrl("goodlinks://x-callback-url/save?url=" + query);  
}

Also, here is a complementary Alfred workflow in case you use alfred.app :slightly_smiling_face:

@nick

@nick I might need help with a few things, which I couldn’t solve myself, quickly enough:

  1. Using snippets, how do I add a custom image file?
  2. When I edit the icons on iconify, how do I copy over the edit icon? Like using the code…

With a snippet, custom images can be done with inline SVG although it will bloat up your snippet. Example:

#popclip
name: SVG Test
icon: svg:<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" d="m6 10.95l-1.875 1.025l-2.975-5.2L7.75 3H10v1q0 .825.588 1.413T12 6q.825 0 1.413-.587T14 4V3h2.25l6.6 3.775l-2.95 5.15l-1.9-.95V21H6z"/></svg>
action: {} # empty object results in a "disabled button" action

I thought of allowing a URL to an icon file but there is a security implication of triggering the installing user’s Mac to access an arbitrary URL which is not always a good idea. Plus the possibility of swapping the image at the URL from a benign one to an abusive one. So I didn’t allow it.

thank you. this is great except it doesn’t work in firefox of course because popclip doesn’t register the url in firefox (which is the fault of firefox not of popclip…) so it becomes rather cumbersome which is a pity because i like goodlinks and use it a lot but i can 't live without firefox.

:thinking:

I just opened a new Firefox instance, and used this extension in PopClip and it worked for me :man_shrugging: .

Untitled

Maybe a Firefox extension is blocking your automation

1 Like

oh thanks! good suggestion! i’ll check this out :slight_smile:

Is there any possibilities with popclip to add a menu that show 4 different goodlinks categories? So you can easily send the link to a category.

There is no such thing as category in goodlinks. If you mean tags, when you click the extension icon, goodlinks will popup and you can select the tags and add title, notes.

AFAIK, there is no feature available in PopClip to add a “menu”.

Maybe be more specific with your use case.