cliffordfajardo / cato

Spotlight and alfred app like search in your browser 🔍.
https://chrome.google.com/webstore/detail/cato/icphdcfpompgbdikholnedfeidemgobg
MIT License
262 stars 22 forks source link

Refactored replacing clipboard contents into a util function #13

Closed Olian04 closed 7 years ago

Olian04 commented 7 years ago

Requirements

Description of the Change

As requested in my previous pr, I've extracted the clipboard refactoring into its own pr. The refactoring adds a function called copyToClipboard in util.js on the utils object. I then tried to find all occurrences of clipboard manipulation in the code and changed them to use copyToClipboard instead.

Alternate Designs

We could have opted to use a known and tested clipboard library such as clipboard.js.

Why Should This Be In Core?

This pr eliminates some code duplication and centralizes util functions to the util.js file.

Benefits

This pr eliminates some code duplication and centralizes util functions to the util.js file.

Possible Drawbacks

Tighter coupling between plugins and core application, since some plugins now will use functions from the core libraries utils.

Applicable Issues

Old pr: https://github.com/cliffordfajardo/cato/pull/9

cliffordfajardo commented 7 years ago

@Olian04 - any updates? If there's no response within the next 7 days, I'm going make a new branch and use your code as a starting point for the completed feature.

Olian04 commented 7 years ago

@cliffordfajardo - what kind of updates would you expect? The feature is implemented, and I've received no feedback on it.

cliffordfajardo commented 7 years ago

@Olian04 - didn't realize github had the comments I wrote in a pending state. Comments should be visible now I hope.