Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add other time trackers with 'shift+c' #121

Closed
fabiocpn opened this issue Apr 19, 2020 · 1 comment
Closed

Add other time trackers with 'shift+c' #121

fabiocpn opened this issue Apr 19, 2020 · 1 comment

Comments

@fabiocpn
Copy link

This is a feature request.
I'm currently using clockify to perform time tracking.

'Shift-Enter' activates and deactivates the time tracking in tasks that do not have a link. But I noticed that 'shift+c' is calling togglButton:

function togglButton() {

Clockify uses two classes to activate timers:
'small clockify-button-inactive': to activate
'small clockify-button-active': to deactivate

I wonder if there is a way to make this more function more generic. I've done some tests myself (Sorry, I don't know any javascript - but the code is clear enough that I was able to make it work).

withUniqueClass(requireCursor(), ["small clockify-button-inactive","small clockify-button-active","toggl-button"], all, click);
The line above seems to do the work and should keep the compatibility with toggl. I also don't see clockify buttons on the detailed view, so maybe this is the only change necessary? Of course, the name of the function could be changed throughout the script. I'm also not sure how this would impact other functions.

@mgsloan
Copy link
Owner

mgsloan commented Apr 19, 2020

Hey, glad the code was clear enough to get something to work. Thanks for sending specific details about how to make such an enhancement.

I've released version 79, which includes this patch, using code very similar to what you wrote.

Thanks!!

@mgsloan mgsloan closed this as completed Apr 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants