Rootless

Automate iOS, iPadOS, and macOS using plain JavaScript. Build custom widgets and interact directly with native APIs.

Download on the App Store
Rootless app interface

Plain JavaScript

Supports ES6. Scripts are stored as plain .js files on your disk.

Native APIs & Documentation

Integrate directly with iOS native APIs. Fully documented, available offline.

Siri Shortcuts

Trigger scripts via Siri. Present tables, websites, and custom HTML natively.

System Integration

Run from the Share Sheet, process inputs, and manage local files via Files.app.

x-callback-url

Communicate seamlessly and trigger workflows with other apps on your device.

Customizable & Ready

Tailor the code editor to your liking. Includes several example scripts to start immediately.

Documentation

Also inside the app, or as rootless.json.

Duration

Time duration representation

A span of time. Static methods build one, then read it back in any unit or combine it with another.

Properties

inSecondsNumber

Duration in seconds

inMinutesNumber

Duration in minutes

inHoursNumber

Duration in hours

Methods

.add(other)Duration ›

Add another duration to this one.

Duration.seconds(n)Duration ›

Create a duration of n seconds.

  • n Number required
Duration.minutes(n)Duration ›

Create a duration of n minutes.

  • n Number required
Duration.hours(n)Duration ›

Create a duration of n hours.

  • n Number required
Duration.days(n)Duration ›

Create a duration of n days.

  • n Number required

Examples

Creating durations

const oneHour = Duration.hours(1);
const halfDay = Duration.hours(12);
const total = oneHour.add(halfDay);
console.log(total.inHours); // 13