@@ -8,7 +8,7 @@ let rawStatePathRoutes = [
8
8
'do-you-know-which-license-you-need/yes/which-license-do-you-need/cc-by-nc/(attribution-details)&tool=cc-by-nc' ,
9
9
'do-you-know-which-license-you-need/yes/which-license-do-you-need/cc-by-nc-sa/(attribution-details)&tool=cc-by-nc-sa' ,
10
10
'do-you-know-which-license-you-need/yes/which-license-do-you-need/cc-by-nc-nd/(attribution-details)&tool=cc-by-nc-nd' ,
11
-
11
+
12
12
'do-you-know-which-license-you-need/no/require-attribution/yes/allow-commercial-use/yes/allow-derivatives/yes/share-alike/no/confirmation+ownership+read+revocation/(attribution-details)&tool=cc-by' ,
13
13
'do-you-know-which-license-you-need/no/require-attribution/yes/allow-commercial-use/yes/allow-derivatives/yes/share-alike/yes/confirmation+ownership+read+revocation/(attribution-details)&tool=cc-by-sa' ,
14
14
'do-you-know-which-license-you-need/no/require-attribution/yes/allow-commercial-use/yes/allow-derivatives/no/confirmation+ownership+read+revocation/(attribution-details)&tool=cc-by-nd' ,
@@ -67,13 +67,13 @@ function setStatePossibilities(state) {
67
67
} ) ;
68
68
69
69
fullPath = statePath [ 0 ] . replace ( / [ { ( ) } ] / g, '' ) + '/' ;
70
-
70
+
71
71
if ( state . possibilities [ tool ] == undefined ) {
72
72
state . possibilities [ tool ] = [ ] ;
73
73
}
74
74
state . possibilities [ tool ] . push ( fullPath ) ;
75
75
state . possibilities [ tool ] . push ( noOptionalsPath ) ;
76
-
76
+
77
77
} ) ;
78
78
}
79
79
@@ -91,7 +91,7 @@ function updateStateParts(element, index, event, state) {
91
91
state . parts [ index ] = element . id + '/' + event . target . value + '/' ;
92
92
93
93
// check if checkbox, with siblings
94
- if ( event . target . getAttribute ( 'type' ) == 'checkbox' ) {
94
+ if ( event . target . getAttribute ( 'type' ) == 'checkbox' ) {
95
95
let checkboxElements = element . querySelectorAll ( 'input[type="checkbox"]' ) ;
96
96
let checkboxes = [ ] ;
97
97
checkboxElements . forEach ( ( checkbox , index ) => {
@@ -122,7 +122,7 @@ function setStateCurrent(element, index, state) {
122
122
state . parts . splice ( i ) ;
123
123
}
124
124
} ) ;
125
-
125
+
126
126
state . current = state . parts . join ( '' ) //.slice(0, -1);
127
127
}
128
128
@@ -405,11 +405,11 @@ function renderEmptyPlaceholder(state) {
405
405
if ( state . props . tool == 'unknown' ) {
406
406
document . querySelector ( '#empty' ) . classList . remove ( 'disable' ) ;
407
407
}
408
-
408
+
409
409
else if ( state . props . tool != 'unknown' ) {
410
410
document . querySelector ( '#empty' ) . classList . add ( 'disable' ) ;
411
411
}
412
-
412
+
413
413
}
414
414
415
415
// function to render "mark your work",
@@ -420,11 +420,11 @@ function renderMarkYourWork(state) {
420
420
// load attribution details template,
421
421
// populate from attribution text values
422
422
document . querySelector ( '#mark-your-work' ) . classList . remove ( 'disable' ) ;
423
-
423
+
424
424
renderMarkingFormats ( state ) ;
425
425
426
426
}
427
-
427
+
428
428
else if ( state . props . tool == 'unknown' ) {
429
429
document . querySelector ( '#mark-your-work' ) . classList . add ( 'disable' ) ;
430
430
}
@@ -464,7 +464,7 @@ function renderSteps(applyDefaults, state) {
464
464
} ) ;
465
465
document . querySelector ( '#which-license-do-you-need' ) . classList . toggle ( 'disable' ) ;
466
466
document . querySelector ( '#waive-your-copyright' ) . classList . add ( 'disable' ) ;
467
-
467
+
468
468
}
469
469
470
470
// if visitor doesn't need help
@@ -486,7 +486,7 @@ function renderSteps(applyDefaults, state) {
486
486
} ) ;
487
487
488
488
document . querySelector ( '#waive-your-copyright' ) . classList . remove ( 'disable' ) ;
489
-
489
+
490
490
} else {
491
491
document . querySelector ( '#waive-your-copyright' ) . classList . add ( 'disable' ) ;
492
492
}
@@ -507,7 +507,7 @@ function renderSteps(applyDefaults, state) {
507
507
if ( state . parts [ 4 ] == 'allow-derivatives/no/' ) {
508
508
document . querySelector ( '#share-alike' ) . classList . add ( 'disable' ) ;
509
509
}
510
-
510
+
511
511
}
512
512
513
513
// [T]: function to handle error state
@@ -567,7 +567,7 @@ function watchMarkToggles(toggles, state) {
567
567
}
568
568
569
569
function watchMarkCopiers ( copiers , state ) {
570
-
570
+
571
571
function copyToClipboard ( text ) {
572
572
let temp = document . createElement ( "textarea" ) ;
573
573
document . body . appendChild ( temp ) ;
@@ -615,6 +615,6 @@ document.addEventListener("DOMContentLoaded", (event) => {
615
615
616
616
// parent = event.target.parentNode.parentNode;
617
617
// parent.querySelector('.panel').classList.toggle('expand');
618
-
618
+
619
619
// });
620
620
// });
0 commit comments