Last active
March 9, 2019 17:05
-
-
Save nonplus/05a91bd9252a02acfd6a1fa2b77adcd5 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
// ==UserScript== | |
// @name YouTrack - PR Tile | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Based on current YouTrack Ticket, copy PR title to the clipboard | |
// @author Stepan Riha | |
// @include https://spanning.myjetbrains.com/youtrack/issue/* | |
// @run-at context-menu | |
// @grant GM_setClipboard | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var info = document.title.match(/(.*) : ([^ ]+)$/); | |
if (info) { | |
info.shift(); | |
var title = info.join(' #'); | |
GM_setClipboard(title, 'text'); | |
alert(title); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment