bit2pixel / chrome-control

A JXA script and an Alfred Workflow for controlling Google Chrome
https://medium.com/@bit2pixel/how-i-navigate-hundreds-of-tabs-on-chrome-with-jxa-and-alfred-9bbf971af02b
MIT License
189 stars 25 forks source link

Add copy url #4

Open niladam opened 5 years ago

niladam commented 5 years ago

Adds the copy functionality.

The workflow that exists in this repo, also allows for a modifier key (shift) to enable a secondary action that allows the copy of the selected (from the list) tab's URL directly to the clipboard.

This also addresses #2 :)

niladam commented 5 years ago

@bit2pixel - i just realised i didn't sync my fork before working on this. Basically, the only lines you'd need are in chrome.js#L189-L203 and adding the modifiers again (i'm currently using the setup like in the screenshots below)

Screenshot 2019-05-21 20 29 18 Screenshot 2019-05-21 20 29 24 Screenshot 2019-05-21 20 29 29

The copy function is pretty simple, and all i did was inspire myself from your code. Figure i'd just give a hand :)

You can clearly close this PR and just attach the copy function and the flow to the workflow yourself, -- tagging a new release maybe so that i can pull it in too ?:)

niladam commented 5 years ago

hi @bit2pixel - i realise you must be busy but have you had the chance to look at this ?