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:
@@ -26,6 +26,7 @@ let kickSubBadges = [];
|
||||
const showPlatform = GetBooleanParam("showPlatform", true);
|
||||
const showAvatar = GetBooleanParam("showAvatar", true);
|
||||
const showTimestamps = GetBooleanParam("showTimestamps", false);
|
||||
const timeFormat = urlParams.get("timeFormat") || "12-hour";
|
||||
const showBadges = GetBooleanParam("showBadges", true);
|
||||
const showPronouns = GetBooleanParam("showPronouns", false);
|
||||
const showUsername = GetBooleanParam("showUsername", true);
|
||||
@@ -555,7 +556,7 @@ async function TwitchChatMessage(data) {
|
||||
// Set timestamp
|
||||
if (showTimestamps) {
|
||||
timestampDiv.classList.add("timestamp");
|
||||
timestampDiv.innerText = GetCurrentTimeFormatted();
|
||||
timestampDiv.innerText = GetCurrentTimeFormatted(timeFormat);
|
||||
}
|
||||
|
||||
// Set the username info
|
||||
@@ -922,7 +923,7 @@ function YouTubeMessage(data) {
|
||||
// Set timestamp
|
||||
if (showTimestamps) {
|
||||
timestampDiv.classList.add("timestamp");
|
||||
timestampDiv.innerText = GetCurrentTimeFormatted();
|
||||
timestampDiv.innerText = GetCurrentTimeFormatted(timeFormat);
|
||||
}
|
||||
|
||||
// Set the message data
|
||||
@@ -1350,7 +1351,7 @@ async function KickChatMessage(data) {
|
||||
// Set timestamp
|
||||
if (showTimestamps) {
|
||||
timestampDiv.classList.add("timestamp");
|
||||
timestampDiv.innerText = GetCurrentTimeFormatted();
|
||||
timestampDiv.innerText = GetCurrentTimeFormatted(timeFormat);
|
||||
}
|
||||
|
||||
// Set the username info
|
||||
@@ -1588,7 +1589,7 @@ async function TikTokChat(data) {
|
||||
// Set timestamp
|
||||
if (showTimestamps) {
|
||||
timestampDiv.classList.add("timestamp");
|
||||
timestampDiv.innerText = GetCurrentTimeFormatted();
|
||||
timestampDiv.innerText = GetCurrentTimeFormatted(timeFormat);
|
||||
}
|
||||
|
||||
// Set the username info
|
||||
|
||||
@@ -24,6 +24,25 @@
|
||||
"defaultValue": false,
|
||||
"group": "Appearance"
|
||||
},
|
||||
{
|
||||
"id": "timeFormat",
|
||||
"label": "Time Format",
|
||||
"description": "",
|
||||
"type": "select",
|
||||
"showIf": "showTimestamps",
|
||||
"options": [
|
||||
{
|
||||
"value": "12-hour",
|
||||
"label": "12 Hour Time"
|
||||
},
|
||||
{
|
||||
"value": "24-hour",
|
||||
"label": "24 Hour Time"
|
||||
}
|
||||
],
|
||||
"defaultValue": "12-hour",
|
||||
"group": "Appearance"
|
||||
},
|
||||
{
|
||||
"id": "showBadges",
|
||||
"label": "Show Badges",
|
||||
|
||||
Reference in New Issue
Block a user