{"id":13699806,"url":"https://github.com/lecepin/crx-url-tool","last_synced_at":"2026-05-19T07:06:16.642Z","repository":{"id":48166144,"uuid":"445812388","full_name":"lecepin/crx-url-tool","owner":"lecepin","description":"网址小尾巴管理工具","archived":false,"fork":false,"pushed_at":"2022-01-08T12:41:40.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-23T12:54:16.103Z","etag":null,"topics":["chrome-extension","crx","query","url"],"latest_commit_sha":null,"homepage":"https://chrome.google.com/webstore/detail/%E7%BD%91%E5%9D%80%E5%8F%82%E6%95%B0/maimchndejhjkbgkodinoggclbbbeenh","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lecepin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-08T12:25:39.000Z","updated_at":"2022-07-22T17:05:25.000Z","dependencies_parsed_at":"2022-08-28T06:35:26.049Z","dependency_job_id":null,"html_url":"https://github.com/lecepin/crx-url-tool","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lecepin/crx-url-tool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lecepin%2Fcrx-url-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lecepin%2Fcrx-url-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lecepin%2Fcrx-url-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lecepin%2Fcrx-url-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lecepin","download_url":"https://codeload.github.com/lecepin/crx-url-tool/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lecepin%2Fcrx-url-tool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280520818,"owners_count":26344438,"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-10-22T02:00:06.515Z","response_time":63,"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":["chrome-extension","crx","query","url"],"created_at":"2024-08-02T20:00:43.735Z","updated_at":"2025-10-22T21:50:00.085Z","avatar_url":"https://github.com/lecepin.png","language":"JavaScript","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# 网址小尾巴终结者\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/11046969/148644184-7f80795e-296e-495a-ac69-2126393cdff4.png\"\u003e\n  \u003cbr /\u003e\n\nChrome 商店：\u003ca href=\"https://chrome.google.com/webstore/detail/%E7%BD%91%E5%9D%80%E5%8F%82%E6%95%B0/maimchndejhjkbgkodinoggclbbbeenh\"\u003e插件地址\u003c/a\u003e\n\n\u003c/p\u003e\n\n---\n\n在我们日常的开发调试中，会在 URL 上添加一些特殊的小尾巴 用来显示调试界面或者开启一些特殊功能，当你接触了越来越多的系统后，你需要使用的小尾巴就变得越来越多，记忆和使用成本非常大，以及含有小尾巴的网址 在跳来跳去的过程中小尾巴可能丢失等问题，迫切需要解决。\n\n于是做了下面的小工具，如下图所示：\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/11046969/148644050-078a0fee-1629-4218-b95a-96904ba601e2.png\" width=\"300\" /\u003e\u003c/p\u003e\n\n详细文档：[请点击此处](https://blog.csdn.net/lecepin/article/details/112435516)\n\n---\n\n### 匹配实现\n\n匹配实现代码如下：\n\n```js\nurlMatch == window.location.host || window.location.href.indexOf(urlMatch) == 0;\n\n// 例如：\n// 当前网址 https://github.com/lecepin\n// 工具中的 URL:\n//              ✅ github.com      // urlMatch == window.location.host\n//              ✅ https://github  // window.location.href.indexOf(urlMatch) == 0\n```\n\n应该可以解决你使用中的疑惑。\n\n当匹配到当前网址时，会判断有没有配置的 query，如果有 则不做任何处理，如果没有 则拼接 URL，并重新加载页面。\n\n![image](https://user-images.githubusercontent.com/11046969/148644494-c30bc212-f966-4010-89d0-1012a5354a6d.png)\n\n\n### 配置结构\n\n界面上的配置，底层存储结构如下：\n\n```ts\ntype Config = Array\u003c{\n  enable: Boolean;\n  urlMatch: String;\n  querys: Array\u003c{\n    key: String;\n    value: String;\n  }\u003e;\n}\u003e;\n```\n\n示例：\n\n```json\n[\n  {\n    \"enable\": false,\n    \"querys\": [\n      {\n        \"key\": \"__superModel\"\n      }\n    ],\n    \"urlMatch\": \"https://github.com/lecepin\"\n  },\n  {\n    \"enable\": true,\n    \"querys\": [\n      {\n        \"key\": \"__lp_logger_level\",\n        \"value\": \"log\"\n      }\n    ],\n    \"urlMatch\": \"myweb.com\"\n  }\n]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flecepin%2Fcrx-url-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flecepin%2Fcrx-url-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flecepin%2Fcrx-url-tool/lists"}