diff --git a/client.go b/client.go index 10fe850..7749147 100644 --- a/client.go +++ b/client.go @@ -200,7 +200,7 @@ func (cli *Client) open(label *Label, urlstr string) (bodyRes string, ok bool) { func() { label.conditionlock.Lock() defer label.conditionlock.Unlock() - data["content_script"] = []string{label.conditionJS} + data["content_condition"] = []string{label.conditionJS} }() resp, err := http.DefaultClient.PostForm(cli.chromeProxyAddr+"/task/put", data) diff --git a/client_test.go b/client_test.go index b863834..8afd7b2 100644 --- a/client_test.go +++ b/client_test.go @@ -17,8 +17,8 @@ func TestPort(t *testing.T) { cli.Connect() log.Println(ltest.Open("https://playerduo.com/api/playerDuo-service-v2/rip113?lang=en&deviceType=browser")) log.Println(ltest.Open("https://playerduo.com/api/playerDuo-service-v2/yanngu?lang=en&deviceType=browser")) - log.Println(ltest.Open("https://playerduo.com/api/playerDuo-service-v2/rip113?lang=en&deviceType=browser")) - log.Println(ltest.Open("https://playerduo.com/api/playerDuo-service-v2/yanngu?lang=en&deviceType=browser")) + // log.Println(ltest.Open("https://playerduo.com/api/playerDuo-service-v2/rip113?lang=en&deviceType=browser")) + // log.Println(ltest.Open("https://playerduo.com/api/playerDuo-service-v2/yanngu?lang=en&deviceType=browser")) http.ListenAndServe(":42311", nil) } diff --git a/example.js b/example.js index 2677c00..c3d9008 100644 --- a/example.js +++ b/example.js @@ -2,5 +2,5 @@ function condition() { var href = window.location.href; var content = document.documentElement.innerHTML; - return href.startsWith("https://playerduo.com") && content.startsWith('
') + return href.startsWith("https://playerduo.com") && content.startsWith(' ') } \ No newline at end of file