Skip to content

Instantly share code, notes, and snippets.

@SnowCait
Last active May 13, 2026 00:21
Show Gist options
  • Select an option

  • Save SnowCait/1b692306fd5288293f59d4aac9786cf2 to your computer and use it in GitHub Desktop.

Select an option

Save SnowCait/1b692306fd5288293f59d4aac9786cf2 to your computer and use it in GitHub Desktop.
GitHub Only Official Releases

GitHub Only Official Releases

GitHub Release を常に prerelease:false で検索する Chrome 拡張機能。

(function () {
function applyFilter() {
const url = new URL(window.location.href);
// リリースページ以外は何もしない
if (!url.pathname.endsWith("/releases")) return;
const params = new URLSearchParams(url.search);
if (!params.has("q")) {
params.set("q", "prerelease:false");
url.search = params.toString();
window.location.replace(url.toString());
}
}
// 通常のページロード時
applyFilter();
// GitHubのTurboによるクライアントサイドナビゲーション時
document.addEventListener("turbo:load", applyFilter);
// fallback(popstateでの遷移)
window.addEventListener("popstate", applyFilter);
})();
{
"manifest_version": 3,
"name": "GitHub Only Official Releases",
"version": "1.0",
"description": "リリースページに常に prerelease:false を付加します",
"permissions": ["declarativeNetRequest"],
"content_scripts": [
{
"matches": ["https://github.com/*"],
"js": ["content.js"],
"run_at": "document_start"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment