You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

19 lines
592 B

function filterTextModifications( contentFilename ){
let idFromFilename = contentFilename.replaceAll('.','') // has to remove from proper CSS ID
let file = filesWithMetadata[contentFilename]
if (!file) return
let contentType = file.contentType
if ( contentType.includes("text") && contentFilename.endsWith(".txt")) {
fetch( contentFilename ).then( r => r.text() ).then( txt => {
let el = addNewNote( txt )
el.id = idFromFilename
})
}
applyNextFilter( contentFilename )
}
sequentialFilters.push( filterTextModifications )