Created
July 11, 2012 06:00
-
-
Save unwiredben/3088264 to your computer and use it in GitHub Desktop.
Add Reviewed By Userscript
This file contains 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== | |
// @name add-reviewed-by-to-github | |
// @namespace net.combee | |
// @include https://github.com/*/pull/* | |
// @version 1 | |
// ==/UserScript== | |
/*global jQuery */ | |
/*jslint browser: true */ | |
var main = function() { | |
'use strict'; | |
jQuery('.btn-merge-pull-request').click(function() { | |
setTimeout(function() { | |
var b = jQuery("<span class='minibutton blue'>Reviewed-By</a>") | |
.click(function() { | |
var e = jQuery('.commit-preview textarea'); | |
e.val(e.val() + "\n\nReviewed-By: Ben Combee ([email protected])"); | |
}); | |
jQuery('.merge-form .btn-cancel').after(b); | |
}, 10); | |
}); | |
}; | |
// Inject our main script | |
var script = document.createElement('script'); | |
script.textContent = '(' + main.toString() + ')();'; | |
document.body.appendChild(script); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment