Documentation
¶
Index ¶
- Constants
- Variables
- func DumpCookies(curse *core.CursedProcess, webSocketURL string) ([]*network.Cookie, error)
- func ExecuteJS(ctx context.Context, string, targetID string, jsCode string) ([]byte, error)
- func GetChromeContext(webSocketURL string, curse *core.CursedProcess) (context.Context, context.CancelFunc, context.CancelFunc)
- func Screenshot(curse *core.CursedProcess, webSocketURL string, targetID string, quality int64) ([]byte, error)
- func SetCookie(curse *core.CursedProcess, webSocketURL string, host string, cookies ...string) (string, error)
- type ChromeDebugTarget
- func FindExtensionWithPermissions(curse *core.CursedProcess, permissions []string) (*ChromeDebugTarget, error)
- func FindExtensionsWithPermissions(curse *core.CursedProcess, permissions []string) ([]*ChromeDebugTarget, error)
- func QueryDebugTargets(debugURL string) ([]ChromeDebugTarget, error)
- func QueryExtensionDebugTargets(debugURL string) ([]ChromeDebugTarget, error)
- type Manifest
- type ManifestBackground
Constants ¶
View Source
const ( // AllURLs - All URLs permission AllURLs = "<all_urls>" // AllHTTP - All HTTP permission AllHTTP = "http://*/*" // AllHTTPS - All HTTP permission AllHTTPS = "https://*/*" // WebRequest - WebRequest permission WebRequest = "webRequest" // WebRequestBlocking - WebRequestBlocking permission WebRequestBlocking = "webRequestBlocking" // FetchManifestJS - Get extension manifest FetchManifestJS = "(() => { return chrome.runtime.getManifest(); })()" )
Variables ¶
View Source
var ( // ErrTargetNotFound - Returned when a target cannot be found ErrTargetNotFound = errors.New("Target not found") )
Functions ¶
func DumpCookies ¶ added in v1.5.28
DumpCookies - Dump all cookies from the remote debug target
func GetChromeContext ¶
func GetChromeContext(webSocketURL string, curse *core.CursedProcess) (context.Context, context.CancelFunc, context.CancelFunc)
func Screenshot ¶
func Screenshot(curse *core.CursedProcess, webSocketURL string, targetID string, quality int64) ([]byte, error)
Screenshot - Take a screenshot of a Chrome context
Types ¶
type ChromeDebugTarget ¶
type ChromeDebugTarget struct { Description string `json:"description"` DevToolsFrontendURL string `json:"devtoolsFrontendUrl"` ID string `json:"id"` Title string `json:"title"` Type string `json:"type"` URL string `json:"url"` WebSocketDebuggerURL string `json:"webSocketDebuggerUrl"` }
ChromeDebugTarget - A single debug context object
func FindExtensionWithPermissions ¶
func FindExtensionWithPermissions(curse *core.CursedProcess, permissions []string) (*ChromeDebugTarget, error)
FindExtensionWithPermissions - Find an extension with a permission
func FindExtensionsWithPermissions ¶
func FindExtensionsWithPermissions(curse *core.CursedProcess, permissions []string) ([]*ChromeDebugTarget, error)
FindExtensionsWithPermissions - Find an extension with a permission
func QueryDebugTargets ¶
func QueryDebugTargets(debugURL string) ([]ChromeDebugTarget, error)
QueryDebugTargets - Query debug listener using HTTP client
func QueryExtensionDebugTargets ¶
func QueryExtensionDebugTargets(debugURL string) ([]ChromeDebugTarget, error)
QueryExtensionDebugTargets - Query debug listener using HTTP client for Extensions only
type Manifest ¶
type Manifest struct { Name string `json:"name"` Version string `json:"version"` Description string `json:"description"` ManifestVersion int `json:"manifest_version"` Permissions []string `json:"permissions"` Background ManifestBackground `json:"background"` }
Manifest - An extension manifest file
type ManifestBackground ¶
type ManifestBackground struct { Scripts []string `json:"scripts"` Persistent bool `json:"persistent"` }
ManifestBackground - An extension manifest file
Click to show internal directories.
Click to hide internal directories.