This repository was archived by the owner on Nov 11, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- //TODO: Code, der auf trello.com ausgeführt wird
1+ function addButton ( ) {
2+ const sidebar = document . querySelector ( ".window-sidebar" )
3+ const button = document . createElement ( 'span' ) ;
4+ button . classList . add ( 'button-link' ) ;
5+ button . addEventListener ( 'click' , onClick ) ;
6+ sidebar . prepend ( button ) ;
7+
8+ const buttonIcon = document . createElement ( 'span' ) ;
9+ buttonIcon . classList . add ( 'icon-sm' , 'plugin-icon' ) ;
10+ buttonIcon . innerText = '+' ;
11+ button . append ( buttonIcon ) ;
12+
13+ const buttonText = document . createElement ( 'span' ) ;
14+ buttonText . innerText = 'Toggl Task' ;
15+ button . append ( buttonText ) ;
16+
17+ sidebar . querySelector ( ".js-sidebar-add-heading" ) . classList . remove ( "mod-no-top-margin" )
18+ }
19+
20+ function onClick ( ) {
21+ alert ( "work in progress ;)" )
22+ }
23+
24+ window . addEventListener ( "pushstate" , function ( ) {
25+ if ( window . location . pathname . startsWith ( "/c/" ) ) {
26+ addButton ( )
27+ }
28+ } )
You can’t perform that action at this time.
0 commit comments