mirror of
https://github.com/nuttylmao/nutty.gg.git
synced 2026-09-19 04:00:59 -04:00
Minor layout changes
This commit is contained in:
@@ -51,13 +51,17 @@
|
|||||||
|
|
||||||
<template id="cardTemplate">
|
<template id="cardTemplate">
|
||||||
<div id="card">
|
<div id="card">
|
||||||
<label id="header">
|
<div class="message-contents add-this-class-to-the-thing-to-make-all-the-text-centered-vertically-because-that-looks-much-better">
|
||||||
<span id="avatar"></span>
|
<div id="avatar"></div>
|
||||||
<span id="icon"></span>
|
<div>
|
||||||
<span id="title"></span>
|
<label id="header">
|
||||||
<br id="line-space">
|
<span id="icon"></span>
|
||||||
</label>
|
<span id="title"></span>
|
||||||
<span id="content"></span>
|
<br id="line-space">
|
||||||
|
</label>
|
||||||
|
<span id="content"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
+10
-19
@@ -25,7 +25,7 @@ const font = urlParams.get("font") || "";
|
|||||||
const fontSize = urlParams.get("fontSize") || "30";
|
const fontSize = urlParams.get("fontSize") || "30";
|
||||||
const lineSpacing = urlParams.get("lineSpacing") || "1.7";
|
const lineSpacing = urlParams.get("lineSpacing") || "1.7";
|
||||||
const background = urlParams.get("background") || "#000000";
|
const background = urlParams.get("background") || "#000000";
|
||||||
const opacity = urlParams.get("opacity") || "0.85";
|
const opacity = urlParams.get("opacity") || "0";
|
||||||
|
|
||||||
const hideAfter = GetIntParam("hideAfter", 0);
|
const hideAfter = GetIntParam("hideAfter", 0);
|
||||||
const excludeCommands = GetBooleanParam("excludeCommands", true);
|
const excludeCommands = GetBooleanParam("excludeCommands", true);
|
||||||
@@ -423,6 +423,8 @@ async function TwitchChatMessage(data) {
|
|||||||
const usernameDiv = instance.querySelector("#username");
|
const usernameDiv = instance.querySelector("#username");
|
||||||
const messageDiv = instance.querySelector("#message");
|
const messageDiv = instance.querySelector("#message");
|
||||||
|
|
||||||
|
// messageContainerDiv.classList.add("bubble");
|
||||||
|
|
||||||
// Set First Time Chatter
|
// Set First Time Chatter
|
||||||
const firstMessage = data.message.firstMessage;
|
const firstMessage = data.message.firstMessage;
|
||||||
if (firstMessage && showMessage) {
|
if (firstMessage && showMessage) {
|
||||||
@@ -559,10 +561,6 @@ async function TwitchChatMessage(data) {
|
|||||||
avatar.classList.add("avatar");
|
avatar.classList.add("avatar");
|
||||||
avatarDiv.appendChild(avatar);
|
avatarDiv.appendChild(avatar);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
avatarDiv.style.display = 'none';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hide the header if the same username sends a message twice in a row
|
// Hide the header if the same username sends a message twice in a row
|
||||||
// EXCEPT when the scroll direction is set to reverse (scrollDirection == 2)
|
// EXCEPT when the scroll direction is set to reverse (scrollDirection == 2)
|
||||||
@@ -1089,6 +1087,7 @@ function YouTubeMessage(data) {
|
|||||||
const instance = template.content.cloneNode(true);
|
const instance = template.content.cloneNode(true);
|
||||||
|
|
||||||
// Get divs
|
// Get divs
|
||||||
|
const messageContainerDiv = instance.querySelector("#messageContainer");
|
||||||
const userInfoDiv = instance.querySelector("#userInfo");
|
const userInfoDiv = instance.querySelector("#userInfo");
|
||||||
const avatarDiv = instance.querySelector("#avatar");
|
const avatarDiv = instance.querySelector("#avatar");
|
||||||
const timestampDiv = instance.querySelector("#timestamp");
|
const timestampDiv = instance.querySelector("#timestamp");
|
||||||
@@ -1097,6 +1096,8 @@ function YouTubeMessage(data) {
|
|||||||
const usernameDiv = instance.querySelector("#username");
|
const usernameDiv = instance.querySelector("#username");
|
||||||
const messageDiv = instance.querySelector("#message");
|
const messageDiv = instance.querySelector("#message");
|
||||||
|
|
||||||
|
// messageContainerDiv.classList.add("bubble");
|
||||||
|
|
||||||
// Set timestamp
|
// Set timestamp
|
||||||
if (showTimestamps) {
|
if (showTimestamps) {
|
||||||
timestampDiv.classList.add("timestamp");
|
timestampDiv.classList.add("timestamp");
|
||||||
@@ -1181,10 +1182,6 @@ function YouTubeMessage(data) {
|
|||||||
avatar.classList.add("avatar");
|
avatar.classList.add("avatar");
|
||||||
avatarDiv.appendChild(avatar);
|
avatarDiv.appendChild(avatar);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
avatarDiv.style.display = 'none';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Hide the header if the same username sends a message twice in a row
|
// Hide the header if the same username sends a message twice in a row
|
||||||
@@ -1969,6 +1966,8 @@ async function KickChatMessage(data) {
|
|||||||
const usernameDiv = instance.querySelector("#username");
|
const usernameDiv = instance.querySelector("#username");
|
||||||
const messageDiv = instance.querySelector("#message");
|
const messageDiv = instance.querySelector("#message");
|
||||||
|
|
||||||
|
// messageContainerDiv.classList.add("bubble");
|
||||||
|
|
||||||
// Set First Time Chatter
|
// Set First Time Chatter
|
||||||
const firstMessage = data.firstMessage;
|
const firstMessage = data.firstMessage;
|
||||||
if (firstMessage && showMessage) {
|
if (firstMessage && showMessage) {
|
||||||
@@ -2098,10 +2097,6 @@ async function KickChatMessage(data) {
|
|||||||
avatar.classList.add("avatar");
|
avatar.classList.add("avatar");
|
||||||
avatarDiv.appendChild(avatar);
|
avatarDiv.appendChild(avatar);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
avatarDiv.style.display = 'none';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hide the header if the same username sends a message twice in a row
|
// Hide the header if the same username sends a message twice in a row
|
||||||
// EXCEPT when the scroll direction is set to reverse (scrollDirection == 2)
|
// EXCEPT when the scroll direction is set to reverse (scrollDirection == 2)
|
||||||
@@ -2297,8 +2292,8 @@ async function KickRewardRedeemed(data) {
|
|||||||
// Set the card background colors
|
// Set the card background colors
|
||||||
cardDiv.classList.add('kick');
|
cardDiv.classList.add('kick');
|
||||||
|
|
||||||
|
// Render avatars
|
||||||
if (showAvatar) {
|
if (showAvatar) {
|
||||||
// Render avatars
|
|
||||||
const username = data.user;
|
const username = data.user;
|
||||||
const avatarURL = await GetAvatar(username, 'kick');
|
const avatarURL = await GetAvatar(username, 'kick');
|
||||||
const avatar = new Image();
|
const avatar = new Image();
|
||||||
@@ -2339,8 +2334,8 @@ async function KickIncomingRaid(data) {
|
|||||||
// Set the card background colors
|
// Set the card background colors
|
||||||
cardDiv.classList.add('kick');
|
cardDiv.classList.add('kick');
|
||||||
|
|
||||||
|
// Render avatars
|
||||||
if (showAvatar) {
|
if (showAvatar) {
|
||||||
// Render avatars
|
|
||||||
const username = data.user;
|
const username = data.user;
|
||||||
const avatarURL = await GetAvatar(username, 'kick');
|
const avatarURL = await GetAvatar(username, 'kick');
|
||||||
const avatar = new Image();
|
const avatar = new Image();
|
||||||
@@ -2509,10 +2504,6 @@ function TikTokChat(data) {
|
|||||||
avatar.classList.add("avatar");
|
avatar.classList.add("avatar");
|
||||||
avatarDiv.appendChild(avatar);
|
avatarDiv.appendChild(avatar);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
avatarDiv.style.display = 'none';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hide the header if the same username sends a message twice in a row
|
// Hide the header if the same username sends a message twice in a row
|
||||||
// EXCEPT when the scroll direction is set to reverse (scrollDirection == 2)
|
// EXCEPT when the scroll direction is set to reverse (scrollDirection == 2)
|
||||||
|
|||||||
@@ -97,7 +97,7 @@
|
|||||||
"label": "Background Opacity",
|
"label": "Background Opacity",
|
||||||
"description": "",
|
"description": "",
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"defaultValue": "0.90",
|
"defaultValue": "0.00",
|
||||||
"min": 0,
|
"min": 0,
|
||||||
"max": 1,
|
"max": 1,
|
||||||
"step": ".01",
|
"step": ".01",
|
||||||
|
|||||||
@@ -93,8 +93,15 @@ li {
|
|||||||
font-size: 0.7em;
|
font-size: 0.7em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bubble {
|
||||||
|
background: #000000bf !important;
|
||||||
|
padding: 0.5em 1em;
|
||||||
|
border-radius: var(--border-radius);
|
||||||
|
}
|
||||||
|
|
||||||
.highlightMessage {
|
.highlightMessage {
|
||||||
background: #adadad46;
|
/* background: #adadad46 !important; */
|
||||||
|
background: #414141bf !important;
|
||||||
padding: 0.5em 1em;
|
padding: 0.5em 1em;
|
||||||
border-radius: var(--border-radius);
|
border-radius: var(--border-radius);
|
||||||
}
|
}
|
||||||
@@ -102,13 +109,21 @@ li {
|
|||||||
.message-contents {
|
.message-contents {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
gap: 1em;
|
gap: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.add-this-class-to-the-thing-to-make-all-the-text-centered-vertically-because-that-looks-much-better {
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#avatar {
|
#avatar {
|
||||||
width: 2em;
|
width: 2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#avatar:empty {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.avatar {
|
.avatar {
|
||||||
height: 2em;
|
height: 2em;
|
||||||
margin: 1px;
|
margin: 1px;
|
||||||
|
|||||||
Reference in New Issue
Block a user