made everything work
This commit is contained in:
parent
45496ace17
commit
305a81508e
3 changed files with 12 additions and 11 deletions
|
@ -25,7 +25,7 @@ function onUpdate(data) {
|
|||
let listening = false;
|
||||
let content = "";
|
||||
data.activities.forEach(presence => {
|
||||
if(presence.application_id === "463151177836658699" && presence.assets.small_text != "Paused") { // premid
|
||||
if(presence.application_id === "463151177836658699" && presence.assets.small_text !== "Paused") { // premid
|
||||
listening = true;
|
||||
artist = presence.state.substring(0, presence.state.indexOf(" -"));
|
||||
if (artist === "") {
|
||||
|
@ -53,7 +53,7 @@ function onUpdate(data) {
|
|||
});
|
||||
document.getElementById("presence").style.display = content === "" ? "none": "flex";
|
||||
document.getElementById("presence-content").innerText = content;
|
||||
document.getElementById("presence-icon").src = listening ? "music.ico" : "game.ico";
|
||||
document.getElementById("presence-icon").src = listening ? "img/music.ico" : "img/game.ico";
|
||||
}
|
||||
LanyardWrapper.connectWebSocket("886685857560539176", onUpdate)
|
||||
.catch(err => {
|
||||
|
|
|
@ -2,6 +2,7 @@ var express = require("express");
|
|||
var app = express();
|
||||
|
||||
app.set("view engine", "ejs");
|
||||
app.use(express.static("public"))
|
||||
|
||||
app.get("/", function(req, res) {
|
||||
res.render("index");
|
||||
|
|
|
@ -11,13 +11,13 @@
|
|||
<title>nin0dev</title>
|
||||
|
||||
<link rel="stylesheet" href="https://unpkg.com/7.css">
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<link rel="icon" type="image/x-icon" href="logo-but-round.png">
|
||||
<meta name="theme-color" content="#00D0D0">
|
||||
<meta property="og:url" content="https://nin0.dev" />
|
||||
<meta property="og:title" content="nin0dev" />
|
||||
<meta property="og:description" content="Hey, I'm nin0dev, a Canadian software developer." />
|
||||
<meta property="og:image" content="https://nin0.dev/logo.png" />
|
||||
<meta property="og:url" content="https://nin0.dev" />
|
||||
<meta property="og:title" content="nin0dev" />
|
||||
<meta property="og:description" content="Hey, I'm nin0dev, a Canadian software developer." />
|
||||
<meta property="og:image" content="https://nin0.dev/logo.png" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="window" id="main-window">
|
||||
|
@ -26,12 +26,12 @@
|
|||
</div>
|
||||
<div class="window-body">
|
||||
<div id="header">
|
||||
<img src="logo.png" alt="the nin0dev logo" id="pfp">
|
||||
<img src="img/logo.png" alt="the nin0dev logo" id="pfp">
|
||||
<h3>nin0dev <span style="font-size: 0.4em;">(he/him)</span></h3>
|
||||
</div>
|
||||
<br/>
|
||||
<div id="presence" style="display: none; margin-bottom: 12px;">
|
||||
<img src="game.ico" id="presence-icon">
|
||||
<img src="img/game.ico" id="presence-icon">
|
||||
<p id="presence-content"></p>
|
||||
</div>
|
||||
<fieldset>
|
||||
|
@ -97,8 +97,8 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="oneko.js"></script>
|
||||
<script src="js/oneko.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/lanyard-wrapper/dist/index.browser.js"></script>
|
||||
<script src="index.js"></script>
|
||||
<script src="js/index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue