{"id":47613418,"url":"https://github.com/hchiam/lightweight-inspector","last_synced_at":"2026-04-01T20:51:36.334Z","repository":{"id":338154801,"uuid":"1156775778","full_name":"hchiam/lightweight-inspector","owner":"hchiam","description":"a lightweight mobile web inspector with no dependencies and just one code file to read","archived":false,"fork":false,"pushed_at":"2026-03-26T02:46:41.000Z","size":1021,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-26T03:00:05.709Z","etag":null,"topics":["bookmark","bookmarklet","css","html","inspector","js","lightweight","mobile","no-dependencies","single-file","web"],"latest_commit_sha":null,"homepage":"https://lightweight-inspector.vercel.app","language":"JavaScript","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/hchiam.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":"2026-02-13T03:17:39.000Z","updated_at":"2026-03-26T02:46:44.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/hchiam/lightweight-inspector","commit_stats":null,"previous_names":["hchiam/lightweight-inspector"],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/hchiam/lightweight-inspector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hchiam%2Flightweight-inspector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hchiam%2Flightweight-inspector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hchiam%2Flightweight-inspector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hchiam%2Flightweight-inspector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hchiam","download_url":"https://codeload.github.com/hchiam/lightweight-inspector/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hchiam%2Flightweight-inspector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31291850,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: 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":["bookmark","bookmarklet","css","html","inspector","js","lightweight","mobile","no-dependencies","single-file","web"],"created_at":"2026-04-01T20:51:34.794Z","updated_at":"2026-04-01T20:51:36.321Z","avatar_url":"https://github.com/hchiam.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lightweight-inspector [![GitHub release](https://img.shields.io/github/v/release/hchiam/lightweight-inspector)](https://github.com/hchiam/lightweight-inspector/releases)\n\nJust one of the things I'm working on. \u003chttps://github.com/hchiam/learning\u003e\n\n## 2 goals\n\n1) enable minimally inspecting only a few things in js/css/html in a browser on a mobile device, and\n\n2) make it easier to trust by making it easier to find and read [the whole code on GitHub](https://github.com/hchiam/lightweight-inspector/blob/main/script.js). (no deps)\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"lightweight-inspector-example.png\" alt=\"example screenshot\" height=\"200\"\u003e\u003c/p\u003e\n\n## script.js code\n\n\u003chttps://github.com/hchiam/lightweight-inspector/blob/main/script.js\u003e\n\n## [bookmarklet](https://github.com/hchiam/learning-js/tree/main/bookmarklets#bookmarklets) to run the [script.js](https://github.com/hchiam/lightweight-inspector/blob/main/script.js)\n\n_**MAKE SURE YOU UNDERSTAND THE CODE IN\n[script.js](https://github.com/hchiam/lightweight-inspector/blob/main/script.js)\nBEFORE YOU USE THIS OR ANY BOOKMARKLET CLAIMING TO USE IT!**_\n\n### bookmarklet to automatically use the latest [version](https://github.com/hchiam/lightweight-inspector/releases)\n\n\u003cdetails\u003e\n\u003csummary\u003e(click to expand)\u003c/summary\u003e\n\n```js\njavascript:(()=\u003e{\n    fetch('https://api.github.com/repos/hchiam/lightweight-inspector/releases/latest')\n        .then(x=\u003ex.json())\n        .then(x=\u003e{\n            const src = `https://raw.githubusercontent.com/hchiam/lightweight-inspector/${x.tag_name}/script.js`;\n            try {\n                if (!document.addedLightweightInspectorSecuritypolicyviolationEventListener) {\n                    document.addedLightweightInspectorSecuritypolicyviolationEventListener = true;\n                    document.addEventListener('securitypolicyviolation', (e) =\u003e {\n                        alert(`CSP blocking lightweight-inspector`);\n                    });\n                }\n                fetch(src).then(x=\u003ex.text()).then(x=\u003e{eval(x);});\n            } catch(e) {\n                try {\n                    const script = document.createElement('script');\n                    script.src = src;\n                    document.body.append(script);\n                } catch(e) {\n                    alert(`couldn't start lightweight-inspector`);\n                }\n            }\n        });\n})();\n```\n\n\u003c/details\u003e\n\n### bookmarklet example locked to [version](https://github.com/hchiam/lightweight-inspector/releases) **0.5.2**\n\nto avoid automatic updates:\n\n\u003cdetails\u003e\n\u003csummary\u003e(click to expand)\u003c/summary\u003e\n\n```js\njavascript:(()=\u003e{\n    const src = 'https://raw.githubusercontent.com/hchiam/lightweight-inspector/0.5.2/script.js';\n    try {\n        if (!document.addedLightweightInspectorSecuritypolicyviolationEventListener) {\n            document.addedLightweightInspectorSecuritypolicyviolationEventListener = true;\n            document.addEventListener('securitypolicyviolation', (e) =\u003e {\n                alert(`CSP blocking lightweight-inspector`);\n            });\n        }\n        fetch(src).then(x=\u003ex.text()).then(x=\u003e{eval(x);});\n    } catch(e) {\n        try {\n            const script = document.createElement('script');\n            script.src = src;\n            document.body.append(script);\n        } catch(e) {\n            alert(`couldn't start lightweight-inspector`);\n        }\n    }\n})();\n```\n\n\u003c/details\u003e\n\n## with [console-log-element](https://github.com/hchiam/console-log-element)\n\nFirefox _on mobile_ seems to make it a little harder to run bookmarklets from your saved bookmarks. if you're using [console-log-element](https://github.com/hchiam/console-log-element) to run the above [bookmarklet](https://github.com/hchiam/learning-js/tree/main/bookmarklets#bookmarklets) in Firefox _on mobile_, here's a helpful code snippet to hide it when you don't need it anymore:\n\n```js\n$('#firefox-extension-console-log-element')?.remove();$('#script_firefox-extension-console-log-element')?.remove();\n```\n\n## local development\n\n\u003cdetails\u003e\n\n\u003csummary\u003elocal development notes\u003c/summary\u003e\n\n(using [`bun`](https://github.com/hchiam/learning-bun))\n\nthis will automatically run \u003chttp://localhost:3000\u003e:\n\n```sh\nbun dev\n```\n\n(Howard currently has \u003chttps://lightweight-inspector.vercel.app\u003e automatically updated upon commit.)\n\nand for Howard to deploy to \u003chttps://lightweight-inspector.surge.sh/\u003e and/or \u003chttps://lightweight-inspector.vercel.app\u003e run this:\n\n```sh\nbun run deploy\n```\n\nif `bun run deploy` seems to have difficulty deploying to vercel via CLI, then a deploy webhook can instead be set up (to avoid having to change the github noreply email used in commits): \u003chttps://stackoverflow.com/questions/79011901/error-vercel-git-author-must-have-access-to-the-project-on-vercel-to-create-d\u003e (and then `bun run deploy` is no longer necessary)\n\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhchiam%2Flightweight-inspector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhchiam%2Flightweight-inspector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhchiam%2Flightweight-inspector/lists"}