Commit 4984607c authored by Yaroslav Lushnikov's avatar Yaroslav Lushnikov 🦆

Add a "Copy branch name"

parent cbc293f3
......@@ -17,6 +17,7 @@
"js": [
"scripts/external/jQuery.js",
"scripts/pm/in_progress.js",
"scripts/pm/branch.js",
"scripts/pm/commit_message.js",
"scripts/pm/prepare_assigment.js"
]
......
(function($) {
var issueTitle = $('h2').attr('style', 'cursor: pointer');
issueTitle.on('click', function (e) {
var branchName = issueTitle.html().replace(' #', '-').toLowerCase();
var textfield = $('<input type="text" style="display: block;" value="' + branchName.replace(/"/g, '&quot;') + '">');
issueTitle.after(textfield);
textfield.select();
document.execCommand('copy');
textfield.remove();
});
})(jQuery);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment