Skip to content

Instantly share code, notes, and snippets.

@tmplinshi
Created October 31, 2018 06:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmplinshi/be40821c348195342f40874597cfccae to your computer and use it in GitHub Desktop.
Save tmplinshi/be40821c348195342f40874597cfccae to your computer and use it in GitHub Desktop.
Chrome_GetTabList() {
whr := ComObjCreate("WinHttp.WinHttpRequest.5.1")
whr.Open("GET", "http://localhost:9222/json")
whr.Send()
out := []
for i, tab in Jxon_Load(whr.ResponseText)
{
if (tab.type = "page")
out.push( {url: tab.url, title: tab.title} )
}
return out
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment