"stay visible" not working - why?

I try to implement stay visible (GitHub - pilotmoon/PopClip-Extensions: Documentation and source code for PopClip extensions.) here, but I couldn’t get it to work. How should I implement it? Thanks

#popclip
name: Remove Wikilinks
icon: square filled monospaced ex[
javascript: popclip.pasteText(popclip.input.text.replace(/\[\[(?:[^|\]]*\|)?([^\]]+)\]\]/g, '$1'))
description: Removes wikilinks

You would add a key stay visible: true to the snippet definition:

#popclip
name: Remove Wikilinks
icon: square filled monospaced ex[
javascript: popclip.pasteText("foo")
description: Removes wikilinks
stay visible: true

I removed the regex to simplify my example.

Here you can see it working in the intended way :

CleanShot 2023-03-28 at 07.24.14

However I’m not sure if stay visible would be useful to a text-transformation extension like this. It was intended for the “Bold Italic Underline” extension where people could apply or remove each style with subsequent clicks.

Whatever I do, stay visible has no effect.

What I tried to achive was an extension to remove syntax and then act on the previously already selected text with another exteions.

It won’t do that, I’m afraid. Each invocation with “stay visible” is identical, using the same “frozen” input. It doesn’t refresh the actions with new input; it just prevents the pop-up from disappearing.

What you want to do isn’t currently possible, but there is a discussion about this under Action Chaining, and it is still a strong possibility for a future feature.

1 Like