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
<?php | |
/** | |
* @author S3C_MM | |
* @license Free to use in anyway you wish. | |
* @phpversion 8.x | |
* | |
* NOTES: | |
* - For earlier PHP versions replace match expression in map_to_instructions function to switch statement. | |
* - If mbstring not compiled with PHP, replace mb_str_split with str_split |
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
/* | |
Played around so it works from DevTools console too. | |
EDIT: | |
After making this I went and wrote an extension for Chromium based browsers "Jira Task Title to Git Branch (Clipboard)" | |
Its code is totally free for abuse: https://github.com/mathmul/chr-ext-jira-task-title-to-git-branch | |
*/ | |
await (async function copyBranchNameToClipboard(branchType = 'feature', timeToFallbackMethod = Infinity) { | |
const getJiraTaskKey = () => |