Change {COMMIT_COUNT} to "500"
This commit is contained in:
parent
3fe2266e3e
commit
8b564d00b1
2 changed files with 1 additions and 105 deletions
|
@ -20,7 +20,7 @@
|
||||||
"quotes": [
|
"quotes": [
|
||||||
"Remember the 14th commandment: Thou shalt always clean thy plate and not waste anything, whether thy stomach is full, or not.",
|
"Remember the 14th commandment: Thou shalt always clean thy plate and not waste anything, whether thy stomach is full, or not.",
|
||||||
"I hate javascript!!!",
|
"I hate javascript!!!",
|
||||||
"Happy {COMMIT_COUNT} commits!",
|
"Happy <s>400</s> 500 commits!",
|
||||||
"Play Cave Story!",
|
"Play Cave Story!",
|
||||||
"Cave Story+ Sucks!",
|
"Cave Story+ Sucks!",
|
||||||
"World's Worst Developer",
|
"World's Worst Developer",
|
||||||
|
|
104
pageUpdater.js
104
pageUpdater.js
|
@ -26,10 +26,6 @@ function firstToUpper(str) {
|
||||||
return str.charAt(0).toUpperCase() + str.slice(1)
|
return str.charAt(0).toUpperCase() + str.slice(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
var thumborURL = "https://thumbor.violets-purgatory.dev/unsafe/"
|
|
||||||
var imgExtension = "png"
|
|
||||||
var thumborArgs = `filters:format(${imgExtension})/`
|
|
||||||
|
|
||||||
function timeFormatter(seconds) {
|
function timeFormatter(seconds) {
|
||||||
seconds = Math.ceil(seconds)
|
seconds = Math.ceil(seconds)
|
||||||
var minutes = Math.ceil(seconds / 60)
|
var minutes = Math.ceil(seconds / 60)
|
||||||
|
@ -134,41 +130,6 @@ function converter(html) {
|
||||||
var parsedHTML = himalaya.parse(html)
|
var parsedHTML = himalaya.parse(html)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// function scanParsedHTML(json) {
|
|
||||||
// for (var i = 0; i < json.length; i++) {
|
|
||||||
// var element = json[i]
|
|
||||||
// if (element.type == "element") {
|
|
||||||
// if (element.children.length > 0) {
|
|
||||||
// element.children = scanParsedHTML(element.children)
|
|
||||||
// }
|
|
||||||
// } else if (element.type == "text") {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// json[i] = element
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// return json
|
|
||||||
// }
|
|
||||||
|
|
||||||
// var highTable = Object.keys(highlightedWords)
|
|
||||||
|
|
||||||
// for (let index = 0; index < highTable.length; index++) {
|
|
||||||
// var term = highTable[index];
|
|
||||||
// var replacement = `<span style="color: ${highlightedWords[term]}">${term}</span>`
|
|
||||||
|
|
||||||
|
|
||||||
// element.content = element.content.replaceAll(`{${term}}`, "TEMPORARY_REPLACE")
|
|
||||||
// element.content = element.content.replaceAll(term, replacement)
|
|
||||||
// element.content = element.content.replaceAll("TEMPORARY_REPLACE", `${term}`)
|
|
||||||
// }
|
|
||||||
|
|
||||||
// parsedHTML = scanParsedHTML(parsedHTML)
|
|
||||||
|
|
||||||
// parsedHTML = himalaya.parse(himalaya.stringify(parsedHTML))
|
|
||||||
|
|
||||||
function highlighter(json) {
|
function highlighter(json) {
|
||||||
for (var i = 0; i < json.length; i++) {
|
for (var i = 0; i < json.length; i++) {
|
||||||
var element = json[i]
|
var element = json[i]
|
||||||
|
@ -232,12 +193,6 @@ module.exports = {
|
||||||
|
|
||||||
res.contentType(path.basename(filePath))
|
res.contentType(path.basename(filePath))
|
||||||
|
|
||||||
// if (req.path.includes(".css")) {
|
|
||||||
// res.setHeader("Content-Type", "text/css")
|
|
||||||
// } else if (!req.path.includes(".woff2")) {
|
|
||||||
// data = converter(data, req.query)
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (filePath.includes(".html")) {
|
if (filePath.includes(".html")) {
|
||||||
data = converter(data, req.query)
|
data = converter(data, req.query)
|
||||||
|
|
||||||
|
@ -286,33 +241,6 @@ updateCommits()
|
||||||
var lastLanyardUpdate = Date.now()
|
var lastLanyardUpdate = Date.now()
|
||||||
var lastPong = 0
|
var lastPong = 0
|
||||||
|
|
||||||
var activityImages = constants.activityImages
|
|
||||||
var cachedImages = {}
|
|
||||||
|
|
||||||
// function get_img_url(activity, size = "large_image") {
|
|
||||||
// if ("assets" in activity) {
|
|
||||||
// var image = activity.assets[size]
|
|
||||||
|
|
||||||
// if (image) {
|
|
||||||
// if (image.includes("https/")) {
|
|
||||||
// return decodeURIComponent('https://' + image.substr(image.indexOf('https/') + 6, image.length))
|
|
||||||
// } else if (image.includes("spotify")) {
|
|
||||||
// return decodeURIComponent('https://i.scdn.co/image/' + image.substr(image.indexOf('spotify:') + 8, image.length))
|
|
||||||
// } else {
|
|
||||||
// return decodeURIComponent('https://cdn.discordapp.com/app-assets/' + activity.application_id + "/" + image + ".png")
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (!image && size == "large_image") {
|
|
||||||
// if (activity.name in activityImages) {
|
|
||||||
// return decodeURIComponent(activityImages[activity.name])
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// return null
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
function socketeer() {
|
function socketeer() {
|
||||||
var lanyard = new WebSocket('https://api.violets-purgatory.dev')
|
var lanyard = new WebSocket('https://api.violets-purgatory.dev')
|
||||||
|
|
||||||
|
@ -352,38 +280,6 @@ function socketeer() {
|
||||||
} else if (data.op == 0) {
|
} else if (data.op == 0) {
|
||||||
lanyardData = data.d
|
lanyardData = data.d
|
||||||
lastLanyardUpdate = Date.now()
|
lastLanyardUpdate = Date.now()
|
||||||
|
|
||||||
// for (let index = 0; index < lanyardData.activities.length; index++) {
|
|
||||||
// const activity = lanyardData.activities[index];
|
|
||||||
|
|
||||||
// if (get_img_url(activity)) {
|
|
||||||
// var url = get_img_url(activity)
|
|
||||||
// var fn = Math.ceil(Math.random() * 100_000_000_000).toString() + "." + imgExtension
|
|
||||||
// var fp = path.join(__dirname, 'cached', fn)
|
|
||||||
|
|
||||||
// if (!cachedImages[url]) {
|
|
||||||
// const response = await (await fetch(thumborURL + "200x200/" + thumborArgs + url)).arrayBuffer()
|
|
||||||
// fs.writeFileSync(fp, Buffer.from(response))
|
|
||||||
|
|
||||||
// cachedImages[url] = fn
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (get_img_url(activity, "small_image")) {
|
|
||||||
// var url = get_img_url(activity, "small_image")
|
|
||||||
// var fn = Math.ceil(Math.random() * 100_000_000_000).toString() + "." + imgExtension
|
|
||||||
// var fp = path.join(__dirname, 'cached', fn)
|
|
||||||
|
|
||||||
// if (!cachedImages[url]) {
|
|
||||||
// const response = await (await fetch(thumborURL + "64x64/" + thumborArgs + url)).arrayBuffer()
|
|
||||||
|
|
||||||
// fs.writeFileSync(fp, Buffer.from(response))
|
|
||||||
|
|
||||||
// cachedImages[url] = fn
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
} else if (data.op == 4) {
|
} else if (data.op == 4) {
|
||||||
globalSpins = data.spins
|
globalSpins = data.spins
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue