ShareShortcuts
Dupliquer « Tilt Scroll »

Tu as créé quelque chose de nouveau à partir de ce raccourci ? Partage-le comme version dérivée : il devient un raccourci à toi, que tu gères, et les deux pages renvoient l’une vers l’autre pour que canibeanartist soit crédité.

  1. 1Obtenez le raccourci et modifiez-le dans l’app Raccourcis. Donnez-lui un nom bien à lui.
  2. 2Partage-le depuis l’app Raccourcis et copie le lien iCloud.
  3. 3Reviens ici, colle le lien et décris ce qui change, par exemple : « Ajout d’une étape qui utilise Apple Intelligence pour personnaliser le texte. »
Créer mon fork
Téléchargements
80K
Enregistré
4
Actions
3
Catégorie
Utilities
Version
1.0
Langue
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

Nouveautés

Version 1.0

First release

Historique des versions
1.0 7 nov. 2018

First release

Ce qu’il fait

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

Afficher en tant que code
Bêta

Chaque action de ce raccourci écrite en Cherri, un langage de programmation pour Raccourcis. Idéal pour comprendre son fonctionnement.

#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()
Ouvrir dans Cherri Playground Décompilé avec cherri 2.3.0 (GPL-2.0). Quelques corrections peuvent être nécessaires avant la compilation.

Notes et avis

Écrire un avis
–
sur 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Aucun avis pour le moment. Sois le premier à partager ton avis !

Publicité

Plus de canibeanartist

Tout afficher

Ça pourrait aussi te plaire

Tout afficher
Publicité