browser-ctl 0.2.3__tar.gz → 0.2.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. {browser_ctl-0.2.3 → browser_ctl-0.2.5}/PKG-INFO +1 -1
  2. {browser_ctl-0.2.3 → browser_ctl-0.2.5}/browser_ctl/SKILL.md +5 -0
  3. {browser_ctl-0.2.3 → browser_ctl-0.2.5}/browser_ctl/extension/background.js +11 -0
  4. {browser_ctl-0.2.3 → browser_ctl-0.2.5}/browser_ctl/extension/manifest.json +1 -1
  5. {browser_ctl-0.2.3 → browser_ctl-0.2.5}/browser_ctl.egg-info/PKG-INFO +1 -1
  6. {browser_ctl-0.2.3 → browser_ctl-0.2.5}/pyproject.toml +1 -1
  7. {browser_ctl-0.2.3 → browser_ctl-0.2.5}/LICENSE +0 -0
  8. {browser_ctl-0.2.3 → browser_ctl-0.2.5}/README.md +0 -0
  9. {browser_ctl-0.2.3 → browser_ctl-0.2.5}/browser_ctl/__init__.py +0 -0
  10. {browser_ctl-0.2.3 → browser_ctl-0.2.5}/browser_ctl/__main__.py +0 -0
  11. {browser_ctl-0.2.3 → browser_ctl-0.2.5}/browser_ctl/cli.py +0 -0
  12. {browser_ctl-0.2.3 → browser_ctl-0.2.5}/browser_ctl/client.py +0 -0
  13. {browser_ctl-0.2.3 → browser_ctl-0.2.5}/browser_ctl/extension/icon-128.png +0 -0
  14. {browser_ctl-0.2.3 → browser_ctl-0.2.5}/browser_ctl/extension/icon-16.png +0 -0
  15. {browser_ctl-0.2.3 → browser_ctl-0.2.5}/browser_ctl/extension/icon-32.png +0 -0
  16. {browser_ctl-0.2.3 → browser_ctl-0.2.5}/browser_ctl/extension/icon-48.png +0 -0
  17. {browser_ctl-0.2.3 → browser_ctl-0.2.5}/browser_ctl/server.py +0 -0
  18. {browser_ctl-0.2.3 → browser_ctl-0.2.5}/browser_ctl.egg-info/SOURCES.txt +0 -0
  19. {browser_ctl-0.2.3 → browser_ctl-0.2.5}/browser_ctl.egg-info/dependency_links.txt +0 -0
  20. {browser_ctl-0.2.3 → browser_ctl-0.2.5}/browser_ctl.egg-info/entry_points.txt +0 -0
  21. {browser_ctl-0.2.3 → browser_ctl-0.2.5}/browser_ctl.egg-info/requires.txt +0 -0
  22. {browser_ctl-0.2.3 → browser_ctl-0.2.5}/browser_ctl.egg-info/top_level.txt +0 -0
  23. {browser_ctl-0.2.3 → browser_ctl-0.2.5}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: browser-ctl
3
- Version: 0.2.3
3
+ Version: 0.2.5
4
4
  Summary: Control your browser from the command line via a Chrome extension + WebSocket bridge
5
5
  Author-email: geb <853934146@qq.com>
6
6
  License-Expression: MIT
@@ -1,3 +1,8 @@
1
+ ---
2
+ name: browser-ctl
3
+ description: CLI tool for browser automation. Control Chrome from the terminal via bctl commands. Navigate pages, click elements, type text, snapshot interactive elements, query DOM, take screenshots, download files, manage tabs, and execute JavaScript — all through a Chrome extension + WebSocket bridge returning JSON.
4
+ ---
5
+
1
6
  # browser-ctl
2
7
 
3
8
  CLI tool for browser automation. Control Chrome from the terminal via `bctl` commands.
@@ -792,6 +792,17 @@ async function contentScriptHandler(commands) {
792
792
  case "click": {
793
793
  const el = qs(params.selector, params.index, params.text);
794
794
  el.scrollIntoView({ block: "center", behavior: "instant" });
795
+ // Dispatch full pointer/mouse sequence first for Vue/React SPA compatibility,
796
+ // then call native el.click() which produces a trusted (isTrusted:true) event
797
+ // that sites like GitHub require.
798
+ const rect = el.getBoundingClientRect();
799
+ const cx = rect.left + rect.width / 2;
800
+ const cy = rect.top + rect.height / 2;
801
+ const mOpts = { bubbles: true, cancelable: true, clientX: cx, clientY: cy, button: 0 };
802
+ el.dispatchEvent(new PointerEvent("pointerdown", { ...mOpts, pointerId: 1 }));
803
+ el.dispatchEvent(new MouseEvent("mousedown", mOpts));
804
+ el.dispatchEvent(new PointerEvent("pointerup", { ...mOpts, pointerId: 1 }));
805
+ el.dispatchEvent(new MouseEvent("mouseup", mOpts));
795
806
  el.click();
796
807
  const total = params.selector ? document.querySelectorAll(params.selector).length : 1;
797
808
  return { clicked: params.selector || "body", index: params.index ?? 0, total, text: params.text || null };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "Browser-Ctl",
4
- "version": "0.2.2",
4
+ "version": "0.2.5",
5
5
  "description": "Developer tool for CLI-driven browser automation. Control Chrome via command-line — navigate, click, type, query DOM, capture screenshots, and download files, all through a local WebSocket bridge.",
6
6
  "permissions": [
7
7
  "tabs",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: browser-ctl
3
- Version: 0.2.3
3
+ Version: 0.2.5
4
4
  Summary: Control your browser from the command line via a Chrome extension + WebSocket bridge
5
5
  Author-email: geb <853934146@qq.com>
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "browser-ctl"
3
- version = "0.2.3"
3
+ version = "0.2.5"
4
4
  description = "Control your browser from the command line via a Chrome extension + WebSocket bridge"
5
5
  readme = "README.md"
6
6
  license = "MIT"
File without changes
File without changes
File without changes