File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,9 @@ const fieldsets = document.querySelectorAll('fieldset');
2727// all found toggles
2828const toggles = document . querySelectorAll ( '#mark-your-work footer input' ) ;
2929
30+ // all found copiers
31+ const copiers = document . querySelectorAll ( '#mark-your-work footer button' ) ;
32+
3033// empty defaults obj
3134let applyDefaults = { } ;
3235
@@ -582,6 +585,19 @@ function watchMarkToggles(toggles, state) {
582585 } ) ;
583586}
584587
588+ function watchMarkCopiers ( copiers , state ) {
589+
590+ copiers . forEach ( ( element , index ) => {
591+
592+ element . addEventListener ( "click" , ( event ) => {
593+ console . log ( 'copying is happening' ) ;
594+
595+ //perform copy
596+ } ) ;
597+
598+ } ) ;
599+ }
600+
585601
586602
587603
@@ -604,6 +620,7 @@ document.addEventListener("DOMContentLoaded", (event) => {
604620 watchFieldsets ( fieldsets , state ) ;
605621 watchAttributionDetails ( fieldsets , state ) ;
606622 watchMarkToggles ( toggles , state ) ;
623+ watchMarkCopiers ( copiers , state ) ;
607624
608625 console . log ( "DOM fully loaded and parsed" ) ;
609626} ) ;
You can’t perform that action at this time.
0 commit comments