Greasy Fork is available in English.

Github Pull Request From Link

Make pull request branches linkable

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

You will need to install an extension such as Tampermonkey to install this script.

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

作者のサイトでサポートを受ける。または、このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name             Github Pull Request From Link
// @namespace        https://github.com/jerone/UserScripts/
// @description      Make pull request branches linkable
// @author           jerone
// @copyright        2014+, jerone (https://github.com/jerone)
// @license          CC-BY-NC-SA-4.0; https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
// @license          GPL-3.0-or-later; http://www.gnu.org/licenses/gpl-3.0.txt
// @homepage         https://github.com/jerone/UserScripts/tree/master/Github_Pull_Request_From
// @homepageURL      https://github.com/jerone/UserScripts/tree/master/Github_Pull_Request_From
// @supportURL       https://github.com/jerone/UserScripts/issues
// @contributionURL  https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VCYMHWQ7ZMBKW
// @icon             https://github.githubassets.com/pinned-octocat.svg
// @version          20.1
// @grant            none
// @include          https://github.com/*/pull/*
// @exclude          https://github.com/*/*.diff
// @exclude          https://github.com/*/*.patch
// ==/UserScript==

/* eslint security/detect-object-injection: "off" */

(function () {
	String.format = function (string) {
		var args = Array.prototype.slice.call(arguments, 1, arguments.length);
		return string.replace(/{(\d+)}/g, function (match, number) {
			return typeof args[number] !== "undefined" ? args[number] : match;
		});
	};

	function init() {
		Array.prototype.filter
			.call(
				document.querySelectorAll(
					".commit-ref[title], .base-ref[title], .head-ref[title]",
				),
				function (treeSpan) {
					return !treeSpan.querySelector(".unknown-repo");
				},
			)
			.forEach(function (treeSpan) {
				const [repo, branch] = treeSpan.title.split(":");
				var treeParts = treeSpan.querySelectorAll(
					".css-truncate-target",
				);
				var treeLink = document.createElement("a");

				// Show underline on hover.
				Array.prototype.forEach.call(treeParts, function (part) {
					part.style.display = "inline";
				});

				treeLink.setAttribute(
					"href",
					String.format("/{0}/tree/{1}", repo, branch),
				);
				treeLink.innerHTML = treeSpan.innerHTML;
				treeSpan.innerHTML = "";
				treeSpan.appendChild(treeLink);
			});
	}

	// Page load.
	init();

	// On pjax.
	document.addEventListener("pjax:end", init);
})();