Github PR name formatting.

Format Github PR Links same as Github does.

  1. // ==UserScript==
  2. // @name Github PR name formatting.
  3. // @namespace https://central.tri.be/
  4. // @version 0.1
  5. // @description Format Github PR Links same as Github does.
  6. // @author Crisoforo Gaspar Hernandez
  7. // @match https://central.tri.be/issues/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. var links = Array.prototype.slice.call( document.querySelectorAll('.linkified') );
  15.  
  16. links.forEach(function(node) {
  17. node.innerText = node.innerText.replace('https://github.com/moderntribe/', '').replace('/pull/', '#');
  18. });
  19.  
  20. })();