Skip to content

Commit

Permalink
Merge pull request #62 from BetterBetterMeower/coolulist
Browse files Browse the repository at this point in the history
  • Loading branch information
3r1s-s authored Oct 25, 2024
2 parents 84887de + 7b67bcf commit a0ebc89
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
11 changes: 6 additions & 5 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -399,17 +399,18 @@ function main() {
const iul = sentdata.val;
sul = iul.trim().split(";");
eul = sul;
ful = sul.map((i) => `<span class="ulistentry" onclick="openUsrModal('${i}')">${i}</span>`)
lul = sul.length - 1;

if (sul.length > 1) {
sul = sul.slice(0, -2).join(", ") + (sul.length > 2 ? ", " : "") + sul.slice(-2).join(".");
if (ful.length > 1) {
ful = ful.slice(0, -2).join(", ") + (ful.length > 2 ? ", " : "") + ful.slice(-2).join(".");
} else {
sul = sul[0];
ful = ful[0];
}

if (page == "home") {
if (settingsstuff().ulist) {
document.getElementById("info-ulist").innerText = `${lul} ${lang().meo_userson} (${sul})`;
document.getElementById("info-ulist").innerHTML = `${lul} ${lang().meo_userson} (${ful})`;
} else {
document.getElementById("info-ulist").innerText = `${lul} ${lang().meo_userson}`;
}
Expand Down Expand Up @@ -1794,7 +1795,7 @@ function loadchat(chatId) {
<div class='info'><h1 class='header-top'>${lang().page_home}</h1><p id='info'><span id="info-ulist"></span><span id="info-typing"></span></p>
</div>` + loadinputs();
if (settingsstuff().ulist) {
document.getElementById("info-ulist").innerText = `${lul} ${lang().meo_userson} (${sul})`;
document.getElementById("info-ulist").innerHTML = `${lul} ${lang().meo_userson} (${ful})`;
} else {
document.getElementById("info-ulist").innerText = `${lul} ${lang().meo_userson}`;
}
Expand Down
7 changes: 6 additions & 1 deletion styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ img.embed {
align-items: center;
min-height: 1lh;
font-size: 12px;
opacity: 0.8;
color: color-mix(in srgb, var(--color) 80%, transparent);
user-select: none;
gap: 6px;
}
Expand Down Expand Up @@ -4018,4 +4018,9 @@ input[type="button"]:focus-visible {

.wasteof-gray {
background-color: #6b7280;
}

.ulistentry:hover {
cursor: pointer;
color: var(--color);
}

0 comments on commit a0ebc89

Please sign in to comment.