{"id":24161564,"url":"https://github.com/zcaceres/snoop","last_synced_at":"2026-02-15T14:39:38.019Z","repository":{"id":39761186,"uuid":"217566236","full_name":"zcaceres/snoop","owner":"zcaceres","description":"Like grep or ack... for the DOM","archived":false,"fork":false,"pushed_at":"2025-07-21T23:20:51.000Z","size":947,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-20T06:38:08.324Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zcaceres.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-10-25T15:44:51.000Z","updated_at":"2025-06-18T01:33:39.000Z","dependencies_parsed_at":"2025-09-20T06:30:51.719Z","dependency_job_id":"cf2c6b7b-3597-4946-9ef4-d742e5d9faed","html_url":"https://github.com/zcaceres/snoop","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zcaceres/snoop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcaceres%2Fsnoop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcaceres%2Fsnoop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcaceres%2Fsnoop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcaceres%2Fsnoop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zcaceres","download_url":"https://codeload.github.com/zcaceres/snoop/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcaceres%2Fsnoop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29481718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T11:35:25.641Z","status":"ssl_error","status_checked_at":"2026-02-15T11:34:57.128Z","response_time":118,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-12T17:17:21.315Z","updated_at":"2026-02-15T14:39:38.004Z","avatar_url":"https://github.com/zcaceres.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Snoop\nSnoop is like grep or ack, but for the browser.\n\nYou can search any query across various parts of a web page, including the DOM, cookies, localStorage, sessionStorage, and more.\n\n### How to Use\n\n1. Copy snoop.js into the browser console\n2. `snoop` is now available in the global scope\n3. snoop('query') will search for the query\n\n## Features\n\n- Search across multiple areas of a web page:\n  - DOM elements and their attributes\n  - Script contents\n  - Meta tags\n  - Body text\n  - Image attributes (src, alt, title)\n  - Cookies\n  - localStorage and sessionStorage\n  - Window properties\n  - Comments\n  - Styles (both inline and in stylesheets)\n  - URLs (current page and links)\n- Case-sensitive or case-insensitive search\n- Configurable search depth for object traversal\n- Easy to use directly in the browser console\n\n## Installation\n\n1. Clone this repository or download the source code.\n2. Build the project using TypeScript:\n\n```bash\nbun run build\n```\n\nThis will generate a `snoop.js` file in the `dist` directory.\n\n## Usage\n\n### In the Browser Console\n\n1. Copy the contents of `dist/snoop.js` into your browser's console.\n2. The `snoop` function is now available in the global scope.\n3. Use it to search for any query:\n\n```javascript\nsnoop('your-search-query');\n```\n\n## API\n\n### `snoop(query: string, options?: Partial\u003cSnoopOptions\u003e)`\n\nSearches the page for the given query.\n\n- `query`: The string to search for.\n- `options`: An optional object to customize the search behavior.\n\n### `SnoopOptions`\n\nAn object with the following properties (all boolean):\n\n- `scripts`: Search in script tags\n- `meta`: Search in meta tags\n- `body`: Search in body content\n- `images`: Search in image attributes\n- `cookies`: Search in cookies\n- `localStorage`: Search in localStorage\n- `sessionStorage`: Search in sessionStorage\n- `windowProperties`: Search in window properties\n- `attributes`: Search in element attributes\n- `comments`: Search in comments\n- `styles`: Search in styles\n- `urls`: Search in URLs\n- `caseSensitive`: Perform a case-sensitive search\n- `maxDepth`: Maximum depth for object traversal\n\n## Development\n\n### Prerequisites\n\n- Node.js\n- Bun (for running tests)\n\n### Setting Up the Development Environment\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/your-username/snoop.git\ncd snoop\n```\n\n2. Install dependencies:\n\n```bash\nbun install\n```\n\n### Running Tests\n\nTests are written using Bun's test runner. To run the tests:\n\n```bash\nbun test\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzcaceres%2Fsnoop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzcaceres%2Fsnoop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzcaceres%2Fsnoop/lists"}