# 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
Nyheder
Version 1.0
First release
Hvad den gør
3 handlinger-
CommentThis is an initial release. Only Safari is supported through the Shortcut. /u/dialup_ on reddit. @canibeanartist on RoutineHub, Instagram, Snapchat, Twitter.
-
Run JavaScript on Web Page
-
Stop This Shortcut
Vis som kode
Alle genvejens handlinger skrevet ud i Cherri, et programmeringssprog til genveje. Perfekt til at lære, hvordan den virker.
#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()
Åbn i Cherri Playground
Dekompileret med cherri 2.3.0 (GPL-2.0). Kan kræve små rettelser, før den kan kompileres.
Bedømmelser og anmeldelser
Skriv en anmeldelse–
ud af 5
★★★★★
★★★★
★★★
★★
★
0 ratings
Ingen anmeldelser endnu. Vær den første!
Annonce
Mere fra canibeanartist
Du vil måske også kunne lide
Annonce