Skip to content

Instantly share code, notes, and snippets.

@royashbrook
Last active March 7, 2022 22:34
Show Gist options
  • Save royashbrook/203efa6ac96da19aa5fa1df168c7f894 to your computer and use it in GitHub Desktop.
Save royashbrook/203efa6ac96da19aa5fa1df168c7f894 to your computer and use it in GitHub Desktop.
Toggl Integration for New Github Projects
// 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