Skip to content

Instantly share code, notes, and snippets.

@nonplus
Last active March 9, 2019 17:05
Show Gist options
  • Save nonplus/05a91bd9252a02acfd6a1fa2b77adcd5 to your computer and use it in GitHub Desktop.
Save nonplus/05a91bd9252a02acfd6a1fa2b77adcd5 to your computer and use it in GitHub Desktop.
// ==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