{"id":20935744,"url":"https://github.com/ghostery/urlfilter2dnr","last_synced_at":"2026-04-17T13:07:44.687Z","repository":{"id":199673936,"uuid":"691556591","full_name":"ghostery/urlfilter2dnr","owner":"ghostery","description":null,"archived":false,"fork":false,"pushed_at":"2026-03-23T01:46:25.000Z","size":12821,"stargazers_count":3,"open_issues_count":7,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-03-23T21:48:32.613Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ghostery.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2023-09-14T12:24:35.000Z","updated_at":"2026-03-13T12:37:37.000Z","dependencies_parsed_at":"2024-08-07T09:38:45.888Z","dependency_job_id":"4bc7f340-ae5d-46ce-95f0-1d4e618a4a95","html_url":"https://github.com/ghostery/urlfilter2dnr","commit_stats":null,"previous_names":["ghostery/urlfilter2dnr"],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/ghostery/urlfilter2dnr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostery%2Furlfilter2dnr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostery%2Furlfilter2dnr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostery%2Furlfilter2dnr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostery%2Furlfilter2dnr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghostery","download_url":"https://codeload.github.com/ghostery/urlfilter2dnr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostery%2Furlfilter2dnr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31930146,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T12:37:54.787Z","status":"ssl_error","status_checked_at":"2026-04-17T12:37:25.095Z","response_time":62,"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":[],"created_at":"2024-11-18T22:16:11.766Z","updated_at":"2026-04-17T13:07:44.663Z","avatar_url":"https://github.com/ghostery.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @ghostery/urlfilter2dnr\n\nThis project aims to provide a utility to convert urlfilters (in Easylist syntaxt) to the DNR (declarative net request) format, in a browser. It uses 3rd party libraries for the conversions.\n\nThe tool is publicaly available on a github [page](https://ghostery.github.io/urlfilter2dnr/).\n\n## Converters\n\n* AdGuard - [@adguard/tsurlfilter](https://github.com/AdguardTeam/tsurlfilter) licenses under [GPLv3](https://github.com/AdguardTeam/tsurlfilter/blob/master/LICENSE)\n* AdBlockPlus - [@eyeo/abp2dnr](https://gitlab.com/eyeo/adblockplus/abc/abp2dnr) licenses under [GPLv3](https://gitlab.com/eyeo/adblockplus/abc/abp2dnr/-/blob/main/LICENSE.txt?ref_type=heads)\n\n## Local development\n\nInstall `nodejs` with a tool like `asdf`, `rtx` or `mise`, eg.:\n\n```sh\nrtx install\n```\n\nInstall node modules\n\n```sh\nnpm ci\n```\n\nBuild static page:\n\n```sh\nnpm run build:page\n```\n\nStart development server:\n\n```sh\nnpm run serve\n```\n\nRunning tests:\n\n```sh\nnpm run test.unit\nnpm run test.e2e\n```\n\nNOTE: to run e2e tests playwright needs to install instumented browser. To do that run:\n\n```sh\nnpx playwright install --with-deps\n```\n\n## postMessage API\n\nThe conversion tool can be used in any page or web-extension when embeded in an iframe.\n\nExample:\n\n```html\n\u003ciframe id=\"urlfilter2dnr\" src=\"https://ghostery.github.io/urlfilter2dnr/\" height=\"0\" width=\"0\"\u003e\u003c/iframe\u003e\n```\n\n```js\nwindow.addEventListener(\"message\", (event) =\u003e {\n    console.log('DNR rules', event.data.rules);\n});\n\ndocument.getElementById(\"urlfilter2dnr\").contentWindow.postMessage({\n    action: 'convert',\n    converter: 'adguard',\n    filters: ['||test.com'],\n}, \"*\");\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostery%2Furlfilter2dnr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghostery%2Furlfilter2dnr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostery%2Furlfilter2dnr/lists"}