Created
September 10, 2013 23:59
-
-
Save erikvold/6517492 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @id github.com-24a4aabb-e0ba-a54c-befe-2eb0a555de9e@scriptish | |
| // @name Better Github Commit Pages | |
| // @version 1.0 | |
| // @namespace erikvold-github | |
| // @author Erik Vold | |
| // @description | |
| // @include https://github.com/*/commit/* | |
| // @grant GM_xpath | |
| // @run-at document-end | |
| // ==/UserScript== | |
| // Display the date of the commit | |
| let commitDate = GM_xpath('//div[@class="authorship"]/time[@class="js-relative-date"]'); | |
| commitDate.parentNode.insertBefore(document.createTextNode(commitDate.getAttribute('title') + '; '), commitDate); | |
| // linkify bugzilla bugs | |
| let commitTitle = GM_xpath('//*[@class="commit-title"]'); | |
| commitTitle.innerHTML = commitTitle.innerHTML.replace(/bug (\d+)/i, '<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=$1">Bug $1</a>'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment