# JavaScript and Userscripts in 1Extn

1Extn lets users create, save, edit, run, import, export, and share JavaScript for Safari.

## Supported Script Types

1Extn works with:

- plain JavaScript entered or pasted into the editor
- userscripts with supported metadata
- bookmarklet style JavaScript
- trusted HTTPS links ending in `.js`
- trusted HTTPS links ending in `.user.js`

Compatibility can depend on the script, its requested capabilities, Safari permissions, and Apple platform restrictions.

## Relationship to Describe Extension

Safari's Describe Extension feature in iOS 27 can create webpage behavior from a natural language description and requires Apple Intelligence. 1Extn is similar in purpose but keeps the JavaScript visible and editable. The user can inspect the code, change it, choose where it runs, and decide whether to run it manually or enable Auto Run. Apple Intelligence is not required to use 1Extn.

## Getting Started

Users do not have to begin with an empty editor. 1Extn includes editable templates and built-in assistance for creating scripts. A user can review and change a script before saving or running it.

## Running Scripts

Scripts can be run manually from Safari. A trusted script can optionally use Auto Run when automatic behavior is appropriate.

Auto Run is not required. It should be enabled only for scripts the user understands and trusts.

## Backup and Transfer

Import and export can be used to preserve data stored in the app and move it when needed. Scripts can also be shared with other people.

## Common Uses

JavaScript and userscripts may be useful for:

- changing the appearance of a webpage
- simplifying a repeated webpage action
- extracting information already present on a webpage
- adding a personal webpage behavior
- starting a more advanced workflow from Safari

Exact results depend on the webpage, Safari permissions, and Apple platform restrictions.

## Limitations and Safety

- 1Extn does not convert every browser extension into a Safari extension.
- Scripts can access or change webpage content within the permissions Safari provides.
- Users should inspect scripts from other people before running them.
- Auto Run should be limited to trusted scripts.

## Related Information

- [All features](./features.md)
- [Use cases](./use-cases.md)
- [Shortcuts and Scriptable](./shortcuts.md)
- [1Extn on the Apple App Store](https://apps.apple.com/us/app/1extn-extensions-shortcuts/id1599406759)
