Skip to content

Commit ac9cffe

Browse files
setup baseline logic and markup for plain text mark
1 parent ed9332a commit ac9cffe

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,5 +819,9 @@ <h4>Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International</
819819
<p>{{title}} {{copyright}} by {{creator}} is {{typeAsVerb}} {{toolName}}. To view a copy of this {{type}}, visit {{toolURL}}</p>
820820
</template>
821821

822+
<template id="plain-text-generic-mark" class="mark">
823+
<p>This work is {{typeAsVerb}} {{toolName}}. To view a copy of this {{type}}, visit {{toolURL}}</p>
824+
</template>
825+
822826
</body>
823827
</html>

src/scripts.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,11 +299,19 @@ function renderMarkingFormats(state) {
299299

300300
if (plainTextFullName == true) {
301301
markProps.toolName = state.props.toolLong;
302-
303302
} else {
304303
markProps.toolName = state.props.toolShort;
305304
}
306305

306+
// determine if generic mark is toggled.
307+
plainTextGenericMark = document.querySelector('#plain-text-generic-mark').checked;
308+
309+
if (plainTextGenericMark == true) {
310+
console.log('plain text generic mark true');
311+
} else {
312+
console.log('plain text generic mark false');
313+
}
314+
307315
// [T]: could carve out separate sections for different mark formats here
308316
// only handles plain text at the moment
309317
for (const [key, value] of Object.entries(markProps)) {

0 commit comments

Comments
 (0)