diff --git a/.js/github.com.js b/.js/github.com.js
index 6814928..403ed28 100644
--- a/.js/github.com.js
+++ b/.js/github.com.js
@@ -52,4 +52,16 @@ if (!location.hostname.startsWith("gist")) {
exploreItem.append(exploreLink);
lastItem.before(exploreItem);
}
-}
\ No newline at end of file
+}
+
+// linkify branch references in PRs
+$("span.commit-ref").each((i, el) => {
+ el = $(el);
+ let bits = el.attr("title").split(":");
+ let repo = bits[0];
+ let branch = bits[1];
+ let link = $("");
+ link.attr("href", `https://github.com/${repo}/tree/${branch}`);
+ el.wrap(link);
+});
+$("body").after("");
\ No newline at end of file