Compare commits
No commits in common. "d7dccca8102d94b21bfdd4ed7e292105762f6f7e" and "bb5f3a6bd13e8e303e08108f88c5b123b276c36a" have entirely different histories.
d7dccca810
...
bb5f3a6bd1
8 changed files with 6 additions and 130 deletions
|
@ -17,7 +17,7 @@ These highlighted words ARE case senstive. You can make them not case sensitive
|
||||||
Highlighted words will automatically highlight adjacent letters. So, for example, `NodeJS-generated` will all be highlighted green, as `NodeJS` is a keyword.
|
Highlighted words will automatically highlight adjacent letters. So, for example, `NodeJS-generated` will all be highlighted green, as `NodeJS` is a keyword.
|
||||||
|
|
||||||
If a highlighted word finds adjacent paranthesis, then the entire parenthesis will be highlighted.
|
If a highlighted word finds adjacent paranthesis, then the entire parenthesis will be highlighted.
|
||||||
For example `(Godot Engine is super cool)` will all be highlighted blue. So will `(My favorite UTAUloid is Teto)`. But, on the other hand, `(Don't you think Javascript sucks?)` will only have `Javascript` highlighted.
|
For example `(Godot Engine is super cool)` will all be highlighted blue. So will `(My favorite utoid is Teto)`. But, on the other hand, `(Don't you think Javascript sucks?)` will only have `Javascript` highlighted.
|
||||||
|
|
||||||
### Dynamic HTML
|
### Dynamic HTML
|
||||||
In `pageUpdater.js`, is a dictionary that specifies keywords to look for. Then, if it finds those keywords, and replaces them with HTML.
|
In `pageUpdater.js`, is a dictionary that specifies keywords to look for. Then, if it finds those keywords, and replaces them with HTML.
|
||||||
|
|
|
@ -335,7 +335,6 @@
|
||||||
{
|
{
|
||||||
"words": [
|
"words": [
|
||||||
"CSS",
|
"CSS",
|
||||||
".css",
|
|
||||||
"Neow",
|
"Neow",
|
||||||
"The Defect"
|
"The Defect"
|
||||||
],
|
],
|
||||||
|
|
|
@ -51,14 +51,6 @@ function firstToUpper(str) {
|
||||||
return str.charAt(0).toUpperCase() + str.slice(1)
|
return str.charAt(0).toUpperCase() + str.slice(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
function onlyIfExists(string, check) {
|
|
||||||
if (check) {
|
|
||||||
return string
|
|
||||||
} else {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function makeHtmlSafe(str) {
|
function makeHtmlSafe(str) {
|
||||||
return String(str).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
return String(str).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
||||||
}
|
}
|
||||||
|
@ -307,8 +299,9 @@ function converter(html, dynamic = true) {
|
||||||
for (var x = 0; x < sitesTable.length; x++) {
|
for (var x = 0; x < sitesTable.length; x++) {
|
||||||
var siteName = sitesTable[x]
|
var siteName = sitesTable[x]
|
||||||
var siteData = sites[siteName]
|
var siteData = sites[siteName]
|
||||||
html += `<a class="chip" ${onlyIfExists(`href="${siteData.url}"`, siteData.url)}>${siteName}: ${siteData.name.replaceAll("Violet", "{Violet}")}</a>`
|
if (siteData.url) {
|
||||||
|
html += `<a class="chip" href="${siteData.url}">${siteName}: ${siteData.name.replaceAll("Violet", "{Violet}")}</a>`
|
||||||
|
}
|
||||||
}
|
}
|
||||||
html += "</div></div>"
|
html += "</div></div>"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
function loop() {
|
|
||||||
var date = new Date()
|
|
||||||
|
|
||||||
var hour = date.getHours();
|
|
||||||
hour = (hour < 10 ? "0" : "") + hour;
|
|
||||||
|
|
||||||
var min = date.getMinutes();
|
|
||||||
min = (min < 10 ? "0" : "") + min;
|
|
||||||
|
|
||||||
var sec = date.getSeconds();
|
|
||||||
sec = (sec < 10 ? "0" : "") + sec;
|
|
||||||
|
|
||||||
$("#time").text(hour + ":" + min)
|
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
loop()
|
|
||||||
}, 1000)
|
|
||||||
}
|
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", function() {
|
|
||||||
loop()
|
|
||||||
})
|
|
||||||
|
|
||||||
$(document).on('keypress',function(e) {
|
|
||||||
if(e.which == 102) {
|
|
||||||
if ($.fullscreen.isFullScreen()) {
|
|
||||||
$.fullscreen.exit()
|
|
||||||
} else {
|
|
||||||
$("body").fullscreen()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
File diff suppressed because one or more lines are too long
|
@ -1,37 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<link rel="stylesheet" type="text/css" href="../style.css">
|
|
||||||
<link rel="stylesheet" type="text/css" href="../subpage.css">
|
|
||||||
<link rel="stylesheet" href="./style.css">
|
|
||||||
|
|
||||||
<script src="../jquery.js"></script>
|
|
||||||
<script src="../main.js"></script>
|
|
||||||
<script src="./fullscreen.js"></script>
|
|
||||||
<script src="./ambient.js"></script>
|
|
||||||
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
|
|
||||||
<title>Violet's Purgatory Ambient Page</title>
|
|
||||||
|
|
||||||
<meta name="darkreader-lock">
|
|
||||||
|
|
||||||
<meta content="Ambient Page - Violet's Purgatory" property="og:title" />
|
|
||||||
<meta content="This page isn't really made for public use. Ignore it!" property="og:description" />
|
|
||||||
<meta content="https://api.violets-purgatory.dev/v1/pfp" property="og:image" />
|
|
||||||
<meta content="#a200ff" data-react-helmet="true" name="theme-color" />
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
{WEATHER_MODIFIER}
|
|
||||||
<div class="mainDiv">
|
|
||||||
<h1 id="time">00:00</h1>
|
|
||||||
<div id="activityHtml">
|
|
||||||
{ACTIVITIES}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
|
@ -1,19 +0,0 @@
|
||||||
body {
|
|
||||||
background-image: none;
|
|
||||||
background-color: black;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
margin: auto;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (min-height: 500px) {
|
|
||||||
html,
|
|
||||||
body {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#time {
|
|
||||||
font-size: 5rem;
|
|
||||||
}
|
|
|
@ -154,7 +154,7 @@ window.onbeforeunload = function () {
|
||||||
window.scrollTo(0, 0);
|
window.scrollTo(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", function() {
|
window.onload = function () {
|
||||||
$("#jsEnabled").text("true")
|
$("#jsEnabled").text("true")
|
||||||
|
|
||||||
pfp = $(".pfp")
|
pfp = $(".pfp")
|
||||||
|
@ -191,7 +191,7 @@ document.addEventListener("DOMContentLoaded", function() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
socketeer()
|
socketeer()
|
||||||
})
|
}
|
||||||
|
|
||||||
var lastPong = Date.now()
|
var lastPong = Date.now()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue