Random Quotes
This commit is contained in:
parent
3f03b0b13d
commit
a82a374f20
3 changed files with 12 additions and 19 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue