I am trying to use the Shortcuts feature of iOS.

I want to run some simple JavaScript on a web page.

I made a new Shortcut, added "Run JavaScript on Web Page".

The contents of the JavaScript are

alert("hello world");

I named the shortcut "do hello world".

Now how do I trigger this to run on a web page?

I've googled and it seems that I should be able to click on the "export" button in Safari and run the shortcut from the panel that appears, but I do not see my shortcut in that list.

1 Answer 1


I needed to do 2 things,

  1. Choose "Shortcut Input" as the value for "Run Javascript on"
  2. Click the 3 dots on the top right and enable "Show in Share Sheet"

Also the alert causes it to timeout, no problem. It was just a test.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .