Jump to content

Bookmarklets workflow


Recommended Posts

Hi,

 

Just want to share a workflow I created recently. It allows one to edit and run bookmarklets in Chrome easily. It can be invoked with "bm" keyword or Command+Shift+B hot key. (This workflow was intrigued by the AlfredBookmarklets workflow created by vitor)

 

When "Edit bookmarklets" is selected, bookmarklets file will be opened in TextEdit. New bookmarklets can be added like

 

Bookmarklet description: javascript code goes after ':'

 

IMPORTANT: if you have installed this workflow before and added your own bookmarklets, please backup the bookmarklets file before re-install or upgrade the workflow.

How to backup: In Alfred window, enter "bm" and select "Edit Bookmarklets" item, in the TextEdit window, save a copy to your Documents dir.

How to restore from backup: After install the new workflow, follow same process above to open the Bookmarklets file, copy content from your backup and save.

 

Download: https://www.dropbox.com/s/391e0si9aw3hbk1/Bookmarklets.alfredworkflow?dl=0

 

kEvQEvt.png

Edited by gcao
Link to comment

Hello gcao,
 
I have a request. Would you mind changing your workflow’s icon? Legally, you’re not in the wrong, here. After all I release my workflows to the public domain, so you’re free to use it.

That said, I’d still like it better if you changed the icon, to be honest. I’ve looked at the workflow, and I see no similarities between it and AlfredBookmarklet regarding their internals. It might have been inspired by its idea, but it seems to not be using its code or way of doing things.

With that in mind, you might have also noticed all my workflows use a consistent theme. Among other things (like making it an interesting restriction when building new ones), it likely also helps with recognition, and after 32 released workflows, that is a good thing. I’d rather not have people thinking I built something I didn’t (you might feel the same, seeing as you’d be losing credit).

It’d be one thing to use the icon for something completely unrelated (something that wouldn’t even be an Alfred workflow), but it is being used for something very similar, even tangential in functionality).

Once more, I ask that you reconsider.

Link to comment

Sorry this is my first public workflow and not a lot of testing is done. I should add Alpha or Beta in the name  :P

Did you include "javascript:" in your javascript part? Please note that should not be included. You might want to enable debug mode and check the output to see what is wrong.

Link to comment

I've updated the workflow path to "~/Dropbox/..." as a short term workaround. I'll need to look into alfred environment variables to get workflow home dir.

 

It should be possible to pull pre-existing bookmarklets. I think bookmarklets are stored in a sqlite db, we could extract all urls which starts with 'javascript' and append to the bookmarklets file. I'll add it to my roadmap.

Link to comment

For Alfred’s environment variables, take a look into their documentation. even if you don’t use the variables themselves, the part at the end tells you where most stuff should be located.

alfred_workflow_data is where you should store data that persists between installs. If you ls "${HOME}/Library/Application Support/Alfred 2/Workflow Data" in a terminal, you should see some from the workflows you have installed.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...