I use a browser extension on my computer to easily switch a community to my own instance so I may subscribe. Is there an Apple Shortcut available that will do that on my iOS devices?
I did manage to create a version for iPhone. Download Link Here. This only works if you add the shortcut to the share sheet. [Go into the Details screen for the Shortcut and enable “show in share sheet” on iOS for it to appear there. Thanks @chase@midwest.social ] But if you do, it works exactly the same as the Mac version.
That one works great! Thank you again for all of your time on this. I hope others enjoy it, as well!
FYI: I added a dropbox link and some usage instructions for the shortcut here: https://lemmy.ninja/post/56379
One quick note: be sure to go into the Details screen for the Shortcut and enable “show in share sheet” on iOS for it to appear there.
This is a necessary step for sure. I looked for it for a long time and eventually gave up. Thanks for the tip!
Wow, this is fantastic! Thank you so much for your time and work on it. I hope you enjoyed learning more about Shortcuts along the way. I’m going to set it up now!
Ah, ran into an issue on iOS:
It looks like the action
Get Details of Safari Web Page
doesn’t cause that error on iPhone. It can be set to grab the URL, too. Changing out the action didn’t get it to work yet; I’ll keep experimenting if I have time.Unfortunately, the action doesn’t seem to actually grab the URL from Safari. This isn’t looking good…
I had never made one of these, so I spent some time learning how it’s done. Follow these instructions to create your own shortcut in Mac OS.
- Open Shortcuts
- Select
Menu Bar
from the left column - Click the plus button to create a new shortcut
- Select
Web
from the categories list on the right - Double-click
Open URLs
from the Safari group to add it to the main pain. (Or drag it over there.) - Click on “URL” in the
Open
bubble to make it editable, and enterhttps://lemmy.ninja
(or your preferred site) as the URL. - Click on the menu bar next to the close, minimize, and maximize buttons and give this shortcut a name, such as
Lemmy
. - Press enter to save it.
At this point you can close the window and you’ll see your shortcut in the Menu Bar group. Click the play button to invoke it. You’ll also see your new Lemmy shortcut in the shortcut menu on your menu bar.
Apparently reading comprehension isn’t my strong suit. I just noticed you wanted to do this in iOS, not Mac OS. It turns out the process is very similar.
- Open the shortcuts app
- Click the plus in the upper-right corner to make a new one.
- Click
+ Add Action
- Select
Web
- Tap
Open URLs
under the Safari group - Click on “URL” in the Open bubble to make it editable, and enter https://lemmy.ninja (or your preferred site) as the URL.
- Click
Open URLs
in the title bar and selectRename
- Name the shortcut
Lemmy
or something similar. - Click
Done
. You can now run the shortcut from theMy Shortcuts
group or with Siri.
Note: Shortcuts sync between devices. Once you create it on one, it exists for all of them, assuming your devices are all on the same iCloud account.
No worries! Like you said, it’s basically the same on both. However, reading through your post it looks like this will just open Lemmy. Is that correct? I’m looking to have a quick way to open the current instance in my own instance for easy subscribing.
Okay, I figured it out.
Due to limitations in Lemmy UI, you can’t subscribe to a community unless someone at your instance has searched for the community first. To make this shortcut work, I just force you to search for the community before subscribing to it. You will still have to manually click on the community in the search results and click on subscribe on the following page.
It is possible to automate that manual part, but it would require trying to guess how long it takes your instance to connect to the remote instance, and I didn’t want to do that. It’s better just to click the links yourself.
To use the shortcut, you need to invoke it while the remote community is open in Safari. For example, if you are trying to subscribe to !bbs@lemmy.sdf.org, you would first need to navigate to https://lemmy.sdf.org/c/bbs and then initiate the shortcut.
Also, before you use the shortcut, change the first item from
https://lemmy.ninja/
to the URL of your home instance. Don’t forget the trailing slash. That way it will execute the community search on your instance instead of lemmy.ninja.Here’s a picture of the whole workflow. I’m working on a way to share the shortcut itself. When I’ve figured that out, I’ll come back and leave you a link so you can download it.
Edit: I should point out this is tested on Lemmy 0.18.0. I know that the earlier versions had a different search URL, so it certainly won’t work on earlier versions. 0.18.1 and later will probably work, but I haven’t tested it on those versions.