Last active
June 9, 2025 17:49
-
-
Save quentin41500/da17c42462fe500d515e34608660952a to your computer and use it in GitHub Desktop.
Slack PR
This file contains hidden or 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
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