mirror of
https://github.com/nuttylmao/nutty.gg.git
synced 2026-09-18 19:50:58 -04:00
Added a time format setting
This commit is contained in:
@@ -23,6 +23,7 @@ let kickSubBadges = [];
|
||||
const showPlatform = GetBooleanParam("showPlatform", true);
|
||||
const showAvatar = GetBooleanParam("showAvatar", true);
|
||||
const showTimestamps = GetBooleanParam("showTimestamps", true);
|
||||
const timeFormat = urlParams.get("timeFormat") || "12-hour";
|
||||
const showBadges = GetBooleanParam("showBadges", true);
|
||||
const showPronouns = GetBooleanParam("showPronouns", true);
|
||||
const showUsername = GetBooleanParam("showUsername", true);
|
||||
@@ -654,7 +655,7 @@ async function TwitchChatMessage(data) {
|
||||
// Set timestamp
|
||||
if (showTimestamps) {
|
||||
timestampDiv.classList.add("timestamp");
|
||||
timestampDiv.innerText = GetCurrentTimeFormatted();
|
||||
timestampDiv.innerText = GetCurrentTimeFormatted(timeFormat);
|
||||
}
|
||||
|
||||
// Set the username info
|
||||
@@ -919,7 +920,7 @@ async function TwitchAnnouncement(data) {
|
||||
// Set timestamp
|
||||
if (showTimestamps) {
|
||||
content.querySelector("#timestamp").classList.add("timestamp");
|
||||
content.querySelector("#timestamp").innerText = GetCurrentTimeFormatted();
|
||||
content.querySelector("#timestamp").innerText = GetCurrentTimeFormatted(timeFormat);
|
||||
}
|
||||
if (data.user.name.toLowerCase() == data.user.login.toLowerCase())
|
||||
content.querySelector("#username").innerText = data.user.name;
|
||||
@@ -1412,7 +1413,7 @@ async function YouTubeMessage(data) {
|
||||
// Set timestamp
|
||||
if (showTimestamps) {
|
||||
timestampDiv.classList.add("timestamp");
|
||||
timestampDiv.innerText = GetCurrentTimeFormatted();
|
||||
timestampDiv.innerText = GetCurrentTimeFormatted(timeFormat);
|
||||
}
|
||||
|
||||
// Set the message data
|
||||
@@ -2397,7 +2398,7 @@ async function KickChatMessage(data) {
|
||||
// Set timestamp
|
||||
if (showTimestamps) {
|
||||
timestampDiv.classList.add("timestamp");
|
||||
timestampDiv.innerText = GetCurrentTimeFormatted();
|
||||
timestampDiv.innerText = GetCurrentTimeFormatted(timeFormat);
|
||||
}
|
||||
|
||||
// Set the username info
|
||||
@@ -2880,7 +2881,7 @@ async function TikTokChat(data) {
|
||||
// Set timestamp
|
||||
if (showTimestamps) {
|
||||
timestampDiv.classList.add("timestamp");
|
||||
timestampDiv.innerText = GetCurrentTimeFormatted();
|
||||
timestampDiv.innerText = GetCurrentTimeFormatted(timeFormat);
|
||||
}
|
||||
|
||||
// Set the username info
|
||||
|
||||
Reference in New Issue
Block a user