FastStart Script for Obsidian - makes it easy to delay the startup of plugins
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
<%* | |
fastStart = async (filename, delayInSecond) => { | |
if (tp.file.exists(filename)) { | |
const f = tp.file.find_tfile(filename); | |
let plugins = (await app.vault.read(f)).split(/\r?\n/); | |
setTimeout(async () => { | |
plugins.forEach(async (p) => await app.plugins.enablePlugin(p)) | |
}, delayInSecond * 1000) | |
} | |
} | |
await fastStart("FastStart-Plugins-ShortDelay", 2) | |
await fastStart("FastStart-Plugins-LongDelay", 30) | |
%> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment