this post was submitted on 05 Jul 2023
5 points (100.0% liked)

Lemmy Support

4655 readers
23 users here now

Support / questions about Lemmy.

Matrix Space: #lemmy-space

founded 5 years ago
MODERATORS
 

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?

you are viewing a single comment's thread
view the rest of the comments
[–] RotaryKeyboard@lemmy.ninja 2 points 1 year ago (2 children)

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.

  1. Open the shortcuts app
  2. Click the plus in the upper-right corner to make a new one.
  3. Click + Add Action
  4. Select Web
  5. Tap Open URLs under the Safari group
  6. Click on “URL” in the Open bubble to make it editable, and enter https://lemmy.ninja (or your preferred site) as the URL.
  7. Click Open URLs in the title bar and select Rename
  8. Name the shortcut Lemmy or something similar.
  9. Click Done. You can now run the shortcut from the My 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.

[–] chase@midwest.social 0 points 1 year ago (1 children)

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.

[–] RotaryKeyboard@lemmy.ninja 2 points 1 year ago* (last edited 1 year ago)

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.