vitor Posted October 10, 2016 Author Share Posted October 10, 2016 (edited) Update. Added some Alfred 3 specific details (Workflow Version and About this Workflow). Edited October 11, 2016 by vitor Link to comment
vitor Posted April 9, 2017 Author Share Posted April 9, 2017 Update: It now auto-detects your frontmost browser, and acts on it. Added support for Safari Technology Preview. New icon. Updated instructions. To update, download the latest version (same URL). Link to comment
vitor Posted April 19, 2017 Author Share Posted April 19, 2017 Update. Code is now pasted in an Arg and Vars. I figure that’ll be less intimidating that pasting it together with other code, where mistakes are easier to happen. Also added a note on Safari and variants. To update, download the latest version (same URL) or wait a few days (15 or less) and it’ll prompt you to on next usage, since it uses OneUpdater. boddicker 1 Link to comment
boddicker Posted May 20, 2017 Share Posted May 20, 2017 This is such a great workflow, vitor. Thanks for making such great stuff. I'm now using it for Slicereader. A couple of years ago I wasn't able to get it to work, but the updated workflow makes it magically work. Now, when I want to read an article online, all I have to do is trigger Alfred, type 'read', then Slicereader opens and I can concentrate and read. Now I just wish Slicereader imported GIFs in addition to text/images. vitor 1 Link to comment
vitor Posted May 20, 2017 Author Share Posted May 20, 2017 Great to know, @boddicker! And thank you for the nice words. boddicker 1 Link to comment
limacohen Posted October 10, 2017 Share Posted October 10, 2017 Thank you very much for this, @vitor! I'm pushing for bookmarklets to be natively supported by Alfred, but until then I wish to know if you have any plans to expand on this workflow. I can volunteer to help if needed. Link to comment
vitor Posted October 10, 2017 Author Share Posted October 10, 2017 52 minutes ago, limacohen said: any plans to expand on this workflow Expand how? Considering its goal the Workflow is pretty much done. If by “expand” you mean “read bookmarklets directly from the browser”, then no; this Workflow is made purposefully for people who do not want bookmarklets in the browser. Link to comment
limacohen Posted October 10, 2017 Share Posted October 10, 2017 (edited) Yeah I read your explanation about that, sorry if I sounded obnoxious. And you are right, that's what I'm mostly interested. But if we ditch the "read from browser" thing, maybe an easier way to add bookmarklets and be sure they stick somewhere between updates/reinstalls? Edit: Also, just a way to search for them without entering a specific keyword/trigger, just a global search. Edited October 10, 2017 by limacohen Added feature requests Link to comment
vitor Posted October 10, 2017 Author Share Posted October 10, 2017 1 hour ago, limacohen said: And you are right, that's what I'm mostly interested. Then I don’t intend to build that into the Workflow, for the reasons described earlier. The code is open, however, so you’re free to do so. 1 hour ago, limacohen said: maybe an easier way to add bookmarklets How? I’m open to that, but if I’d already though of an easier way to do it I’d have already done it (unless the drawbacks were bigger). 1 hour ago, limacohen said: and be sure they stick somewhere between updates/reinstalls? I’m not sure what you’re talking about. I have multiple bookmarklets built this way and they’ve always came with me through clean reinstalls of the whole system. They’re synced like every other Workflow. 1 hour ago, limacohen said: Also, just a way to search for them without entering a specific keyword/trigger, just a global search. Alfred doesn’t provide such global search. And the way you’re describing it there’d need to be multiple bookmarklets in the same Workflow, interacting with one of the filters Alfred provides. Seeing as bookmarklets are user-added, there’s no way I could build that into the Workflow, as I can’t predict what users will add. That method would make adding to the Workflow harder, not easier, with extra steps. Looks to me like what you want is fundamentally different from this Workflow. The part you like about it is that it runs bookmarklets, and that’s easy to replicate if you extract the code. But the other part — how it’s built to call said bookmarklets — is so alien to the way it’s currently constructed it’s a whole different Workflow. Link to comment
limacohen Posted October 10, 2017 Share Posted October 10, 2017 Yeah it's probably radically different. What I meant by "global search" would be indeed just a filter to look up within the already added bookmarklets, but as it stands now I understand how that can't be accomplished. I was hoping you could see something I could be missing. Guess I'll give it a try and work something from ~scratch~, probably reuse (and credit) some of your code to actually send the JS to the browser. Thank you again for this workflow and taking your time answering (: Link to comment
deanishe Posted October 10, 2017 Share Posted October 10, 2017 Are we talking about Safari here? I have a workflow for Safari that handles bookmarks amongst other things. It understands bookmarklets, although I haven’t implemented the front-end yet. Link to comment
limacohen Posted October 10, 2017 Share Posted October 10, 2017 7 minutes ago, deanishe said: Are we talking about Safari here? I have a workflow for Safari that handles bookmarks amongst other things. It understands bookmarklets, although I haven’t implemented the front-end yet. Chrome in my case (actually Vivaldi but same thing). Link to comment
Vero Posted October 11, 2017 Share Posted October 11, 2017 @limacohen Welcome to the forum. Could you please fill in your Powerpack email address in your forum profile? This is only visible to admins and allows us to confirm your Powerpack status, as you're asking Powerpack-specific questions. Cheers, Vero Link to comment
limacohen Posted October 11, 2017 Share Posted October 11, 2017 4 hours ago, Vero said: @limacohen Welcome to the forum. Could you please fill in your Powerpack email address in your forum profile? This is only visible to admins and allows us to confirm your Powerpack status, as you're asking Powerpack-specific questions. Cheers, Vero Hi! Done. Sorry I missed that guideline. Cheers! Link to comment
vitor Posted February 22, 2019 Author Share Posted February 22, 2019 Update. Added support for Vivaldi and Brave. Link to comment
Bhishan Posted July 5, 2019 Share Posted July 5, 2019 I have found this workflow very useful. For example: In github commit the edited file: document.getElementById('submit-file').click();. I am totally unfamiliar with javascript, Is there also an option to "EDIT" the file in github? If so what would be the command? Help is highly appreciated. P.S. Where can I find some commands like: document.getElementById('submit-file').click();. online ? These commands are new to me. Link to comment
vitor Posted July 6, 2019 Author Share Posted July 6, 2019 19 hours ago, Bhishan said: Is there also an option to "EDIT" the file in github? That will be more complex. 19 hours ago, Bhishan said: P.S. Where can I find some commands like: document.getElementById('submit-file').click();. online ? By learning about JavaScript and the DOM. Those aren’t pre-built commands, you need to learn what they mean to build something custom. Unfortunately, that falls way out of scope. Stack Overflow is the appropriate place for this kind of question, but don’t mention Alfred or this Workflow, as that will only breed confusion. Ask of it like building a browser bookmarklet (“How to make browser bookmarklet to edit file in Github”). Bhishan 1 Link to comment
Bhishan Posted August 1, 2019 Share Posted August 1, 2019 (edited) I would just like to add my 2cents here. Whenever, I scroll down a long markdown or script file in github, I see something off and needs to edit it. Then I have to scroll back to top and then click the edit button. That is tedious and I found a better way of doing it using Alfred. We can use AlfredBookmarklet with following command: document.querySelector('[aria-label="Edit this file"]').click(); Hope it would be beneficial for others too. Edited August 1, 2019 by vitor Use proper code block Link to comment
vitor Posted January 21, 2020 Author Share Posted January 21, 2020 1 minute ago, romebot said: I'm stuck on this step: :cleanbookmarkletcode ... nothing happens when I enter that into alfred It happens in the background after you action it. You don’t need to do anything else. 7 minutes ago, romebot said: I want to use this for a raindrop bookmarklet in firefox. will it work? Not in Firefox, because it doesn’t support AppleScript. If the bug tracking that omission were a person, it would be old enough to vote. If you want that to be changed, make your voice heard on that page. If you need any kind of outside automation from your browser, you’ll have to ditch Firefox. It should work in almost every other browser, though, because Firefox is the only major browser that doesn’t support AppleScript (many of the small ones support it as well, because they get it for free from Chromium). 12 minutes ago, romebot said: p.s. i dont understand this. I think it's only safari related, but not sure: "Note that you may need to Allow JavaScript from Apple Events in your Browser. " Most browsers have a variant of the option now. Not Firefox, for the reason mentioned above. Link to comment
romebot Posted January 21, 2020 Share Posted January 21, 2020 thanks @vitor, but I deleted my question because I saw that it doesn't work in firefox. thanks again. Link to comment
deanishe Posted January 21, 2020 Share Posted January 21, 2020 54 minutes ago, romebot said: thanks @vitor, but I deleted my question because I saw that it doesn't work in firefox. thanks again. This workflow can run bookmarklets in Firefox, but only ones from your Firefox bookmarks. Link to comment
vitor Posted August 31, 2022 Author Share Posted August 31, 2022 I’m deprecating the Workflow in favour of Alfred’s Automation Tasks. They can run JavaScript in browser tabs with simpler set up. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now