Random Quotes

This commit is contained in:
Bingus_Violet 2024-02-08 17:52:26 -06:00
parent 3f03b0b13d
commit a82a374f20
3 changed files with 12 additions and 19 deletions

View file

@ -2,7 +2,9 @@ const path = require('path'),
fs = require('fs')
var config = JSON.parse(fs.readFileSync(path.join(__dirname, 'config.json')))
var highlightedWords = config.highlightedWords
var quotes = config.quotes
var commitCount = "300+"
@ -53,6 +55,10 @@ function converter(html) {
html = html.replaceAll("{COMMIT_COUNT}", commitCount)
html = html.replaceAll("{RANDOM_QUOTE}", quotes[Math.floor(Math.random() * quotes.length)])
html = html.replaceAll("{QUOTE_COUNT}", quotes.length)
return html
}