diff --git a/github-custom-hotkeys.user.js b/github-custom-hotkeys.user.js index fadb6a0..80892f7 100644 --- a/github-custom-hotkeys.user.js +++ b/github-custom-hotkeys.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name GitHub Custom Hotkeys -// @version 1.0.24 +// @version 1.0.25 // @description A userscript that allows you to add custom GitHub keyboard hotkeys // @license MIT // @author Rob Garrison @@ -134,6 +134,16 @@ // issue number parts.issue = tmp[4] || ""; } + // branch/tag? + if (parts.t === "tree" || parts.t === "blob") { + parts.branch = tmp[4] || ""; + } else if (parts.t === "releases" && tmp[4] === "tag") { + parts.branch = tmp[5] || ""; + } + // commit hash? + if (parts.t === "commit") { + parts.commit = tmp[4] || ""; + } // forked from tmp = $(".repohead .fork-flag a"); parts.upstream = tmp ? tmp.getAttribute("href") : "";