ShareShortcuts
Fork “Tilt Scroll”

Built something new on top of this Shortcut? Share it as a fork: it becomes a Shortcut of your own, which you manage, and both pages link to each other so canibeanartist gets credit.

  1. 1Get the Shortcut and change it in the Shortcuts app. Give it a name of its own.
  2. 2Share it from the Shortcuts app and copy the iCloud link.
  3. 3Come back here, paste the link and describe what is different, e.g. “Added a step that uses Apple Intelligence to personalise the text.”
Downloads
80K
Saved
4
Actions
3
Category
Utilities
Version
1.0
Language
EN

# Tilt Scroll

Share a web page from Safari to this Shortcut and it will allow you to tilt your device towards you or away from you to scroll up and down within the viewport.

Most iPhones shouldn't have a problem. Glitchy on my iPad Air.

With this initial release, refresh the page to stop the script.

#### TODO

- Add function to stop the script

- Refine variable speed

What's New

Version 1.0

First release

Version History
1.0 Nov 7, 2018

First release

What it does

3 actions
  1. Comment
    This is an initial release. Only Safari is supported through the Shortcut. /u/dialup_ on reddit. @canibeanartist on RoutineHub, Instagram, Snapchat, Twitter.
  2. Run JavaScript on Web Page
  3. Stop This Shortcut

View as code
Beta

Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.

#include 'actions/web'
#define color blue
#define glyph moveArrow

/*
This is an initial release. Only Safari is supported through the Shortcut.

/u/dialup_ on reddit.
@canibeanartist on RoutineHub, Instagram, Snapchat, Twitter.
*/
runJavaScriptOnWebpage("const handleOrientation = event => {\nconst x = event.beta;\n\n    if (x < 37 && x > 23) return;\n    \n    if (x > 37 && x <= 45) {\n        window.scrollBy(0, 1);\n    } else if (x > 45 && x <= 50) {\n        window.scrollBy(0, 2);\n    } else if (x > 50) {\n        window.scrollBy(0, 4);\n    } else {\n        window.scrollBy(0, -2);\n    }\n};\n\nwindow.addEventListener(\"deviceorientation\", handleOrientation);\n\ncompletion();")
stop()
Open in Cherri Playground Decompiled with cherri 2.3.0 (GPL-2.0). May need small fixes before it compiles.

Ratings & Reviews

Write a Review
–
out of 5
★★★★★
★★★★
★★★
★★
★
0 ratings

No reviews yet. Be the first to share what you think!

Advertisement

More by canibeanartist

See All

You Might Also Like

See All
Advertisement