Created
October 11, 2024 20:05
-
-
Save leonid-shevtsov/ec1f1d78d6168b2eeb4084794bb74240 to your computer and use it in GitHub Desktop.
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 for Mac Automation (JXA) | |
function run(input, parameters) { | |
let currentTab = Application("Safari").windows[0].currentTab; | |
let issueText = String(currentTab.name()).replace(/^\[(.+)\]/, '$1:').replace(/- JIRA$/,'' ) | |
let app = Application.currentApplication(); | |
app.includeStandardAdditions = true; | |
app.displayNotification(issueText, { withTitle: "📋 Copied to clipboard" }); | |
app.setTheClipboardTo(issueText); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment