{"id":14989130,"url":"https://github.com/drkain/tidy-url","last_synced_at":"2025-08-21T00:32:07.678Z","repository":{"id":41150688,"uuid":"369781629","full_name":"DrKain/tidy-url","owner":"DrKain","description":"A node package \u0026 userscript that removes tracking or garbage parameters from URLs making them shorter, cleaner and a lot nicer to read.","archived":false,"fork":false,"pushed_at":"2024-07-23T07:03:39.000Z","size":641,"stargazers_count":80,"open_issues_count":15,"forks_count":19,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-14T21:57:52.011Z","etag":null,"topics":["amp","anti-tracking","clean","cleaner","contributors-welcome","help-wanted","jsdelivr","nodejs","npm","sanitize","shorten","tidy","url","userscript","userscripts"],"latest_commit_sha":null,"homepage":"","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/DrKain.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}},"created_at":"2021-05-22T10:41:47.000Z","updated_at":"2025-08-10T16:22:54.000Z","dependencies_parsed_at":"2023-10-14T23:50:27.002Z","dependency_job_id":"14e1e917-f8d4-4237-bd3b-b41d339abafc","html_url":"https://github.com/DrKain/tidy-url","commit_stats":{"total_commits":291,"total_committers":6,"mean_commits":48.5,"dds":0.03436426116838487,"last_synced_commit":"8ef23e4ab55e35f2432ba125ba7955f78714b6b1"},"previous_names":["drkain/url-cleaner"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DrKain/tidy-url","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrKain%2Ftidy-url","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrKain%2Ftidy-url/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrKain%2Ftidy-url/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrKain%2Ftidy-url/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DrKain","download_url":"https://codeload.github.com/DrKain/tidy-url/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrKain%2Ftidy-url/sbom","scorecard":{"id":42152,"data":{"date":"2025-08-11","repo":{"name":"github.com/DrKain/tidy-url","commit":"234e706d71ec5485875f5fb876d191a65a298d0c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.1,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/28 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 3 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":3,"reason":"7 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-14T21:48:59.627Z","repository_id":41150688,"created_at":"2025-08-14T21:48:59.627Z","updated_at":"2025-08-14T21:48:59.627Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271409459,"owners_count":24754716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["amp","anti-tracking","clean","cleaner","contributors-welcome","help-wanted","jsdelivr","nodejs","npm","sanitize","shorten","tidy","url","userscript","userscripts"],"created_at":"2024-09-24T14:17:44.504Z","updated_at":"2025-08-21T00:32:07.419Z","avatar_url":"https://github.com/DrKain.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [![Tidy-URL](text-logo.png)](#)\n\nA Node Package \u0026 Userscript that removes tracking or garbage parameters from URLs making them shorter, cleaner and a lot nicer to read.\n\n[![NPM](https://img.shields.io/npm/v/tidy-url)](https://www.npmjs.com/package/tidy-url)\n[![NPM](https://img.shields.io/npm/dt/tidy-url)](https://www.npmjs.com/package/tidy-url)\n[![NPM](https://img.shields.io/npm/types/tidy-url)](https://www.npmjs.com/package/tidy-url)\n\n## Install:\n\nYou can use this automatically in the browser with the [userscript](https://github.com/DrKain/tidy-url/wiki/Userscript).\n\n-   [Node Package Manager](https://github.com/DrKain/tidy-url/wiki/Node-Package) (NPM)\n-   [Browser](https://github.com/DrKain/tidy-url/wiki/Userscript) (userscript)\n-   [jsDelivr](https://github.com/DrKain/tidy-url/wiki/jsDelivr)\n\n## NodeJS\n\n```\nnpm install tidy-url\n```\n\n### Require\n\n```js\nimport { TidyURL } from 'tidy-url';\n// or\nconst { TidyURL } = require('tidy-url');\n```\n\n### Usage\n\nThen pass it a URL and let the magic happen:\n\n```js\nconst link = TidyURL.clean('https://open.spotify.com/track/1hhZQVLXpg10ySFQFxGbih?si=-k8RwDQwTCK923jxZuy07w\u0026utm_source=copy-link');\nconsole.log(link.url); // https://open.spotify.com/track/1hhZQVLXpg10ySFQFxGbih\n```\n\n### Validating\n\nYou can validate a URL using the `validate` function.\n\n```js\nTidyURL.validate('https://example.com'); // true\nTidyURL.validate('cat'); // false\nTidyURL.validate('google.com'); // false (protocol is required!)\n```\n\n### AMP \u0026 Redirects\n\nBy default, tidy-url will remove redirect parameters and AMP links if the rule supports it.  \nYou can disable this feature with `allowRedirects` and `allowAMP`.\nExamples:\n\n```ts\n// These are the defaults.\nTidyURL.config.setMany({\n    allowAMP: false,\n    allowRedirects: true\n});\n\nTidyURL.clean('https://www.google.com/amp/s/github.com');\nTidyURL.clean('https://steamcommunity.com/linkfilter/?url=https://github.com');\n// Result for both: https://github.com\n```\n\n_More info about AMP on [the wiki](https://github.com/DrKain/tidy-url/wiki/AMP-Links)_.\n\n### Note\n\nYou will always receive a valid response, even if nothing was modified. For example:\n\n```js\nconst link = TidyURL.clean('https://duckduckgo.com/this-is-fine');\n\nlink.url; // https://duckduckgo.com/this-is-fine\nlink.info.reduction; // 0 (percent)\n```\n\n### Supported Sites\n\nYou can view all custom supported sites [here](https://github.com/DrKain/tidy-url/wiki/Supported-Sites).  \nHowever, the global rules will be enough to work with thousands of sites around the internet. You should be able to pass any URL for cleaning.  \nRequest direct support for a website [here](https://github.com/DrKain/tidy-url/issues/new?assignees=\u0026labels=\u0026template=add-website.md\u0026title=Website%3A+example.com)\n\n### Response\n\nThe response will always be an object with details of what was cleaned or modified in the URL.  \nThis can be used for debugging, testing or a simple way of letting users know they could have sent a shorter link.\n\n```json\n{\n    \"url\": \"https://open.spotify.com/track/1hhZQVLXpg10ySFQFxGbih\",\n    \"info\": {\n        \"original\": \"https://open.spotify.com/track/1hhZQVLXpg10ySFQFxGbih?si=-k8RwDQwTCK923jxZuy07w\u0026utm_source=copy-link\",\n        \"reduction\": 47,\n        \"difference\": 47,\n        \"replace\": [],\n        \"removed\": [\n            {\n                \"key\": \"utm_source\",\n                \"value\": \"copy-link\"\n            },\n            {\n                \"key\": \"si\",\n                \"value\": \"-k8RwDQwTCK923jxZuy07w\"\n            }\n        ],\n        \"match\": [\n            {\n                \"rules\": [\"si\", \"utm_source\", \"context\"],\n                \"replace\": [],\n                \"redirect\": \"\",\n                \"name\": \"spotify.com\",\n                \"match\": \"/open.spotify.com/i\"\n            }\n        ],\n        \"decoded\": null,\n        \"isNewHost\": false,\n        \"fullClean\": true\n    }\n}\n```\n\n### Example\n\nTurn these monstrosities:\n\n```\nhttps://poetsroad.bandcamp.com/?from=search\u0026search_item_id=1141951669\u0026search_item_type=b\u0026search_match_part=%3F\u0026search_page_id=1748155363\u0026search_page_no=1\u0026search_rank=1\u0026search_sig=a9a9cbdfc454df7c2999f097dc8a216b\n\nhttps://www.audible.com/pd/Project-Hail-Mary-Audiobook/B08G9PRS1K?plink=GZIIiCHG0Uo5V8ND\u0026ref=a_hp_c9_adblp13nmpxxp13n-mpl-dt-c_1_2\u0026pf_rd_p=164101a8-2aab-4c5e-91ee-1f39e10719e6\u0026pf_rd_r=2Q5R6VH8HJAD48PSQRS4\n\nhttps://www.amazon.com/Alexander-Theatre-Sessions-Poets-Fall/dp/B08NT852YT/ref=sr_1_1?dchild=1\u0026keywords=Poets+of+the+fall\u0026qid=1621684985\u0026sr=8-1\n\nhttps://open.spotify.com/track/1hhZQVLXpg10ySFQFxGbih?si=-k8RwDQwTCK923jxZuy07w\u0026utm_source=copy-link\n\nhttps://www.aliexpress.com/item/1005001913861188.html?spm=a2g0o.productlist.0.0.b1c55e86sFKsxH\u0026algo_pvid=b4648621-2371-4d1e-9a9c-89b4d6c59395\u0026algo_expid=b4648621-2371-4d1e-9a9c-89b4d6c59395-0\u0026btsid=0b0a556816216865399393168e562d\u0026ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_\n\nhttps://www.google.com/search?q=cat\u0026source=hp\u0026ei=AwGpYKzyE7uW4-EPy_CnSA\u0026iflsig=AINFCbYAAAAAYKkPE4rmSi0Im0sHgmOVb3DYosyq2B0B\u0026oq=cat\u0026gs_lcp=Cgdnd3Mtd2l6EAMyBQguEJMCMgIILjICCAAyAggAMgIILjICCAAyAggAMgIILjICCC4yAgguOggIABDqAhCPAToLCC4QxwEQowIQkwI6CAguEMcBEKMCUNgEWIQHYMwIaAFwAHgAgAHIAYgB2ASSAQMyLTOYAQCgAQGqAQdnd3Mtd2l6sAEK\u0026sclient=gws-wiz\u0026ved=0ahUKEwjs_9PdrN3wAhU7yzgGHUv4CQkQ4dUDCAY\u0026uact=5\n\nhttps://www.emjcd.com/links-i/?d=eyJzdXJmZXIiOiIxMDAzMDQ3Mjg5ODMzODAxMDI6VlBTbFlUN3JBeHpsIiwibGFzdENsaWNrTmFtZSI6IkxDTEsiLCJsYXN0Q2xpY2tWYWx1ZSI6ImNqbyF4aTU5LXZ0Zm1nOTkiLCJkZXN0aW5hdGlvblVybCI6Imh0dHBzOi8vd3d3LnZ1ZHUuY29tL2NvbnRlbnQvbW92aWVzL2RldGFpbHMvTW9vbmxpZ2h0LVNlYXNvbi0xLzEzMzEyMCIsInNpZCI6IltzdWJpZF92YWx1ZV0iLCJ0eXBlIjoiZGxnIiwicGlkIjo5MDExNjczLCJldmVudElkIjoiMGFjZGE1ZDdmNzNlMTFlYzgyYWM3NDliMGExYzBlMGUiLCJjalNlc3Npb24iOiIyZjBjNGNjYi1lNmVmLTQ0YzItYjIzYy02NzNjZjY2MTZlMTYiLCJsb3lhbHR5RXhwaXJhdGlvbiI6MCwicmVkaXJlY3RlZFRvTGl2ZXJhbXAiOmZhbHNlLCJjakNvbnNlbnRFbnVtIjoiTkVWRVJfQVNLRUQifQ%3D%3D\n\nhttps://www.youtube.com/redirect?event=video_description\u0026redir_token=QCFCLUhqbUVVVVc2Vm53OGdFMi15NU1vSzloWkZveGcyUXxBQ3Jtc0tsR143azQxRVpxZ3lUampXUEkyaTdpdy1reU1OVGcyb3pmOUhzU22Ldm5QZ0tueEMzMy1TQTA1Mm85SEpCUW14UHlq11ZCUVlhU3QzdW52U2Uyd01pbTVINDRjNlhf124ySEZqMHBJbnFEWDdiMTNUVQ\u0026q=https%3A%2F%2Ftomscott.com%2F\u0026v=k7fXbdRH9v4\n```\n\nInto these:\n\n```\nhttps://poetsroad.bandcamp.com/\n\nhttps://www.audible.com/pd/Project-Hail-Mary-Audiobook/B08G9PRS1K\n\nhttps://www.amazon.com/Alexander-Theatre-Sessions-Poets-Fall/dp/B08NT852YT\n\nhttps://open.spotify.com/track/1hhZQVLXpg10ySFQFxGbih\n\nhttps://www.aliexpress.com/item/1005001913861188.html\n\nhttps://www.google.com/search?q=cat\n\nhttps://www.vudu.com/content/movies/details/Moonlight-Season-1/133120\n\nhttps://tomscott.com/\n```\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome and greatly appreciated!  \nFeel free to check [issues page](https://github.com/DrKain/tidy-url/issues).\nIf you find a website that is not supported, please create an issue and I'll be more than happy to add it.\n\n## 👤 Author\n\nThis project was made by **Kain (ksir.pw)**  \nFeel free to contact me if you have any trouble with this package.\n\n-   Website: [ksir.pw](https://ksir.pw)\n-   Github: [@DrKain](https://github.com/DrKain)\n-   Discord: drkain\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrkain%2Ftidy-url","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrkain%2Ftidy-url","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrkain%2Ftidy-url/lists"}