This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%* | |
// Check if this a new file. If it is not a new file then throw a error to stop the script | |
let filename = await tp.file.title | |
if(!(filename.startsWith("Untitled"))) | |
{console.log("This is a existing file! Stopping the script before it overwrites data. Use alt + n to properly create Cpages.") | |
tp.FakeModuleToCauseError.ErrorPleaseAndThxU() | |
} | |
//prompt user for title |