Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add safari support #91

Merged
merged 6 commits into from
Feb 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,8 @@ There are three ways to make cookies available to `leetgo`:

- Read cookies from browser automatically.

Currently, Chrome and FireFox are supported, if you want to support other browsers, please let us know!
Currently, `leetgo` supports Chrome, FireFox, and Safari[^1].
If you want to support other browsers, please let us know!

```yaml
leetcode:
Expand Down Expand Up @@ -349,3 +350,5 @@ Here are some awesome projects that inspired me to create this project:
- https://github.com/clearloop/leetcode-cli
- https://github.com/budougumi0617/leetgode
- https://github.com/skygragon/leetcode-cli

[^1]: For Safari on MacOS, you may need to grant `Full Disk Access` privilege to your terminal app which you would like to run `leetgo`.
6 changes: 5 additions & 1 deletion README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,9 @@ editor:

- 从浏览器中直接读取。

这是最方便的方法,也是默认的行为。目前支持 Chrome 和 FireFox,如果你需要其他浏览器的支持,请告诉我们~
这是最方便的方法,也是默认的行为。目前支持 Chrome,FireFox 和 Safari[^1]。

如果你需要其他浏览器的支持,请告诉我们~

```yaml
leetcode:
Expand Down Expand Up @@ -344,3 +346,5 @@ Debug 模式下 `leetgo` 会输出详细的日志,请复制这些日志,并
- https://github.com/clearloop/leetcode-cli
- https://github.com/budougumi0617/leetgode
- https://github.com/skygragon/leetcode-cli

[^1]: 使用 Safari 的用户注意,你需要赋予使用 `leetgo` 的终端 App `全盘访问`的权限。
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ require (
gopkg.in/yaml.v3 v3.0.1
)

replace github.com/zellyn/kooky => github.com/j178/kooky v0.0.0-20230105140252-602b62fe3a37
replace github.com/zellyn/kooky => github.com/j178/kooky v0.0.0-20230203021902-e439c6617a99

require (
github.com/alessio/shellescape v1.4.1 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7P
github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/ivanpirog/coloredcobra v1.0.1 h1:aURSdEmlR90/tSiWS0dMjdwOvCVUeYLfltLfbgNxrN4=
github.com/ivanpirog/coloredcobra v1.0.1/go.mod h1:iho4nEKcnwZFiniGSdcgdvRgZNjxm+h20acv8vqmN6Q=
github.com/j178/kooky v0.0.0-20230105140252-602b62fe3a37 h1:0Jubdyhw34xefyQNimXsfhPe1nwqYMYmLp83UyI1/NA=
github.com/j178/kooky v0.0.0-20230105140252-602b62fe3a37/go.mod h1:1HwdQrib6jLeThohjFWjBnZbsuPekrRlHi43dL1ZmB8=
github.com/j178/kooky v0.0.0-20230203021902-e439c6617a99 h1:GpAZUZcPT0KqjfO1tBcrHAi5bbrE5e+/zylIxVXMo28=
github.com/j178/kooky v0.0.0-20230203021902-e439c6617a99/go.mod h1:1HwdQrib6jLeThohjFWjBnZbsuPekrRlHi43dL1ZmB8=
github.com/jedib0t/go-pretty/v6 v6.4.4 h1:N+gz6UngBPF4M288kiMURPHELDMIhF/Em35aYuKrsSc=
github.com/jedib0t/go-pretty/v6 v6.4.4/go.mod h1:MgmISkTWDSFu0xOqiZ0mKNntMQ2mDgOcwOkwBEkMDJI=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
Expand Down
1 change: 1 addition & 0 deletions leetcode/credential.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/zellyn/kooky"
_ "github.com/zellyn/kooky/browser/chrome"
_ "github.com/zellyn/kooky/browser/firefox"
_ "github.com/zellyn/kooky/browser/safari"

"github.com/j178/leetgo/config"
)
Expand Down