kssfilo/safari-ctl


A Command line tool to control Safari for MacOS. (Browsing/FillingForm/GetSetCopyURL/JavascriptInjection/GetTitle/Search)

License: MIT

Language: CoffeeScript


safari-ctl - Command Line Tool To Control Safari for MacOS

A Command Line Tool to Control Safari for MacOS. (Browsing/FillingForm/GetSetCopyURL/JavascriptInjection/GetTitle/Search)

### Get current URL on Safari

$ safari-ctl
https://github.com

### Copy current URL on Safari to the clipboard

$ safari-ctl -s

### Navigating by command line

$ safari-ctl -m
# marks all <a> with numbers

$ safari-ctl -a 32
# click 32'th <a>

$ safari-ctl -b
# history back

### Filing form

$ safari-ctl -M
# marks all <input> with numbers

$ safari-ctl -A 0 -I 'Japan'
# Fill 0th input with 'Japan'

$ safari-ctl -A 1
# click 1st input button

### Javascript Injection

$  safari-ctl -j 'document.getElementById("sb_form_q").value="Japan"'
Japan

Install

npm i -g safari-ctl

You must enable the 'Allow JavaScript from Apple Events' option in Safari's Develop menu to use some features.

@PARTPIPE@|dist/cli.js -h

You can see detail usage on npmjs.com

@PARTPIPE@

Change Log

  • 0.1.x: beta release
  • 0.2.0: suppress result at anchor click/history forward/scroll

Idea

  • marking buttons

Project Statistics

Sourcerank 2
Repository Size 5.86 KB
Stars 0
Forks 0
Watchers 2
Open issues 0
Dependencies 6
Contributors 1
Tags 2
Created
Last updated
Last pushed

Top Contributors See all

kssfilo

Packages Referencing this Repo

safari-ctl
A Command Line Tool to control Safari for MacOS. (Browsing/FillingForm/GetSetCopyURL/JavascriptIn...
Latest release 0.2.0 - Updated

Recent Tags See all

0.1.2 August 19, 2019
0.1.0 August 19, 2019

Something wrong with this page? Make a suggestion

Last synced: 2019-08-20 16:44:18 UTC

Login to resync this repository