Created
August 14, 2015 20:00
-
-
Save gunr2171/70aa46bbdb1f617920dc to your computer and use it in GitHub Desktop.
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
// this should be reviewed and expanded, then put into the main list | |
// ==UserScript== | |
// @name My Fancy New Userscript | |
// @namespace http://your.homepage/ | |
// @version 0.1 | |
// @description enter something useful | |
// @author You | |
// @match http://stackoverflow.com/questions/* | |
// @grant none | |
// ==/UserScript== | |
var postMenu = $('#question .postcell .fw .post-menu'); | |
var cvButton = $('<a href="#">cv-plz</a>'); | |
postMenu.append(cvButton); | |
cvButton.on('click', function() { | |
var tit = $('#question-header h1 a').text(); | |
$('#question .post-menu .short-link').click(); | |
var url = $('.share-tip input').val(); | |
$('.share-tip a.close-share-tip').click(); | |
var reason = window.prompt('Reason for closing'); | |
var result = '[tag:cv-pls] ' + reason + ' [' + tit + '](' + url + ')'; | |
window.prompt("Copy to clipboard: Ctrl+C, Enter", result); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment