Safari Extension
Hi, so, you want to Inject Javascript to a website? Great.
Since this is a very basic (demo) project it has not that many options.
- Build this project.
- Run on your device.
- Enable extension in Safari (iOS 15+).
- Enable full access.
- Open "InjectJS" Settings
- Fill in the javascript field (press DONE on keyboard, otherwise it will not save)
- Reload the page
To make a script to only run on a pre-defined domain, use the function domain("domainname.ext", function)
(Warning, "domainname.ext"
will be converted to a regular expression using new RegExp("domainname.ext")
).
For the rest, there are no (known) limitations.
Run on "Domain.com"
domain("domain.com", function() {
// .. run this
})
Run on "WDGWV.com" and "WDGWV.nl".
domain("wdgwv.(com|nl)", function() {
alert('Hi There!')
})
- Built-in Javascript validator, if there's a fault in your code, it will not execute, and does not throw a error.
- Add a in-extension settings for managing different websites, now you'll need to use
domain(...)
for specific domains.
Thanks for using, feel free to create issues, pull requests, any help is appreciated.
My script isn't running
- Does the extension has the correct permissions?
- Is your script working outside of the extension? if so Please create a issue