Jump to content
manavortex

Trigger: On clipboard update?

Recommended Posts

Hey there, 

I want a workflow that automatically cleans up links in my clipboard (for example, strip the "type=3&theater" from facebook links). For that, I would like to have my Alfred workflow to trigger whenever I update my clipboard, so that I can follow the logic after. 


How do I achieve that? :)

 

Thank you already

Share this post


Link to post

Alfred can’t run a workflows automatically whenever you update your clipboard. By design, Alfred needs to be deliberately called.


I’ve made LinkClean to clean links, but since I don’t use facebook I have no idea what unnecessary cruft they usually add to links, hence cannot clean it. If you can give me detailed examples of those, I can add them to the workflow (or you can submit them yourself).

Share this post


Link to post
17 minutes ago, manavortex said:

I'll submit a feature request if I find out how. :)

 

To be clear, you don’t need to know how to clean them, you just need to give me detailed examples (links in both their “dirty” and “clean” states, showing what’s the part that can be safely removed).

Share this post


Link to post
21 minutes ago, manavortex said:

Hey there, 

 

I've submitted my feature request. Basically, I think that anything matching this regexes

 


(?<=facebook.com)?\?type=\d.*
\?source=.*
                        

 

could go..?

 

Thanks for your support!

 

Like I said, what I need are example links. If you try to make the regex for me, I won’t be able to find the optimal way to make it fit with the others.

Share this post


Link to post
https://www. facebook.com/FunnyMommentsLOL/photos/a.1703119446610717.1073741828.1703117756610886/1879942035595123/?type=3&theater

https://www. facebook.com/FunnyMommentsLOL/photos/a.1703119446610717.1073741828.1703117756610886/1879942035595123/?type=3

https://www. facebook.com/FunnyMommentsLOL/photos/a.1703119446610717.1073741828.1703117756610886/1879942035595123/&theater

 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...