Skip to content

Instantly share code, notes, and snippets.

@quentin41500
Last active June 9, 2025 17:49
Show Gist options
  • Save quentin41500/da17c42462fe500d515e34608660952a to your computer and use it in GitHub Desktop.
Save quentin41500/da17c42462fe500d515e34608660952a to your computer and use it in GitHub Desktop.
Slack PR
javascript:!function (text) {
var node = document.createElement('textarea');
var selection = document.getSelection();
var prTitle = document.querySelectorAll('.js-issue-title')[0].textContent;
var repoName = document.querySelectorAll('.AppHeader-context-item-label')[1].textContent.trim();
repoName = repoName[0].toUpperCase() + repoName.slice(1);
var str = `:pr: ${repoName} | ${prTitle} \n${document.URL}`;
node.textContent = str;
document.body.appendChild(node);
selection.removeAllRanges();
node.select();
document.execCommand('copy');
selection.removeAllRanges();
document.body.removeChild(node);
return false;
}();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment