Description
This Action aims to provide a better “Run JavaScript on Web Page” than the one provided by Apple (as of iOS 16.6)
With this action, running a JavaScript on a Web Page is no longer limited to a Web Page necessarily clicked through Share, you can specify a URL, HTTP methods and headers and more !
Although the evolution seems minor it opens up multiplied possibilities, I will post later a full featured user Action making uses of it, which as nothing to envy to similar apps sold on the App Store.
This Action serves as a Library for other actions.
See the Tests for usages. (TODO: options documentation)
To modify, debug, enable devMode and change the various options.
Tests :
- Run it with the Safari share button
- Run JavaScript on Web Page Test [ js ] executes a JavaScript alone
- Run JavaScript on Web Page Test [ js+url ] executes a CSS selector on source content from url
- Run JavaScript on Web Page Test [ headers ] executes a CSS selector on source content from url with custom HTTP headers
- Run JavaScript on Web Page Test [ json ] executes a JSON selector on source content from url with Dictionary as root element
- Run JavaScript on Web Page Test [ json2 ] executes a JSON selector on source content from url with List as root element
- Run JavaScript on Web Page Test [ xml ] executes a XPATH selector on source content from url
- Run JavaScript on Web Page Test [ url ] prompts for a CSS selector
- Run JavaScript on Web Page Test [ html ] executes a CSS selector on source content provided by user
- Run JavaScript on Web Page Test [ js exec error ] test a JavaScript error
- Run JavaScript on Web Page Test [ js syntax error ] test a JavaScript typo
- Run JavaScript on Web Page Test [ domain failure ] test a bad domain name
- Run JavaScript on Web Page Test [ none ] test empty arguments
—-class101 on Steam (or u/mrdovi on reddit)
Latest Release Notes
0.7.1 - Sept. 12, 2023, 11:16 p.m.
•———•———•———•———•———•———•
Run JavaScript on Web Page - v0.7.1
See tests for usage(doc will come l8r@routinehub)
Special Thanks:
u/gluebyte (many docs and useful Actions 🙏 )
Most hated internet guy:
FUCK /u/spez
•———•———•———•———•———•———•
CHANGELOG
•———•———•———•———•———•———•
0.7.1 : add tests for json, xml options
0.7.0 : support JSON and XML raw with JS
0.6.3 : fix Get Content of URL corrupting JSON
0.6.2 : add tests for json, html options
0.6.1 : move empty result warn to devMode
0.6.0 : add JSON contents support
0.5.9 : change JS errors to notifications
0.5.8 : add u/gluebyte 💪 in credits
0.5.7 : add `html` option
0.5.6 : removed the forced stringify, instead,
calling it on `result` on-demand is a
better practice to preserve JS types
by default (ie: if you return [] in JS,
you expect it to be settable as dictionary
value of `:[]` and not `:"[]"` in Shortcut)
0.5.5 : fix default css selector
0.5.4 : detect syntax errors not caught by try
0.5.3 : don’t stringify if obj already string
0.5.2 : add a `nostringify` option, comments
0.5.1 : change default header key
0.5.0 : first public RoutineHub release
0.2.0 : argument to pretty print result JSON
0.1.4 : devmode, performance optimizations
0.1.1 : headers, performance optimizations
0.1.0 : rewrite with variables, debug, fake args
beta1 : reddit PoC
•———•———•———•———•———•———•
TODO
•———•———•———•———•———•———•
- options doc for routinehub and r/Shortcuts
- x-callback-url support ?
- increase from 5 to 10 customizable headers ?
- support more HTTP methods
- support POSTing datas
Version history
Feedback
Log in or sign up to leave feedback.
· 3 months ago
· 3 months ago
· 2 months, 3 weeks ago
· 2 months, 2 weeks ago
· 2 months, 2 weeks ago
· 2 months, 2 weeks ago
· 2 months, 2 weeks ago