Last active
March 7, 2022 22:34
-
-
Save royashbrook/203efa6ac96da19aa5fa1df168c7f894 to your computer and use it in GitHub Desktop.
Toggl Integration for New Github Projects
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
// add this to the bottom of the current github integration. have to enable dev mode and click 'edit' | |
// probably a better selector, but i'm guessing these names aren't 'finished' as this is in beta still | |
// this one works for now in the board view which is what i needed it to work for. | |
// New Project Page | |
togglbutton.render("div[class*='Box-'] div[class*='Box-'] div[class*='Box-'] > a[class*='Link-']:not(.toggl)", { observe: true }, function ( | |
elem | |
) { | |
const link = togglbutton.createTimerLink({ | |
className: 'github', | |
description: elem.textContent | |
}); | |
elem.insertAdjacentElement("afterend",link) | |
elem.insertAdjacentHTML("afterend","<br />") | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment