قالب وردپرس درنا توس
Home / Tips and Tricks / Scroll Hands-Free Through Long Web Pages on Your iPhone to Read Articles at the Perfect Pace « iOS & iPhone :: Gadget Hacks

Scroll Hands-Free Through Long Web Pages on Your iPhone to Read Articles at the Perfect Pace « iOS & iPhone :: Gadget Hacks



You can’t always have your iPhone in your hands, which is why Apple developed Siri. If Siri isn’t able to provide hands-free, there’s Apple’s newer voice control feature. But if you don’t like barking commands on your iPhone, there’s another option — at least, when it comes to scrolling web pages in Safari.

With just your voice, you can send text messages, make a phone call, get directions, play music, and search for information with Siri. Voice Control lets you do those things too, but adds more advanced capabilities like scrolling up and down the current page, not just for Safari, but for all other apps.

If you don̵

7;t want to use your voice, or if you want to read a long article in Safari without constantly issuing verbal commands or swiping your fat finger over the screen, you can use a bit of JavaScript and your Shortcuts app.

The pre-made shortcut below allows you to set certain parameters to automatically scroll through a particularly long web page in Safari. Suppose you are browsing Wikipedia or reading a long news article; the following keyboard shortcut prevents you from constantly scrolling down with your finger to continue reading. All you need to do is run the shortcut manually in Safari and you’re good to go.

Requirements

  • iOS 14 or later: It may also work in iOS 13, but it has not been tested.
  • Shortcuts: The app is installed by default, but can be uninstalled. If yours was uninstalled, reinstall it from the App Store.
  • Allow untrusted shortcuts: Go to Settings -> Shortcuts and enable “Allow untrusted shortcuts” to allow user-created shortcuts.

Step 1: Add the Safari Auto Scroll Shortcut

“Safari Auto Scroll” by RoutineHub user @ROP is the shortcut we will be using. You can get the shortcut from RoutineHub or directly from the iCloud link below. The shortcut has a built-in automatic updater, so you don’t have to worry about getting the most recent version as you can update it directly in Shortcuts.

Once you open the link, you will be redirected to Shortcuts; if not, tap “Get Shortcut.” A preview of the shortcut’s actions will appear, which you can check before installing the shortcut. Then scroll to the bottom of the workflow and tap “Add Untrusted Shortcut” to add the shortcut to your library.

You will then be prompted to configure the shortcut; in this case, it just means reading a few instructions on how the Safari Auto Scroll shortcut works. Skip this section by tapping “Continue” and “Done” or by tapping the “Skip installation” button.

Step 2: Run Safari Auto Scroll in Safari

Open Safari and go to the webpage you want to automatically scroll down, whether it’s a long article or a how-to like this tutorial. Now tap the Share button in the bottom toolbar and choose the shortcut “Safari Auto Scroll” from the list of actions in the share sheet.

You will be prompted to choose a speed for automatic scrolling. You can choose any number of presets, such as 5, 10, 20, 50, 75, or 100 milliseconds. For example, choosing 20 milliseconds means that the page will shift one pixel every 20 milliseconds. If you choose your own number, you will be prompted to enter a number for milliseconds and pixels.

Not sure which option to choose? Start with 50 milliseconds, which is neither too fast nor too slow. If it’s too slow, increase to 20 milliseconds. If it’s too fast, go back to 75 milliseconds.

If none of the presets are to your liking, tap “Custom MS & PX” and choose your own milliseconds and pixels. After choosing an option, you will be prompted to allow the shortcut to access the website.

You don’t have to worry about this – no data is transferred from Safari Auto Scroll to the site. It requires access because it needs to inject some JavaScript code (which you can check out below) into the web page to perform the auto-scrolling.

The JavaScript used to set the pixels:

(function(host){
        var interval = ms, increment = px, pairs = window.location.search.substring(1).split("&");

        for(var i = 0; i < pairs.length; i++){
          var pair = pairs[i].split("="),
              attribute = pair[0],
              value = parseInt(pair[1]);

          switch(attribute){
            case "interval": interval = value;
            case "increment": increment = value;
          }
        }

        return {
          start: function(){
            host.scrollBy(0, increment);
            host.setTimeout(arguments.callee, interval)
          }
        };
      }(this)).start();
completion(true);

The JavaScript used for setting milliseconds:

(function(host){
        var interval = ms, increment = 1, pairs = window.location.search.substring(1).split("&");

        for(var i = 0; i < pairs.length; i++){
          var pair = pairs[i].split("="),
              attribute = pair[0],
              value = parseInt(pair[1]);

          switch(attribute){
            case "interval": interval = value;
            case "increment": increment = value;
          }
        }

        return {
          start: function(){
            host.scrollBy(0, increment);
            host.setTimeout(arguments.callee, interval)
          }
        };
      }(this)).start();
completion(true);

After granting access to the website, close the share sheet and go back to Safari. Your web page will automatically start scrolling down. If it goes too fast or you miss a certain section, you can scroll up or down a bit with your fingers, but the scrolling continues at the same speed.

Below are two different scroll speeds: 50 milliseconds (left) and 20 milliseconds (right).

This shortcut doesn't work with Safari's Reader mode, so if that's your favorite way to read long articles, you're going to run into problems.

Step 3: Stop Auto Scrolling in Safari

To stop the automatic scrolling, all you need to do is refresh the web page or go back to the previous page. If you leave Safari alone, the auto-scrolling won't stop.

Safari Auto Scroll Update in Shortcuts

To update the Safari Auto Scroll shortcut, go to the Shortcuts app and go to 'My Shortcuts'. Then tap on the Safari Auto Scroll card. The first time you run it, you will be prompted to access RoutineHub to update. Tap "OK", then you will get an option to update, or it will let you know that you are already up to date.

Keep your connection safe without a monthly bill. Get a lifetime subscription to VPN Unlimited for all your devices with a one-time purchase from the new Gadget Hacks Shop, and watch Hulu or Netflix with no regional restrictions, increase security when browsing public networks and more.

Buy now (80% discount)>

Other worthwhile deals to check out:

Cover photo, screenshots and GIFs by Nelson Aguilar/Gadget Hacks

Source link