Permalink
Browse files

🎬 New version of GitHub Pull Request From Link

  • Loading branch information...
1 parent 4762c57 commit 930fa95ab5a383103c4957b1692874504a6141ec @jerone committed Jan 7, 2017
Showing with 36 additions and 31 deletions.
  1. +7 −6 Github_Pull_Request_From/Github_Pull_Request_From.user.js
  2. +29 −25 Github_Pull_Request_From/README.md
@@ -11,7 +11,8 @@
// @updateURL https://github.com/jerone/UserScripts/raw/master/Github_Pull_Request_From/Github_Pull_Request_From.user.js
// @supportURL https://github.com/jerone/UserScripts/issues
// @contributionURL https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VCYMHWQ7ZMBKW
-// @version 17
+// @icon https://github.com/fluidicon.png
+// @version 18
// @grant none
// @include https://github.com/*/*
// ==/UserScript==
@@ -38,19 +39,19 @@
part.style.display = "inline";
});
treeLink.setAttribute("href", String.format("/{0}/{1}/tree/{2}",
- treeUser ? treeUser.textContent : author, // user;
- repo, // repository;
- escape(treeParts[treeParts.length - 1].textContent))); // branch;
+ treeUser ? treeUser.textContent : author, // user
+ repo, // repository
+ escape(treeParts[treeParts.length - 1].textContent))); // branch
treeLink.innerHTML = treeSpan.innerHTML;
treeSpan.innerHTML = "";
treeSpan.appendChild(treeLink);
});
}
- // Page load;
+ // Page load.
init();
- // On pjax;
+ // On pjax.
document.addEventListener('pjax:end', init);
})();
@@ -18,43 +18,47 @@ Make pull request branches linkable.
## Compatible
-* [![](https://raw.github.com/jerone/UserScripts/master/_resources/Greasemonkey.png) Greasemonkey](https://addons.mozilla.org/firefox/addon/greasemonkey/) on [![](https://raw.github.com/jerone/UserScripts/master/_resources/Firefox.png) Mozilla Firefox](http://www.mozilla.org/en-US/firefox/fx/#desktop) desktop.
+* ![](https://raw.github.com/jerone/UserScripts/master/_resources/Greasemonkey.png) [Greasemonkey](https://addons.mozilla.org/firefox/addon/greasemonkey/) on ![](https://raw.github.com/jerone/UserScripts/master/_resources/Firefox.png) Mozilla [Firefox](http://www.mozilla.org/en-US/firefox/fx/#desktop) desktop.
## Version History
-* **17**
- * Fixed issues after recent layout updates (fixes https://github.com/jerone/UserScripts/issues/111);
-* **16**
- * Show underline (fixes https://github.com/jerone/UserScripts/issues/93);
-* **15**
- * Fixed invalid chars in url;
-* **14**
- * Fixed issues after recent layout updates;
-* **13**
- * Add missing tree author (fixes https://github.com/jerone/UserScripts/issues/51);
-* **12**
- * Don't link "unknown repository" (fixes https://github.com/jerone/UserScripts/issues/22);
-* **11**
- * Fixed issues after recent layout updates;
- * Added native & TamperMonkey for Google Chrome compatibility;
-* **10**
- * Initial version;
+* **18**
+ * Use a host-relative url so that github enterprise is supported. Fixes [#117](https://github.com/jerone/UserScripts/issues/117).
+* **17**
+ * Fixed issues after recent layout updates. Fixes [#111](https://github.com/jerone/UserScripts/issues/111).
+* **16**
+ * Show underline. Fixes [#93](https://github.com/jerone/UserScripts/issues/93).
+* **15**
+ * Fixed invalid chars in url.
+* **14**
+ * Fixed issues after recent layout updates.
+* **13**
+ * Add missing tree author. Fixes [#51](https://github.com/jerone/UserScripts/issues/51).
+* **12**
+ * Don't link "unknown repository". Fixes [#22](https://github.com/jerone/UserScripts/issues/22).
+* **11**
+ * Fixed issues after recent layout updates.
+ * Added native & TamperMonkey for Google Chrome compatibility.
+* **10**
+ * Initial version.
-## Test cases
+## Notes
-* https://github.com/jerone/UserScripts/pull/12 (2 valid, 1 missing);
-* https://github.com/jerone/UserScripts/pull/29 (1 mine, 1 extern);
-* https://github.com/jerone/UserScripts/pull/47 (3 without username);
+Use cases:
+
+* <https://github.com/jerone/UserScripts/pull/12> (2 valid, 1 missing).
+* <https://github.com/jerone/UserScripts/pull/29> (1 mine, 1 extern).
+* <https://github.com/jerone/UserScripts/pull/47> (3 without username).
## Contributions
-* Changes based on Firefox extension [GitHubExtIns](https://github.com/diegocr/GitHubExtIns) by [Diego Casorran](https://github.com/diegocr).
+* Changes based on Firefox extension [GitHubExtIns](https://github.com/diegocr/GitHubExtIns) by [Diego Casorran](https://github.com/diegocr).
## External links
-* [Greasy Fork](https://greasyfork.org/scripts/64-github-pull-request-from-link)
-* [OpenUserJS](https://openuserjs.org/scripts/jerone/Github_Pull_Request_From_Link)
+* [Greasy Fork](https://greasyfork.org/scripts/64-github-pull-request-from-link)
+* [OpenUserJS](https://openuserjs.org/scripts/jerone/Github_Pull_Request_From_Link)

0 comments on commit 930fa95

Please sign in to comment.