${authorName}
From e924b9e1f5c9837cfcf615f5a021d3a4d6afbd4b Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sat, 24 Jan 2026 15:05:41 +0300
Subject: [PATCH 091/275] Update chrome.css
---
src/theme/css/chrome.css | 31 +++++++++++++++++++++++--------
1 file changed, 23 insertions(+), 8 deletions(-)
diff --git a/src/theme/css/chrome.css b/src/theme/css/chrome.css
index 41c1bfb8726..bacffce5c15 100644
--- a/src/theme/css/chrome.css
+++ b/src/theme/css/chrome.css
@@ -778,29 +778,44 @@ a > .hljs {
}
.mobile-nav-chapters {
+ font-size: 1.5rem;
text-align: center;
text-decoration: none;
- color: var(--link-color) !important;
+ border: 1px solid rgba(255, 255, 255, 0.05);
+ border-radius: var(--border-radius);
+ color: var(--text-secondary) !important;
+ transition: 0.4s;
}
.mobile-nav-chapters i {
- transition: 0.2s;
+ color: var(--link-color);
+ background-color: var(--card-bg);
+ padding: 1rem;
+ width: 4rem;
+ border-radius: var(--border-radius);
+ font-size: 2rem;
+ transition: 0.4s;
}
.mobile-nav-chapters:hover i {
- color: #ded;
- transition: 0.2s;
+ color: #ded !important;
+ border-radius: 20px;
+ transition: 0.4s;
+}
+
+.mobile-nav-chapters:hover {
+ border: 1px solid rgba(255, 255, 255, 0.1);
+ border-radius: 20px;
+ transition: 0.4s;
}
.previous {
float: left;
padding-right: 1.5rem;
- margin-top: -.2rem;
}
.next {
padding-left: 1.5rem;
- margin-top: -.2rem;
float: right;
right: var(--page-padding);
}
@@ -839,8 +854,7 @@ a > .hljs {
@media (max-width: 768px) {
.prev-page-info,
.next-page-info {
- font-size: 11px;
- margin-top: 3px;
+ font-size: 1rem;
}
}
@@ -1612,3 +1626,4 @@ ul#searchresults span.teaser em {
+
From 075fd8c5c3bed0054a2d26a4de3888283efe3537 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sat, 24 Jan 2026 15:07:07 +0300
Subject: [PATCH 092/275] Update index.hbs
---
src/theme/index.hbs | 4 ----
1 file changed, 4 deletions(-)
diff --git a/src/theme/index.hbs b/src/theme/index.hbs
index a9c967d19ab..315c9c7b5ec 100644
--- a/src/theme/index.hbs
+++ b/src/theme/index.hbs
@@ -200,10 +200,6 @@
-
-
-
-
{{{ content }}}
From 788bfe61b17278aae7429517e7c8b3dcc1fdd7dd Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sat, 24 Jan 2026 15:17:08 +0300
Subject: [PATCH 093/275] Update chrome.css
---
src/theme/css/chrome.css | 113 ++++++++++++++++++---------------------
1 file changed, 51 insertions(+), 62 deletions(-)
diff --git a/src/theme/css/chrome.css b/src/theme/css/chrome.css
index bacffce5c15..b9129f70919 100644
--- a/src/theme/css/chrome.css
+++ b/src/theme/css/chrome.css
@@ -179,75 +179,77 @@ html {
/* ===== Last edited ===== */
.last_file_edit {
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
- font-size: 1rem;
- color: var(--text-secondary);
- margin: 1rem 0;
- padding: 1.3rem;
- border: 1px solid rgba(255, 255, 255, 0.05);
- background-color: var(--card-bg);
- border-radius: var(--border-radius);
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
+ font-size: 1rem;
+ color: var(--text-secondary);
+ margin: 1rem 0;
+ padding: 1.3rem;
+ border: 1px solid rgba(255, 255, 255, 0.05);
+ background-color: var(--card-bg);
+ border-radius: var(--border-radius);
}
.last_file_edit .edit-info {
- display: flex;
- align-items: center;
- gap: 1rem;
+ display: flex;
+ align-items: center;
+ gap: 1rem;
}
.last_file_edit .edit-avatar {
- width: 4rem;
- height: 4rem;
- border-radius: 50%;
- object-fit: cover;
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
- flex-shrink: 0;
+ user-select: none;
+ -webkit-user-select: none;
+ width: 4rem;
+ height: 4rem;
+ border-radius: 50%;
+ object-fit: cover;
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
+ flex-shrink: 0;
}
.last_file_edit .edit-details {
- display: flex;
- flex-direction: column;
- line-height: 1;
- flex-grow: 1;
+ display: flex;
+ flex-direction: column;
+ line-height: 1;
+ flex-grow: 1;
}
.last_file_edit .edit-date-line {
- margin-bottom: .3rem;
+ margin-bottom: .3rem;
}
.last_file_edit .edit-date {
- color: var(--text-secondary);
- font-weight: 600;
- font-size: 1.45rem;
+ color: var(--text-secondary);
+ font-weight: 600;
+ font-size: 1.45rem;
}
.last_file_edit .edit-author-line {
- color: var(--text-secondary);
+ color: var(--text-secondary);
}
.last_file_edit .edit-author {
- font-size: 1.3rem;
+ font-size: 1.3rem;
}
@media (max-width: 768px) {
- .last_file_edit {
- margin: 15px 0;
- padding: 12px;
- font-size: 12px;
- }
+ .last_file_edit {
+ margin: 15px 0;
+ padding: 12px;
+ font-size: 12px;
+ }
- .last_file_edit .edit-avatar {
- width: 32px;
- height: 32px;
- }
+ .last_file_edit .edit-avatar {
+ width: 32px;
+ height: 32px;
+ }
- .last_file_edit .edit-date {
- font-size: 13px;
- }
+ .last_file_edit .edit-date {
+ font-size: 13px;
+ }
- .last_file_edit .edit-author {
- font-size: 12px;
- }
+ .last_file_edit .edit-author {
+ font-size: 12px;
+ }
}
/* ===== Legacy Card Styles ===== */
@@ -704,40 +706,26 @@ a > .hljs {
.editPage {
user-select: none;
-webkit-user-select: none;
- border: solid;
- border-width: 1px;
border-radius: 10px;
- border-color: var(--card-hover);
- color: var(--link-color);
+ border: 1px solid rgba(255, 255, 255, 0.1);
+ color: rgba(255, 255, 255, 0.5) !important;
width: fit-content;
- padding: 5px;
+ padding: 1rem;
text-decoration: none;
- margin-top: -2.2rem;
+ margin-right: 1rem;
+ margin-top: -1rem;
text-align: center;
display: block;
margin-left: auto;
- margin-right: 5px;
font-size: 85%;
transition: 0.3s;
}
.editPage:hover {
- font-size: 87.5%;
- border-radius: 8px;
- border-color: var(--link-color);
+ border-color: rgba(255, 255, 255, 0.2);
transition: 0.3s;
}
-@media (min-width: 750px) {
- .editPage:after {
- content: "Edit this page";
- }
-
- #editPageIcon {
- padding-right: 0.4rem;
- }
-}
-
@media (max-width: 750px) {
.editPage {
visibility: hidden;
@@ -1627,3 +1615,4 @@ ul#searchresults span.teaser em {
+
From 85b6b20a745475a38ed6d00c09ce2c5c13ca782d Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sat, 24 Jan 2026 15:20:44 +0300
Subject: [PATCH 094/275] Update chrome.css
---
src/theme/css/chrome.css | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/theme/css/chrome.css b/src/theme/css/chrome.css
index b9129f70919..acb7aa83f6a 100644
--- a/src/theme/css/chrome.css
+++ b/src/theme/css/chrome.css
@@ -224,6 +224,7 @@ html {
}
.last_file_edit .edit-author-line {
+ margin-top: -2.25rem;
color: var(--text-secondary);
}
@@ -712,8 +713,7 @@ a > .hljs {
width: fit-content;
padding: 1rem;
text-decoration: none;
- margin-right: 1rem;
- margin-top: -1rem;
+ margin-top: -2rem;
text-align: center;
display: block;
margin-left: auto;
@@ -1616,3 +1616,4 @@ ul#searchresults span.teaser em {
+
From 5ab479f0ba98fda998a22c82953e689cb143bde1 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sat, 24 Jan 2026 15:21:41 +0300
Subject: [PATCH 095/275] Update chrome.css
---
src/theme/css/chrome.css | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/theme/css/chrome.css b/src/theme/css/chrome.css
index acb7aa83f6a..0077d0343c2 100644
--- a/src/theme/css/chrome.css
+++ b/src/theme/css/chrome.css
@@ -224,7 +224,7 @@ html {
}
.last_file_edit .edit-author-line {
- margin-top: -2.25rem;
+ margin-top: -1.5rem;
color: var(--text-secondary);
}
@@ -1617,3 +1617,4 @@ ul#searchresults span.teaser em {
+
From ea76631468416478d409a973c0882caaca7a76ad Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sat, 24 Jan 2026 15:52:13 +0300
Subject: [PATCH 096/275] Update apply-settings.js
---
src/theme/settings/apply-settings.js | 30 ++++++++++++++++++++--------
1 file changed, 22 insertions(+), 8 deletions(-)
diff --git a/src/theme/settings/apply-settings.js b/src/theme/settings/apply-settings.js
index b352c1bc1c5..6ced52ddc1d 100644
--- a/src/theme/settings/apply-settings.js
+++ b/src/theme/settings/apply-settings.js
@@ -8,7 +8,7 @@ function enhanceNavigationSimple() {
if (prevLink) {
const href = prevLink.href;
- if (href.includes('/bdscript/') || href.includes('/callbacks/') || href.includes('/guides/') || href.includes('/resources/')) {
+ if (href.includes('/bdscript/') || href.includes('/callbacks/') || href.includes('/guides/') || href.includes('/resources/') || href.includes('/flowchart/')) {
const prevFileName = href.split('/').pop().replace('.html', '');
prevLink.textContent = formatFunctionName(prevFileName, href);
prevLink.insertAdjacentHTML('afterbegin', '
');
@@ -17,7 +17,7 @@ function enhanceNavigationSimple() {
if (nextLink) {
const href = nextLink.href;
- if (href.includes('/bdscript/') || href.includes('/callbacks/') || href.includes('/guides/') || href.includes('/resources/')) {
+ if (href.includes('/bdscript/') || href.includes('/callbacks/') || href.includes('/guides/') || href.includes('/resources/') || href.includes('/flowchart/')) {
const nextFileName = href.split('/').pop().replace('.html', '');
nextLink.textContent = formatFunctionName(nextFileName, href);
nextLink.insertAdjacentHTML('beforeend', '
');
@@ -30,10 +30,14 @@ function formatFunctionName(fileName, href) {
return 'Introduction';
}
- if (href.includes('/guides/') || href.includes('/resources/')) {
+ if (href.includes('/guides/') || href.includes('/resources/') || href.includes('/flowchart/')) {
const customTitles = {
'api': 'BDFD API',
'2fa': '2FA',
+ 'aboutSelectMenu': 'Select Menus',
+ 'aboutModals': 'Modals',
+ 'aboutButtons': 'Buttons',
+ 'aboutSlashCommands': 'Slash Commands',
'discordIDSystem': 'Discord ID System'
};
@@ -41,11 +45,21 @@ function formatFunctionName(fileName, href) {
return customTitles[fileName.toLowerCase()];
}
- let result = fileName
- .replace(/([a-z])([A-Z])/g, '$1 $2')
- .replace(/([A-Z])([A-Z][a-z])/g, '$1 $2')
- .replace(/^./, str => str.toUpperCase())
- .trim();
+ let result = fileName;
+
+ if (href.includes('/flowchart/')) {
+ result = result
+ .replace(/([a-z])([A-Z])/g, '$1 $2')
+ .toLowerCase()
+ .replace(/^./, str => str.toUpperCase());
+ } else {
+ result = result
+ .replace(/([a-z])([A-Z])/g, '$1 $2')
+ .replace(/([A-Z])([A-Z][a-z])/g, '$1 $2')
+ .replace(/^./, str => str.toUpperCase());
+ }
+
+ result = result.trim();
result = result.replace(/\bBdfd\b/gi, 'BDFD');
result = result.replace(/\b2fa\b/gi, '2FA');
From 7b9cf9806f63d7ca22c2ce1068282d9f02594751 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sat, 24 Jan 2026 19:16:20 +0300
Subject: [PATCH 097/275] Update general.css
---
src/theme/css/general.css | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/theme/css/general.css b/src/theme/css/general.css
index 8e8991b7247..ccb5b4aab9b 100644
--- a/src/theme/css/general.css
+++ b/src/theme/css/general.css
@@ -44,6 +44,10 @@ code {
h1 {
margin-top: 2%;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ width: 100%;
}
h2,
@@ -206,3 +210,4 @@ blockquote {
.tooltipped .tooltiptext {
visibility: visible;
}
+
From 1e6ce0e9e6df7d33c7a0325293ea1f8b8a3996cc Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sat, 24 Jan 2026 20:36:14 +0300
Subject: [PATCH 098/275] Update apply-settings.js
---
src/theme/settings/apply-settings.js | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/theme/settings/apply-settings.js b/src/theme/settings/apply-settings.js
index 6ced52ddc1d..1d035f2f7ed 100644
--- a/src/theme/settings/apply-settings.js
+++ b/src/theme/settings/apply-settings.js
@@ -1,3 +1,11 @@
+// Example "Today at"
+function removeTimestamp() {
+ const timestamps = document.querySelectorAll('discord-system-message[type] .discord-message-timestamp');
+ timestamps.forEach(timestamp => {
+ timestamp.remove();
+ });
+}
+
// Next function
function enhanceNavigationSimple() {
const navWrapper = document.querySelector('.nav-wrapper');
@@ -312,6 +320,8 @@ function setDiscordTheme(colorId) {
const formattedTime = `Today at ${formattedHour}:${formattedMinute}`;
timestamp.textContent = formattedTime;
});
+
+ removeTimestamp();
}
}
};
@@ -454,4 +464,4 @@ document.addEventListener('DOMContentLoaded', function() {
createAndUpdateLastEdit();
enhanceNavigationSimple();
applySettings();
-});
\ No newline at end of file
+});
From 69eeb31f5f58ef702b2f374f17bbcf121c10f88a Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sat, 24 Jan 2026 20:51:53 +0300
Subject: [PATCH 099/275] Update discord-messages.css
---
src/theme/css/wiki-themes/discord-messages.css | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/theme/css/wiki-themes/discord-messages.css b/src/theme/css/wiki-themes/discord-messages.css
index b9b486b455c..fafdc77cab1 100644
--- a/src/theme/css/wiki-themes/discord-messages.css
+++ b/src/theme/css/wiki-themes/discord-messages.css
@@ -208,6 +208,12 @@
transform: scale(1.4);
}
+.discord-button {
+ margin-top: -2px;
+ border-radius: 10px;
+ border: 1px solid hsl(0deg 0% 100% / 10%);
+}
+
.discord-button.discord-button-secondary {
color: #fff !important;
}
@@ -270,3 +276,4 @@
line-height: 19px;
}
+
From 4a5259ab3d6e520ba269de8dac731ceb1f4c9f04 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sat, 24 Jan 2026 20:59:24 +0300
Subject: [PATCH 100/275] Update chrome.css
---
src/theme/css/chrome.css | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/src/theme/css/chrome.css b/src/theme/css/chrome.css
index 0077d0343c2..ab8429e9cf0 100644
--- a/src/theme/css/chrome.css
+++ b/src/theme/css/chrome.css
@@ -808,13 +808,11 @@ a > .hljs {
right: var(--page-padding);
}
-@media only screen and (max-width: 1080px) {
- .nav-wide-wrapper {
- display: none;
- }
- .nav-wrapper {
- display: block;
- }
+.nav-wide-wrapper {
+ display: none;
+}
+.nav-wrapper {
+ display: block;
}
@media only screen and (max-width: 1380px) {
@@ -1618,3 +1616,4 @@ ul#searchresults span.teaser em {
+
From e878a6635f0cea6fefbaff27a1cf901ceaa2ae19 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sat, 24 Jan 2026 21:01:29 +0300
Subject: [PATCH 101/275] Update chrome.css
---
src/theme/css/chrome.css | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/theme/css/chrome.css b/src/theme/css/chrome.css
index ab8429e9cf0..590818b011f 100644
--- a/src/theme/css/chrome.css
+++ b/src/theme/css/chrome.css
@@ -898,6 +898,10 @@ summary.admonition-title {
margin-bottom: -1.75rem !important;
}
+.admonition-anchor-link {
+ display: none !important;
+}
+
/* Summary */
summary {
@@ -1617,3 +1621,4 @@ ul#searchresults span.teaser em {
+
From 60bd04db6baf531f0e2e152429a61f241fd230e1 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sat, 24 Jan 2026 21:20:49 +0300
Subject: [PATCH 102/275] Update discord-messages.css
---
src/theme/css/wiki-themes/discord-messages.css | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/theme/css/wiki-themes/discord-messages.css b/src/theme/css/wiki-themes/discord-messages.css
index fafdc77cab1..b1bfea335e1 100644
--- a/src/theme/css/wiki-themes/discord-messages.css
+++ b/src/theme/css/wiki-themes/discord-messages.css
@@ -45,12 +45,12 @@
color: #fff;
font-size: 12px;
margin-left: 4px;
- border-radius: 3px;
line-height: 100%;
text-transform: uppercase;
display: flex;
+ font-weight: bold;
align-items: center;
- height: 2rem;
+ height: 1.5rem;
padding: 0 0.275rem;
margin-top: 0.075em;
border-radius: 4px;
@@ -277,3 +277,4 @@
}
+
From ea63874735a77894e88eacd7f4a86199bc83673f Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sat, 24 Jan 2026 21:31:09 +0300
Subject: [PATCH 103/275] Update discord-messages.css
---
src/theme/css/wiki-themes/discord-messages.css | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/theme/css/wiki-themes/discord-messages.css b/src/theme/css/wiki-themes/discord-messages.css
index b1bfea335e1..19c38e2a18b 100644
--- a/src/theme/css/wiki-themes/discord-messages.css
+++ b/src/theme/css/wiki-themes/discord-messages.css
@@ -64,6 +64,12 @@
margin-left: -0.25rem;
}
+.discord-embed-wrapper {
+ border-top: 1.5px solid hsl(0deg 0% 50% / 10%) !important;
+ border-bottom: 1.5px solid hsl(0deg 0% 50% / 10%) !important;
+ border-right: 1.5px solid hsl(0deg 0% 50% / 10%) !important;
+}
+
.discord-embed .discord-embed-author {
-webkit-box-align: center;
align-items: center;
@@ -278,3 +284,4 @@
+
From 9c646f87b57f6ef300b4bf79920f0bf372cdc9c8 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sat, 24 Jan 2026 21:49:29 +0300
Subject: [PATCH 104/275] Update discord-messages.css
---
src/theme/css/wiki-themes/discord-messages.css | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/theme/css/wiki-themes/discord-messages.css b/src/theme/css/wiki-themes/discord-messages.css
index 19c38e2a18b..d325b33e08a 100644
--- a/src/theme/css/wiki-themes/discord-messages.css
+++ b/src/theme/css/wiki-themes/discord-messages.css
@@ -1,7 +1,13 @@
-.discord-message .discord-message-markup, .discord-system-message {
+.discord-message .discord-message-markup {
font-size: 16px !important;
}
+.discord-system-message {
+ user-select: none !important;
+ -webkit-user-select: none !important;
+ font-size: 12px !important;
+}
+
.discord-message a {
color: #00aff4 !important;
}
@@ -285,3 +291,4 @@
+
From 4af15eaff42b3c224ad9ba476ab7b324305ba629 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sat, 24 Jan 2026 22:07:07 +0300
Subject: [PATCH 105/275] Update apply-settings.js
---
src/theme/settings/apply-settings.js | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/src/theme/settings/apply-settings.js b/src/theme/settings/apply-settings.js
index 1d035f2f7ed..36ed5158ea1 100644
--- a/src/theme/settings/apply-settings.js
+++ b/src/theme/settings/apply-settings.js
@@ -1,3 +1,22 @@
+// Params
+function formatArgFlags() {
+ document.querySelectorAll('ul').forEach(ul => {
+ ul.querySelectorAll('code.hljs').forEach(code => {
+ const html = code.innerHTML;
+
+ const updated = html.replace(
+ /\(Type:\s*([^) ]+)\s+Flag:\s*([^) ]+)\)/gi,
+ '
$1 $2 '
+ );
+
+ if (updated !== html) {
+ code.innerHTML = updated;
+ console.log('Updated:', code);
+ }
+ });
+ });
+}
+
// Example "Today at"
function removeTimestamp() {
const timestamps = document.querySelectorAll('discord-system-message[type] .discord-message-timestamp');
@@ -463,5 +482,6 @@ function applySettings() {
document.addEventListener('DOMContentLoaded', function() {
createAndUpdateLastEdit();
enhanceNavigationSimple();
+ formatArgFlags();
applySettings();
});
From b9a5ccf8ae7ccbab754f1c86b9b8559e271a8115 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sat, 24 Jan 2026 22:19:16 +0300
Subject: [PATCH 106/275] Update apply-settings.js
---
src/theme/settings/apply-settings.js | 20 --------------------
1 file changed, 20 deletions(-)
diff --git a/src/theme/settings/apply-settings.js b/src/theme/settings/apply-settings.js
index 36ed5158ea1..1d035f2f7ed 100644
--- a/src/theme/settings/apply-settings.js
+++ b/src/theme/settings/apply-settings.js
@@ -1,22 +1,3 @@
-// Params
-function formatArgFlags() {
- document.querySelectorAll('ul').forEach(ul => {
- ul.querySelectorAll('code.hljs').forEach(code => {
- const html = code.innerHTML;
-
- const updated = html.replace(
- /\(Type:\s*([^) ]+)\s+Flag:\s*([^) ]+)\)/gi,
- '
$1 $2 '
- );
-
- if (updated !== html) {
- code.innerHTML = updated;
- console.log('Updated:', code);
- }
- });
- });
-}
-
// Example "Today at"
function removeTimestamp() {
const timestamps = document.querySelectorAll('discord-system-message[type] .discord-message-timestamp');
@@ -482,6 +463,5 @@ function applySettings() {
document.addEventListener('DOMContentLoaded', function() {
createAndUpdateLastEdit();
enhanceNavigationSimple();
- formatArgFlags();
applySettings();
});
From 14a409d1869f7ace4bb2baab82dde7700b89ccc9 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sat, 24 Jan 2026 22:20:50 +0300
Subject: [PATCH 107/275] Update chrome.css
---
src/theme/css/chrome.css | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/theme/css/chrome.css b/src/theme/css/chrome.css
index 590818b011f..f94879ac9a1 100644
--- a/src/theme/css/chrome.css
+++ b/src/theme/css/chrome.css
@@ -214,7 +214,7 @@ html {
}
.last_file_edit .edit-date-line {
- margin-bottom: .3rem;
+ margin-bottom: .45rem;
}
.last_file_edit .edit-date {
@@ -1622,3 +1622,4 @@ ul#searchresults span.teaser em {
+
From 1e36c8481551fb9b94abb18f3b48044da9553ae4 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sat, 24 Jan 2026 22:28:02 +0300
Subject: [PATCH 108/275] Update apply-settings.js
---
src/theme/settings/apply-settings.js | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/src/theme/settings/apply-settings.js b/src/theme/settings/apply-settings.js
index 1d035f2f7ed..ca5fdc7a913 100644
--- a/src/theme/settings/apply-settings.js
+++ b/src/theme/settings/apply-settings.js
@@ -1,3 +1,18 @@
+// Container
+function createObjectInfo() {
+ if (/bdscript|callbacks/.test(location.pathname)) {
+ const h1 = document.querySelector('main h1');
+ const p = document.querySelector('main p:not(.breadcrumb p)');
+
+ if (h1 && p) {
+ const container = document.createElement('div');
+ container.className = 'objectInfo';
+ h1.after(container);
+ container.append(h1, p);
+ }
+ }
+}
+
// Example "Today at"
function removeTimestamp() {
const timestamps = document.querySelectorAll('discord-system-message[type] .discord-message-timestamp');
@@ -463,5 +478,6 @@ function applySettings() {
document.addEventListener('DOMContentLoaded', function() {
createAndUpdateLastEdit();
enhanceNavigationSimple();
+ createObjectInfo();
applySettings();
});
From c3e2cc9cd09ee44ac2c8e38e4ee7cadf960e10a6 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sat, 24 Jan 2026 22:34:28 +0300
Subject: [PATCH 109/275] Update chrome.css
---
src/theme/css/chrome.css | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/src/theme/css/chrome.css b/src/theme/css/chrome.css
index f94879ac9a1..2c4deef7c78 100644
--- a/src/theme/css/chrome.css
+++ b/src/theme/css/chrome.css
@@ -43,6 +43,24 @@ html {
margin: 0 auto;
}
+.objectInfo {
+ border: 1px solid rgba(255, 255, 255, 0.05);
+ background-color: var(--card-bg);
+ border-radius: var(--border-radius);
+ padding: 1rem;
+ margin-top: 2rem;
+}
+
+.objectInfo h1 {
+ margin-top: -.1rem;
+ margin-bottom: -1.2rem;
+}
+
+.objectInfo p {
+ color: var(--text-secondary);
+ margin-bottom: 1rem;
+}
+
/* ===== Content Card ===== */
.content-card {
background: var(--card-bg);
@@ -1623,3 +1641,4 @@ ul#searchresults span.teaser em {
+
From 8329a4259b1d3b891890e7f587b1c7bb8fd2e952 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sat, 24 Jan 2026 22:41:21 +0300
Subject: [PATCH 110/275] Update apply-settings.js
---
src/theme/settings/apply-settings.js | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/theme/settings/apply-settings.js b/src/theme/settings/apply-settings.js
index ca5fdc7a913..f2f4b118999 100644
--- a/src/theme/settings/apply-settings.js
+++ b/src/theme/settings/apply-settings.js
@@ -1,17 +1,25 @@
// Container
function createObjectInfo() {
+ if (/introduction/i.test(location.pathname)) return;
+
if (/bdscript|callbacks/.test(location.pathname)) {
const h1 = document.querySelector('main h1');
const p = document.querySelector('main p:not(.breadcrumb p)');
+ const tags = document.querySelector('main .functionTags');
if (h1 && p) {
const container = document.createElement('div');
container.className = 'objectInfo';
h1.after(container);
+
container.append(h1, p);
+
+ if (tags) {
+ container.append(tags);
+ }
}
}
-}
+}}
// Example "Today at"
function removeTimestamp() {
From 1f075817bed7e62ad7a749c02bd69be7973249ec Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sat, 24 Jan 2026 22:44:18 +0300
Subject: [PATCH 111/275] Update startThread.md
---
src/bdscript/startThread.md | 44 ++++++++++++++++++++++++++++++-------
1 file changed, 36 insertions(+), 8 deletions(-)
diff --git a/src/bdscript/startThread.md b/src/bdscript/startThread.md
index adbdb3a29c1..ecc94ada385 100644
--- a/src/bdscript/startThread.md
+++ b/src/bdscript/startThread.md
@@ -3,23 +3,51 @@ Creates a new thread in the provided channel.
## Syntax
```
-$startThread[Name;Channel ID;Message ID;(Archive duration;Return thread/channel ID?)]
+$startThread[Thread name;Channel ID;Message ID;(Archive duration;Return thread ID?)]
+```
+
+```admonish info
+Required permissions that the bot must have for this function to work properly:
+- `createpublicthreads`
```
### Parameters
-- `Name` `(Type: String || Flag: Required)`: The name of the newly created thread.
+- `Thread name` `(Type: String || Flag: Required)`: The name of the newly created thread.
- `Channel ID` `(Type: Snowflake || Flag: Required)`: The channel where the thread will be created.
- `Message ID` `(Type: Snowflake || Flag: Emptiable)`: The message from which the thread will be created. Can be left empty.
-- `Archive duration` `(Type: Integer || Flag: Optional)`: The duration after which the thread will be auto-archived due to inactivity. Accepts `60` (1 hour), `1440` (1 day), `4320` (3 days), or `10080` (7 days) as input. Defaults to `60`.
-- `Return thread/channel ID?` `(Type: Bool || Flag: Optional)`: Whether to return the thread channel ID or not. Defaults to `no`.
+- `Archive duration` `(Type: Integer || Flag: Optional)`: The [archive duration](#archive-duration) after which the thread will be auto-archived due to inactivity. Defaults to `60`.
+- `Return thread ID?` `(Type: Bool || Flag: Optional)`: Whether to return the thread channel ID or not. Defaults to `no`.
-### Permissions
-Required permissions that the bot must have for this function to work properly:
-- `createpublicthreads`
+### Archive Duration
+`60` - 1 Hour\
+`1440` - 1 Day\
+`4320` - 3 Days (Only for servers with level 1 boosted)\
+`10080` - 7 Days (Only for servers with level 2 boosted)
## Example
```
$nomention
I created a new thread! <#$startThread[Cool Thread;$channelID;;1440;yes]>
```
-
+
+``` discord yaml
+- user_id: 803569638084313098
+ username: RainbowKey
+ color: "#E67E22"
+ content: |
+ !example
+- type: thread
+ content: |
+
BDFD Support Started a thread:
Cool Thread . See all
threads .
+- user_id: 1009018156494368798
+ username: BDFD Support
+ color: "#378afa"
+ bot: true
+ verified: true
+ content: |
+ I created a new thread! <#Cool Thread>
+```
+
+```admonish info title="Read more"
+For more information, read the the [Threads Guide](../guides/general/threads.md).
+```
From f68d6c0a98a6e083131ac7e463a1e88c45ccac03 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sat, 24 Jan 2026 22:45:05 +0300
Subject: [PATCH 112/275] Update editThread.md
---
src/bdscript/editThread.md | 35 +++++++++++++++++++++++++++++------
1 file changed, 29 insertions(+), 6 deletions(-)
diff --git a/src/bdscript/editThread.md b/src/bdscript/editThread.md
index bf55d40dcfa..777d7bd93c2 100644
--- a/src/bdscript/editThread.md
+++ b/src/bdscript/editThread.md
@@ -3,21 +3,44 @@ Modifies an existing thread.
## Syntax
```
-$editThread[Thread ID;(Name;Archived;Archive duration;Locked;Slowmode)]
+$editThread[Thread ID;(Thread name;Archived?;Archive duration;Locked?;Slowmode)]
```
### Parameters
- `Thread ID` `(Type: Snowflake || Flag: Required)`: The thread channel to edit.
-- `Name` `(Type: String || Flag: Optional)`: The new name of the thread.
-- `Archived` `(Type: Bool || Flag: Optional)`: Whether to archive this thread or not.
-- `Archive duration` `(Type: Integer || Flag: Optional)`: The archive duration of this thread in minutes. Only 60, 1440,4320, 10080 can be used. Note that for the 4320 archive duration option, the server needs to be level 1 boosted, and for 10080 the server needs level 2.
-- `Locked` `(Type: Bool || Flag: Optional)`: Whether to lock this thread or not. Note that archived threads can't be locked.
+- `Thread name` `(Type: String || Flag: Optional)`: The new name of the thread.
+- `Archived?` `(Type: Bool || Flag: Optional)`: Whether to archive this thread or not.
+- `Archive duration` `(Type: Integer || Flag: Optional)`: The [archive duration](#archive-duration) after which the thread will be auto-archived due to inactivity. Defaults to `60`.
+- `Locked?` `(Type: Bool || Flag: Optional)`: Whether to lock this thread or not. Note that archived threads can't be locked.
- `Slowmode` `(Type: Integer || Flag: Optional)`: The slowmode of this channel, expressed in seconds.
-> You can use `!unchanged` as an parameter for the option to remain in its current state.
+```admonish tip
+Use `!unchanged` as an argument for the option to remain in its current state.
+```
+
+### Archive Duration
+`60` - 1 Hour\
+`1440` - 1 Day\
+`4320` - 3 Days (Only for servers with level 1 boosted)\
+`10080` - 7 Days (Only for servers with level 2 boosted)
## Example
```
$nomention
$editThread[1098166444111433819;Cool Thread 😎;no;!unchanged;!unchanged;5]
```
+
+``` discord yaml
+- user_id: 803569638084313098
+ username: RainbowKey
+ color: "#E67E22"
+ content: |
+ !example
+- type: edit
+ content: |
+
BDFD Support changed the channel name: Cool Thread 😎
+```
+
+```admonish info title="Read more"
+For more information, read the the [Threads Guide](../guides/general/threads.md).
+```
From 6c0a82db4dde4b666c8d391ee15a5e4792f2e90e Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sat, 24 Jan 2026 22:46:21 +0300
Subject: [PATCH 113/275] Update threadAddMember.md
---
src/bdscript/threadAddMember.md | 28 +++++++++++++++++++---------
1 file changed, 19 insertions(+), 9 deletions(-)
diff --git a/src/bdscript/threadAddMember.md b/src/bdscript/threadAddMember.md
index ceedb6649ef..c1d09109800 100644
--- a/src/bdscript/threadAddMember.md
+++ b/src/bdscript/threadAddMember.md
@@ -13,14 +13,24 @@ $threadAddMember[Thread ID;User ID]
## Example
```
$nomention
-$var[thread;$startThread[Cool Thread;$channelID;;60;yes]]
-$threadAddMember[$var[thread];$authorID]
+$threadAddMember[1021054508975009793;$authorID]
```
-\
-
-## Related Resources
-- [Threads Guide](../guides/threads.md)
-- [$editThread](./editThread.md)
-- [$startThread](./startThread.md)
-- [$threadRemoveMember](./threadRemoveMember.md)
+``` discord yaml
+- user_id: 803569638084313098
+ username: RainbowKey
+ color: "#E67E22"
+ content: |
+ !example
+```
+- In the thread:
+
+``` discord yaml
+- type: join
+ content: |
+
BDFD Support added
RainbowKey to the thread.
+```
+
+```admonish info title="Read more"
+For more information, read the the [Threads Guide](../guides/general/threads.md).
+```
From 5e8c95c63ed4a788742abb8a5fe5f7240a56d86f Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sat, 24 Jan 2026 22:46:57 +0300
Subject: [PATCH 114/275] Update threadRemoveMember.md
---
src/bdscript/threadRemoveMember.md | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/src/bdscript/threadRemoveMember.md b/src/bdscript/threadRemoveMember.md
index 4b2f405dd91..821c71dfcd2 100644
--- a/src/bdscript/threadRemoveMember.md
+++ b/src/bdscript/threadRemoveMember.md
@@ -11,14 +11,21 @@ $threadRemoveMember[Thread ID;User ID]
- `User ID` `(Type: Snowflake || Flag: Required)`: The user to remove from the thread.
## Example
+``` discord yaml
+- user_id: 803569638084313098
+ username: RainbowKey
+ color: "#E67E22"
+ content: |
+ !example
```
-$nomention
-$threadRemoveMember[878305123707785218;$authorID]
+- In the thread:
+
+``` discord yaml
+- type: leave
+ content: |
+
BDFD Support removed
RainbowKey from the thread.
```
-
-## Related Resources
-- [Threads Guide](../guides/threads.md)
-- [$editThread](./editThread.md)
-- [$startThread](./startThread.md)
-- [$threadAddMember](./threadAddMember.md)
+```admonish info title="Read more"
+For more information, read the the [Threads Guide](../guides/general/threads.md).
+```
From 3f9a2456601ecd55044a16ee9e43134e9553ba07 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sat, 24 Jan 2026 22:48:34 +0300
Subject: [PATCH 115/275] Update threads.md
---
src/guides/general/threads.md | 96 +++++++++++++++++++++++++++++++----
1 file changed, 86 insertions(+), 10 deletions(-)
diff --git a/src/guides/general/threads.md b/src/guides/general/threads.md
index 6b52af8363b..01aa1779c50 100644
--- a/src/guides/general/threads.md
+++ b/src/guides/general/threads.md
@@ -1,19 +1,21 @@
# Threads
In this section, you'll learn how to integrate threads in your bot.
-
+
```admonish warning
Make sure your bot has `SEND_MESSAGES_IN_THREADS` permission.
-```
+```
## Content
-[**Functions Used**](#functions-used) > [**Archive Duration**](#archive-duration) > [**$startThread[]**](#startthread) > [**$editThread[]**](#editthread) > [**$threadAddMember[]**](#threadaddmember) > [**$threadRemoveMember[]**](#threadremovemember) > [**Simple Code**](#simple-code)
+[**Functions Used**](#functions-used) > [**Archive Duration**](#archive-duration) > [**$startThread[]**](#startthread) > [**$editThread[]**](#editthread) > [**$threadAddMember[]**](#threadaddmember) > [**$threadRemoveMember[]**](#threadremovemember) > [**$threadUserCount[]**](#threadusercount) > [**$threadMessageCount[]**](#threadmessagecount) > [**Simple Code**](#simple-code)
## Functions Used
- [`$startThread[]`](../../bdscript/startThread.md)
- [`$editThread[]`](../../bdscript/editThread.md)
- [`$threadAddMember`](../../bdscript/threadAddMember.md)
- [`$threadRemoveMember[]`](../../bdscript/threadRemoveMember.md)
+- [`$threadUserCount`](../../bdscript/threadUserCount.md)
+- [`$threadMessageCount[]`](../../bdscript/threadMessageCount.md)
## Archive Duration
`60` - 1 Hour\
@@ -28,11 +30,11 @@ Creates a new thread in the provided channel.
```
$startThread[Thread name;Channel ID;Message ID;(Archive duration;Return thread ID?)]
```
-
+
```admonish info
Required permissions that the bot must have for this function to work properly:
- `createpublicthreads`
-```
+```
### Parameters
- `Thread name` `(Type: String || Flag: Required)`: The name of the newly created thread.
@@ -81,10 +83,10 @@ $editThread[Thread ID;(Thread name;Archived?;Archive duration;Locked?;Slowmode)]
- `Archive duration` `(Type: Integer || Flag: Optional)`: The [archive duration](#archive-duration) after which the thread will be auto-archived due to inactivity. Defaults to `60`.
- `Locked?` `(Type: Bool || Flag: Optional)`: Whether to lock this thread or not. Note that archived threads can't be locked.
- `Slowmode` `(Type: Integer || Flag: Optional)`: The slowmode of this channel, expressed in seconds.
-
+
```admonish tip
Use `!unchanged` as an argument for the option to remain in its current state.
-```
+```
## Example
```
@@ -165,6 +167,79 @@ $threadRemoveMember[Thread ID;User ID]
```
\
+# $threadUserCount
+Returns the total number of users in the current thread.
+
+## Syntax
+```
+$threadUserCount
+```
+
+## Example
+```
+$nomention
+This thread has $threadUserCount users!
+```
+
+```discord yaml
+- user_id: 803569638084313098
+ username: RainbowKey
+ color: "#E67E22"
+ content: |
+ !example
+- user_id: 1009018156494368798
+ username: BDFD Support
+ color: "#378afa"
+ bot: true
+ verified: true
+ content: |
+ This thread has 29 users!
+```
+
+# $threadMessageCount
+Returns the total number of users in the current thread. (**not including bot's response**)
+
+## Syntax
+```
+$threadMessageCount
+```
+
+## Example
+```
+$nomention
+This thread has a total of $threadMessageCount messages sent!
+```
+
+```discord yaml
+- user_id: 803569638084313098
+ username: RainbowKey
+ color: "#E67E22"
+ content: |
+ Hello guys!
+- user_id: 390515191819010058
+ username: kubastick
+ color: "#FF0000"
+ content: |
+ Hello RainbowKey! 👋
+- user_id: 803569638084313098
+ username: RainbowKey
+ color: "#E67E22"
+ content: |
+ !example
+- user_id: 1009018156494368798
+ username: BDFD Support
+ color: "#378afa"
+ bot: true
+ verified: true
+ content: |
+ This thread has a total of 3 messages sent!
+- user_id: 390515191819010058
+ username: kubastick
+ color: "#FF0000"
+ content: |
+ Nice!
+```
+
# Simple Code
```
$nomention
@@ -197,7 +272,8 @@ $threadAddMember[$var[id];$authorID]
content: |
BDFD Support added
RainbowKey to the thread.
```
-
-```admonish note
+
+```admonish note
If you want to learn more about threads, read [Discord's support article](https://support.discord.com/hc/en-us/articles/4403205878423-Threads-FAQ).
-```
+
+```
From 2f5b10b32f8840159164cc77a00bbaa435fb5f50 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sat, 24 Jan 2026 22:50:34 +0300
Subject: [PATCH 116/275] Update apply-settings.js
---
src/theme/settings/apply-settings.js | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/theme/settings/apply-settings.js b/src/theme/settings/apply-settings.js
index f2f4b118999..0c6231378d5 100644
--- a/src/theme/settings/apply-settings.js
+++ b/src/theme/settings/apply-settings.js
@@ -11,15 +11,11 @@ function createObjectInfo() {
const container = document.createElement('div');
container.className = 'objectInfo';
h1.after(container);
-
container.append(h1, p);
-
- if (tags) {
- container.append(tags);
- }
+ if (tags) container.append(tags);
}
}
-}}
+}
// Example "Today at"
function removeTimestamp() {
From 2b6a0ef2b8e298ec3cb7ff1f2f71115d84103175 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sat, 24 Jan 2026 22:51:46 +0300
Subject: [PATCH 117/275] Update threadUserCount.md
---
src/bdscript/threadUserCount.md | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/bdscript/threadUserCount.md b/src/bdscript/threadUserCount.md
index b31fd1279da..167e4a02820 100644
--- a/src/bdscript/threadUserCount.md
+++ b/src/bdscript/threadUserCount.md
@@ -26,3 +26,7 @@ This thread has $threadUserCount users!
content: |
This thread has 29 users!
```
+
+```admonish info title="Read more"
+For more information, read the the [Threads Guide](../guides/general/threads.md).
+```
From 7973841cc2edc497a753edbbdeb9c9b232dd02e3 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sat, 24 Jan 2026 22:52:06 +0300
Subject: [PATCH 118/275] Update threadMessageCount.md
---
src/bdscript/threadMessageCount.md | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/bdscript/threadMessageCount.md b/src/bdscript/threadMessageCount.md
index 7090f210ee9..784d4d3650c 100644
--- a/src/bdscript/threadMessageCount.md
+++ b/src/bdscript/threadMessageCount.md
@@ -41,3 +41,7 @@ This thread has a total of $threadMessageCount messages sent!
content: |
Nice!
```
+
+```admonish info title="Read more"
+For more information, read the the [Threads Guide](../guides/general/threads.md).
+```
From 2253790156903769e337ceb88463c43d3884a075 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sat, 24 Jan 2026 22:54:58 +0300
Subject: [PATCH 119/275] Update apply-settings.js
---
src/theme/settings/apply-settings.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/theme/settings/apply-settings.js b/src/theme/settings/apply-settings.js
index 0c6231378d5..476ead2a809 100644
--- a/src/theme/settings/apply-settings.js
+++ b/src/theme/settings/apply-settings.js
@@ -11,8 +11,10 @@ function createObjectInfo() {
const container = document.createElement('div');
container.className = 'objectInfo';
h1.after(container);
- container.append(h1, p);
+
+ container.append(h1);
if (tags) container.append(tags);
+ container.append(p);
}
}
}
From ac283f61bca95a32fd8f786a6daec2dcc09092e6 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sat, 24 Jan 2026 23:10:01 +0300
Subject: [PATCH 120/275] Update SUMMARY.md
---
src/SUMMARY.md | 68 +++++++++++++++++++++++++-------------------------
1 file changed, 34 insertions(+), 34 deletions(-)
diff --git a/src/SUMMARY.md b/src/SUMMARY.md
index 8421707e281..d42f06415c7 100644
--- a/src/SUMMARY.md
+++ b/src/SUMMARY.md
@@ -65,7 +65,7 @@
- [Functions]()
- [Introduction](./bdscript/introduction.md)
- - [Components]()
+ - [Component]()
- [$addButton](./bdscript/addButton.md)
- [$addSelectMenuOption](./bdscript/addSelectMenuOption.md)
- [$addSeparator](./bdscript/addSeparator.md)
@@ -82,7 +82,7 @@
- [$removeButtons[]](./bdscript/removeButtonsComplex.md)
- [$removeComponent](./bdscript/removeComponent.md)
- [$defer](./bdscript/defer.md)
- - [Embeds]()
+ - [Embed]()
- [$addContainer](./bdscript/addContainer.md)
- [$addField](./bdscript/addField.md)
- [$addMediaGallery](./bdscript/addMediaGallery.md)
@@ -118,6 +118,7 @@
- [$isUserDMEnabled](./bdscript/isUserDMEnabled.md)
- [$nickname](./bdscript/nickname.md)
- [$nickname[]](./bdscript/nicknameComplex.md)
+ - [$hypesquad](./bdscript/hypesquad.md)
- [$userAvatar](./bdscript/userAvatar.md)
- [$userBadges](./bdscript/userBadges.md)
- [$userBanner](./bdscript/userBanner.md)
@@ -151,7 +152,7 @@
- [$unbanID[]](./bdscript/unbanIDComplex.md)
- [$unmute](./bdscript/unmute.md)
- [$untimeout](./bdscript/untimeout.md)
- - [Channels]()
+ - [Channel]()
- [$afkChannelID](./bdscript/afkChannelID.md)
- [$categoryChannels](./bdscript/categoryChannels.md)
- [$categoryCount](./bdscript/categoryCount.md)
@@ -191,7 +192,7 @@
- [$slowmode](./bdscript/slowmode.md)
- [$systemChannelID](./bdscript/systemChannelID.md)
- [$voiceUserLimit](./bdscript/voiceUserLimit.md)
- - [Roles]()
+ - [Role]()
- [$allowRoleMentions](./bdscript/allowRoleMentions.md)
- [$colorRole](./bdscript/colorRole.md)
- [$createRole](./bdscript/createRole.md)
@@ -225,7 +226,6 @@
- [$userRoles](./bdscript/userRoles.md)
- [Bot]()
- [$allMembersCount](./bdscript/allMembersCount.md)
- - [$awaitFunc](./bdscript/awaitFunc.md)
- [$botCommands](./bdscript/botCommands.md)
- [$botID](./bdscript/botID.md)
- [$botLeave](./bdscript/botLeave.md)
@@ -235,32 +235,38 @@
- [$botNode](./bdscript/botNode.md)
- [$botOwnerID](./bdscript/botOwnerID.md)
- [$botTyping](./bdscript/botTyping.md)
- - [$commandFolder](./bdscript/commandFolder.md)
- - [$commandName](./bdscript/commandName.md)
- - [$commandTrigger](./bdscript/commandTrigger.md)
- - [$commandsCount](./bdscript/commandsCount.md)
- - [$customID](./bdscript/customID.md)
- - [$deletecommand](./bdscript/deletecommand.md)
- - [$enabled](./bdscript/enabled.md)
- [$getBotInvite](./bdscript/getBotInvite.md)
- [$nodeVersion](./bdscript/nodeVersion.md)
- [$nodeVersion[]](./bdscript/nodeVersionComplex.md)
+ - [$hostingExpireTime](./bdscript/hostingExpireTime.md)
+ - [$hostingExpireTime[]](./bdscript/hostingExpireTimeComplex.md)
+ - [$premiumExpireTime](./bdscript/premiumExpireTime.md)
- [$ping](./bdscript/ping.md)
- - [$registerGuildCommands](./bdscript/registerGuildCommands.md)
- - [$registerGuildCommands[]](./bdscript/registerGuildCommandsComplex.md)
- - [$scriptLanguage](./bdscript/scriptLanguage.md)
- [$shardID](./bdscript/shardID.md)
- [$shardID[]](./bdscript/shardIDComplex.md)
- [$slashCommandsCount](./bdscript/slashCommandsCount.md)
- - [$slashID](./bdscript/slashID.md)
- - [$slashID[]](./bdscript/slashIDComplex.md)
- [$serverCount](./bdscript/serverCount.md)
- [$serverNames](./bdscript/serverNames.md)
- [$serverNames[]](./bdscript/serverNamesComplex.md)
+ - [$uptime](./bdscript/uptime.md)
+ - [Command]()
+ - [$awaitFunc](./bdscript/awaitFunc.md)
+ - [$c](./bdscript/c.md)
+ - [$commandFolder](./bdscript/commandFolder.md)
+ - [$commandName](./bdscript/commandName.md)
+ - [$commandTrigger](./bdscript/commandTrigger.md)
+ - [$commandsCount](./bdscript/commandsCount.md)
+ - [$customID](./bdscript/customID.md)
+ - [$nomention](./bdscript/nomention.md)
+ - [$registerGuildCommands](./bdscript/registerGuildCommands.md)
+ - [$registerGuildCommands[]](./bdscript/registerGuildCommandsComplex.md)
+ - [$scriptLanguage](./bdscript/scriptLanguage.md)
+ - [$slashID](./bdscript/slashID.md)
+ - [$slashID[]](./bdscript/slashIDComplex.md)
+ - [$isSlash](./bdscript/isSlash.md)
- [$executionTime](./bdscript/executionTime.md)
- [$unregisterGuildCommands](./bdscript/unregisterGuildCommands.md)
- [$unregisterGuildCommands[]](./bdscript/unregisterGuildCommandsComplex.md)
- - [$uptime](./bdscript/uptime.md)
- [$eval](./bdscript/eval.md)
- [Server]()
- [$afkTimeout](./bdscript/afkTimeout.md)
@@ -274,7 +280,6 @@
- [$guildExists](./bdscript/guildExists.md)
- [$guildID](./bdscript/guildID.md)
- [$guildID[]](./bdscript/guildIDComplex.md)
- - [$hypesquad](./bdscript/hypesquad.md)
- [$membersCount](./bdscript/membersCount.md)
- [$membersCount[]](./bdscript/membersCountComplex.md)
- [$serverDescription](./bdscript/serverDescription.md)
@@ -295,11 +300,8 @@
- [$blackListServers](./bdscript/blackListServers.md)
- [$blackListUsers](./bdscript/blackListUsers.md)
- [Arguments & Conditions]()
- - [$argCount](./bdscript/argCount.md)
- [$argsCheck](./bdscript/argsCheck.md)
- [$and](./bdscript/and.md)
- - [$checkCondition](./bdscript/checkCondition.md)
- - [$checkContains](./bdscript/checkContains.md)
- [$else](./bdscript/else.md)
- [$elseif](./bdscript/elseif.md)
- [$endif](./bdscript/endif.md)
@@ -307,14 +309,13 @@
- [$isBoolean](./bdscript/isBoolean.md)
- [$isInteger](./bdscript/isInteger.md)
- [$isNumber](./bdscript/isNumber.md)
- - [$isSlash](./bdscript/isSlash.md)
- [$isValidHex](./bdscript/isValidHex.md)
- [$or](./bdscript/or.md)
- [Text]()
- - [$alternativeParsing](./bdscript/alternativeParsing.md)
+ - [$argCount](./bdscript/argCount.md)
- [$byteCount](./bdscript/byteCount.md)
- - [$c](./bdscript/c.md)
- [$charCount](./bdscript/charCount.md)
+ - [$checkCondition](./bdscript/checkCondition.md)
- [$cropText](./bdscript/cropText.md)
- [$disableInnerSpaceRemoval](./bdscript/disableInnerSpaceRemoval.md)
- [$disableSpecialEscaping](./bdscript/disableSpecialEscaping.md)
@@ -322,10 +323,8 @@
- [$getTextSplitIndex](./bdscript/getTextSplitIndex.md)
- [$getTextSplitLength](./bdscript/getTextSplitLength.md)
- [$joinSplitText](./bdscript/joinSplitText.md)
- - [$mentionedChannels](./bdscript/mentionedChannels.md)
- [$linesCount](./bdscript/linesCount.md)
- [$numberSeparator](./bdscript/numberSeparator.md)
- - [$removeContains](./bdscript/removeContains.md)
- [$removeSplitTextElement](./bdscript/removeSplitTextElement.md)
- [$repeatMessage](./bdscript/repeatMessage.md)
- [$replaceText](./bdscript/replaceText.md)
@@ -371,22 +370,19 @@
- [$getTimestamp](./bdscript/getTimestamp.md)
- [$getTimestamp[]](./bdscript/getTimestampComplex.md)
- [$hour](./bdscript/hour.md)
- - [$hostingExpireTime](./bdscript/hostingExpireTime.md)
- - [$hostingExpireTime[]](./bdscript/hostingExpireTimeComplex.md)
- - [$messageEditedTimestamp](./bdscript/messageEditedTimestamp.md)
- [$minute](./bdscript/minute.md)
- [$month](./bdscript/month.md)
- - [$premiumExpireTime](./bdscript/premiumExpireTime.md)
- [$second](./bdscript/second.md)
- [$time](./bdscript/time.md)
- [$year](./bdscript/year.md)
- - [Cooldowns]()
+ - [Cooldown]()
- [$changeCooldownTime](./bdscript/changeCooldownTime.md)
- [$cooldown](./bdscript/cooldown.md)
- [$getCooldown](./bdscript/getCooldown.md)
- [$globalCooldown](./bdscript/globalCooldown.md)
- [$serverCooldown](./bdscript/serverCooldown.md)
- [Message]()
+ - [$alternativeParsing](./bdscript/alternativeParsing.md)
- [$allowMention](./bdscript/allowMention.md)
- [$allowUserMentions](./bdscript/allowUserMentions.md)
- [$channelSendMessage](./bdscript/channelSendMessage.md)
@@ -400,10 +396,10 @@
- [$ephemeral](./bdscript/ephemeral.md)
- [$isMentioned](./bdscript/isMentioned.md)
- [$mentioned](./bdscript/mentioned.md)
- - [$nomention](./bdscript/nomention.md)
- [$getAttachments](./bdscript/getAttachments.md)
- [$getEmbedData](./bdscript/getEmbedData.md)
- [$getMessage](./bdscript/getMessage.md)
+ - [$messageEditedTimestamp](./bdscript/messageEditedTimestamp.md)
- [$isMessageEdited](./bdscript/isMessageEdited.md)
- [$ignoreLinks](./bdscript/ignoreLinks.md)
- [$message](./bdscript/message.md)
@@ -415,6 +411,8 @@
- [$reply](./bdscript/reply.md)
- [$reply[]](./bdscript/replyComplex.md)
- [$replyIn](./bdscript/replyIn.md)
+ - [$mentionedChannels](./bdscript/mentionedChannels.md)
+ - [$removeContains](./bdscript/removeContains.md)
- [$repliedMessageID](./bdscript/repliedMessageID.md)
- [$repliedMessageID[]](./bdscript/repliedMessageIDComplex.md)
- [$removeLinks](./bdscript/removeLinks.md)
@@ -423,11 +421,12 @@
- [$noMentionMessage[]](./bdscript/noMentionMessageComplex.md)
- [$sendEmbedMessage](./bdscript/sendEmbedMessage.md)
- [$sendMessage](./bdscript/sendMessage.md)
+ - [$deletecommand](./bdscript/deletecommand.md)
- [$unpinMessage](./bdscript/unpinMessage.md)
- [$useChannel](./bdscript/useChannel.md)
- [$tts](./bdscript/tts.md)
- [$url](./bdscript/url.md)
- - [Variables]()
+ - [Variable]()
- [$getChannelVar](./bdscript/getChannelVar.md)
- [$getLeaderboardPosition](./bdscript/getLeaderboardPosition.md)
- [$getLeaderboardValue](./bdscript/getLeaderboardValue.md)
@@ -444,6 +443,7 @@
- [$setUserVar](./bdscript/setUserVar.md)
- [$setVar](./bdscript/setVar.md)
- [$userLeaderboard](./bdscript/userLeaderboard.md)
+ - [$enabled](./bdscript/enabled.md)
- [$var](./bdscript/var.md)
- [$varExistError](./bdscript/varExistError.md)
- [$varExists](./bdscript/varExists.md)
From ac5f7709f535cad8ed5c52c003cdd30803d98d4b Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sat, 24 Jan 2026 23:24:26 +0300
Subject: [PATCH 121/275] Update chrome.css
---
src/theme/css/chrome.css | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/src/theme/css/chrome.css b/src/theme/css/chrome.css
index 2c4deef7c78..9a90ca2e3f1 100644
--- a/src/theme/css/chrome.css
+++ b/src/theme/css/chrome.css
@@ -344,7 +344,8 @@ html {
.functionTags {
user-select: none;
-webkit-user-select: none;
- margin-top: -1rem;
+ margin-top: 1.5rem;
+ margin-bottom: -1rem;
}
.functionTags span {
@@ -354,10 +355,9 @@ html {
border: solid;
border-width: 1px;
border-radius: 10px;
- font-size: 1.5rem;
+ font-size: 1rem;
font-weight: bold;
padding: 0.25rem 0.5rem 0.25rem 0.5rem;
- transition: 0.3s;
border-color: var(--link-color);
color: var(--link-color);
}
@@ -390,11 +390,6 @@ html {
content: "❗ ";
}
-.functionTags span:hover {
- border-radius: 12.5px;
- transition: 0.3s;
-}
-
/* Playground */
.function-playground {
@@ -1642,3 +1637,4 @@ ul#searchresults span.teaser em {
+
From b5209b39b48559b353f0f45b764f75ee11676f5e Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sun, 25 Jan 2026 00:24:20 +0300
Subject: [PATCH 122/275] Update clearReactions.md
---
src/bdscript/clearReactions.md | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/bdscript/clearReactions.md b/src/bdscript/clearReactions.md
index c144367b89a..ce5f5a4073d 100644
--- a/src/bdscript/clearReactions.md
+++ b/src/bdscript/clearReactions.md
@@ -47,3 +47,7 @@ $clearReactions[$channelID;$message;✅]
content: |
!example 1216863258708021248
```
+
+```admonish question title="What is this?"
+How [`$channelID`](./channelID.md) and [`$message`](./message.md) works?
+```
\ No newline at end of file
From f91b24d8fdd06fd66a791775c62c68eeaf77db37 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sun, 25 Jan 2026 00:25:22 +0300
Subject: [PATCH 123/275] Update boostCountComplex.md
---
src/bdscript/boostCountComplex.md | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/bdscript/boostCountComplex.md b/src/bdscript/boostCountComplex.md
index 1c2fb5fa848..6cddc0384bc 100644
--- a/src/bdscript/boostCountComplex.md
+++ b/src/bdscript/boostCountComplex.md
@@ -12,13 +12,10 @@ $boostCount[Guild ID]
## Example
```
$nomention
-This server currently has $boostCount[$message] boost(s).
+Boosts: $boostCount[$message]
```
```discord yaml
-- type: boost
- content: |
-
RainbowKey just boosted the server!
- user_id: 803569638084313098
username: RainbowKey
color: "#E67E22"
@@ -30,5 +27,9 @@ This server currently has $boostCount[$message] boost(s).
bot: true
verified: true
content: |
- This server currently has 38 boost(s).
+ Boosts: 38
+```
+
+```admonish question title="What is this?"
+How [`$message`](./message.md) works?
```
From 0252f3cb4f7a10c3ca1841f7e74d8906517c3a8e Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sun, 25 Jan 2026 00:25:46 +0300
Subject: [PATCH 124/275] Update boostCount.md
---
src/bdscript/boostCount.md | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/bdscript/boostCount.md b/src/bdscript/boostCount.md
index 69ac345847a..8d93eca4ad4 100644
--- a/src/bdscript/boostCount.md
+++ b/src/bdscript/boostCount.md
@@ -12,7 +12,19 @@ $nomention
This server currently has $boostCount boost(s).
```
-```discord yaml
+```discord yaml
+- user_id: 803569638084313098
+ username: RainbowKey
+ color: "#E67E22"
+ content: |
+ !example
+- user_id: 1009018156494368798
+ username: BDFD Support
+ color: "#378afa"
+ bot: true
+ verified: true
+ content: |
+ This server currently has 11 boost(s).
- type: boost
content: |
RainbowKey just boosted the server!
From 86d3f0ac7461ba95e47389935beccce60e855687 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sun, 25 Jan 2026 00:29:14 +0300
Subject: [PATCH 125/275] Update customEmoji.md
---
src/bdscript/customEmoji.md | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/src/bdscript/customEmoji.md b/src/bdscript/customEmoji.md
index 49c31c241dc..8e2354a790f 100644
--- a/src/bdscript/customEmoji.md
+++ b/src/bdscript/customEmoji.md
@@ -1,8 +1,8 @@
# $customEmoji
-Returns a custom emoji.
+Returns a custom emoji on the current server.
```admonish danger title="Important"
-We recommend emoji IDs instead of `$customEmoji[]` **for public** bots.
+We recommend emoji IDs instead of `$customEmoji[]` **for public** bots.
```
## Syntax
@@ -16,7 +16,20 @@ $customEmoji[Emoji name]
## Example
```
$nomention
-Hello there! $customEmoji[Wave]
+Hello bdfd! $customEmoji[BDFD]
```
-
+``` discord yaml
+- user_id: 803569638084313098
+ username: RainbowKey
+ color: "#E67E22"
+ content: |
+ !example
+- user_id: 1009018156494368798
+ username: BDFD Support
+ color: "#378afa"
+ bot: true
+ verified: true
+ content: |
+ Hello bdfd!
+```
\ No newline at end of file
From c74046100254a4a8f1dcf2c26a178ade1fc73c47 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sun, 25 Jan 2026 00:29:55 +0300
Subject: [PATCH 126/275] Update customEmoji.md
---
src/bdscript/customEmoji.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/bdscript/customEmoji.md b/src/bdscript/customEmoji.md
index 8e2354a790f..219a542932d 100644
--- a/src/bdscript/customEmoji.md
+++ b/src/bdscript/customEmoji.md
@@ -1,7 +1,7 @@
# $customEmoji
Returns a custom emoji on the current server.
-```admonish danger title="Important"
+```admonish warning title="Important"
We recommend emoji IDs instead of `$customEmoji[]` **for public** bots.
```
From ed4c5388ae9ea8ed425f3154f633b792963f5654 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sun, 25 Jan 2026 00:31:21 +0300
Subject: [PATCH 127/275] Update isEmojiAnimated.md
---
src/bdscript/isEmojiAnimated.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/bdscript/isEmojiAnimated.md b/src/bdscript/isEmojiAnimated.md
index 41bd20c0cd4..94157c068e4 100644
--- a/src/bdscript/isEmojiAnimated.md
+++ b/src/bdscript/isEmojiAnimated.md
@@ -16,8 +16,8 @@ Is emoji animated?: $isEmojiAnimated[$message]
```
``` discord yaml
-- user_id: 1262009115689881702
- username: GettingBeatenByKito
+- user_id: 803569638084313098
+ username: RainbowKey
color: "#E67E22"
content: |
!example 760463263879135242
From 6c0e47a8d349e7bb16ac7aedd0518944035078fb Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sun, 25 Jan 2026 00:32:14 +0300
Subject: [PATCH 128/275] Update emoteCount.md
---
src/bdscript/emoteCount.md | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/bdscript/emoteCount.md b/src/bdscript/emoteCount.md
index d67f32074da..b483d60add3 100644
--- a/src/bdscript/emoteCount.md
+++ b/src/bdscript/emoteCount.md
@@ -9,7 +9,7 @@ $emoteCount
## Example
```
$nomention
-There are $emoteCount emojis in $serverName[$guildID]!
+There are $emoteCount emojis in this server!
```
```discord yaml
@@ -24,9 +24,5 @@ There are $emoteCount emojis in $serverName[$guildID]!
bot: true
verified: true
content: |
- There are 149 emojis in Bot Designer for Discord Official Server!
-```
-
-```admonish question title="What is this?"
-How [`$serverName[]`](./serverName.md) and [`$guildID`](./guildID.md) works?
+ There are 149 emojis in this server!
```
From 128163bdd0af4195a668ef435f2c735f55620438 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sun, 25 Jan 2026 11:03:01 +0300
Subject: [PATCH 129/275] Update code-hg.js
---
src/theme/settings/code-hg.js | 33 +++++++++++++++++----------------
1 file changed, 17 insertions(+), 16 deletions(-)
diff --git a/src/theme/settings/code-hg.js b/src/theme/settings/code-hg.js
index 118f3e6f18a..25510a21c45 100644
--- a/src/theme/settings/code-hg.js
+++ b/src/theme/settings/code-hg.js
@@ -91,19 +91,19 @@ function fontStyle(style) {
function escapeHtml(unsafe) {
return unsafe
- .replace(/&/g, "&")
- .replace(//g, ">")
- .replace(/"/g, """);
+ .replace(/&/g, "&")
+ .replace(//g, ">")
+ .replace(/"/g, """);
}
function highlight(scheme) {
const codeBlocks = document.querySelectorAll("pre code");
- // Check if the domain contains "javascript"
- if (window.location.href.includes("javascript")) {
- return;
- }
+ // Check if the domain contains "javascript"
+ if (window.location.href.includes("javascript")) {
+ return;
+ }
try {
if (localStorage.getItem("code-hg"))
@@ -113,23 +113,24 @@ function highlight(scheme) {
codeBlocks.forEach((codeBlock) => {
let code = escapeHtml(codeBlock.textContent);
- code = code
- .replace(/\;/g, styling("semicolonHighlight", scheme))
- .replace(/\[/g, styling("bracketHighlight", scheme))
- .replace(/\]/g, styling("bracketHighlight", scheme))
- .replace(/\$[a-zA-Z]*/g, styling("fallbackHighlight", scheme))
- .replace(/.*/g, styling("defaultTextHighlight", scheme));
-
let keys = Object.keys(scheme.functionsHighlights || {}).sort(
(a, b) => b.length - a.length
);
+
keys.forEach((key) => {
code = code.replace(
- new RegExp(`\\${key}`, "g"),
+ new RegExp(`\\${key}\\b`, "g"),
functionHighlight(key, scheme)
);
});
+ code = code
+ .replace(/\;/g, styling("semicolonHighlight", scheme))
+ .replace(/\[/g, styling("bracketHighlight", scheme))
+ .replace(/\]/g, styling("bracketHighlight", scheme))
+ .replace(/\$(?!catch|else|elseif|endif|endtry|error|if|try|nomention\b)[a-zA-Z]+\b/g, styling("fallbackHighlight", scheme))
+ .replace(/.*/g, styling("defaultTextHighlight", scheme));
+
codeBlock.innerHTML = code;
});
}
From 9995d1248aeec23756ee135ba747b01e21bda598 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sun, 25 Jan 2026 11:09:14 +0300
Subject: [PATCH 130/275] Update code-hg.js
---
src/theme/settings/code-hg.js | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/theme/settings/code-hg.js b/src/theme/settings/code-hg.js
index 25510a21c45..4f7398b48ae 100644
--- a/src/theme/settings/code-hg.js
+++ b/src/theme/settings/code-hg.js
@@ -55,13 +55,13 @@ const scheme = {
},
};
-function functionHighlight(func, scheme) {
+function functionHighlight(func, scheme, match) {
let color = (scheme.functionsHighlights[func].color & 0xffffff)
.toString(16)
.padStart(6, "0")
.toUpperCase();
let style = fontStyle(scheme.functionsHighlights[func].style);
- return `$& `;
+ return `${match} `;
}
function styling(type, scheme) {
@@ -120,7 +120,7 @@ function highlight(scheme) {
keys.forEach((key) => {
code = code.replace(
new RegExp(`\\${key}\\b`, "g"),
- functionHighlight(key, scheme)
+ (match) => functionHighlight(key, scheme, match)
);
});
@@ -129,10 +129,10 @@ function highlight(scheme) {
.replace(/\[/g, styling("bracketHighlight", scheme))
.replace(/\]/g, styling("bracketHighlight", scheme))
.replace(/\$(?!catch|else|elseif|endif|endtry|error|if|try|nomention\b)[a-zA-Z]+\b/g, styling("fallbackHighlight", scheme))
- .replace(/.*/g, styling("defaultTextHighlight", scheme));
+ .replace(/[^\n]*/g, styling("defaultTextHighlight", scheme));
codeBlock.innerHTML = code;
});
}
-highlight(scheme);
+highlight(scheme);
\ No newline at end of file
From c52295d972ea8e68de6ac3123031b248345e5a53 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sun, 25 Jan 2026 11:14:05 +0300
Subject: [PATCH 131/275] Update code-hg.js
---
src/theme/settings/code-hg.js | 34 ++++++++++++++++++++++++++++++----
1 file changed, 30 insertions(+), 4 deletions(-)
diff --git a/src/theme/settings/code-hg.js b/src/theme/settings/code-hg.js
index 4f7398b48ae..1febff69c4d 100644
--- a/src/theme/settings/code-hg.js
+++ b/src/theme/settings/code-hg.js
@@ -100,7 +100,6 @@ function escapeHtml(unsafe) {
function highlight(scheme) {
const codeBlocks = document.querySelectorAll("pre code");
- // Check if the domain contains "javascript"
if (window.location.href.includes("javascript")) {
return;
}
@@ -111,8 +110,17 @@ function highlight(scheme) {
} catch {}
codeBlocks.forEach((codeBlock) => {
+ const container = document.createElement('div');
+ container.className = 'code-container';
+
+ const lineNumbers = document.createElement('div');
+ lineNumbers.className = 'line-numbers';
+
+ const codeContent = document.createElement('div');
+ codeContent.className = 'code-content';
+
let code = escapeHtml(codeBlock.textContent);
-
+
let keys = Object.keys(scheme.functionsHighlights || {}).sort(
(a, b) => b.length - a.length
);
@@ -130,8 +138,26 @@ function highlight(scheme) {
.replace(/\]/g, styling("bracketHighlight", scheme))
.replace(/\$(?!catch|else|elseif|endif|endtry|error|if|try|nomention\b)[a-zA-Z]+\b/g, styling("fallbackHighlight", scheme))
.replace(/[^\n]*/g, styling("defaultTextHighlight", scheme));
-
- codeBlock.innerHTML = code;
+
+ const lines = code.split('\n');
+
+ let lineNumbersHTML = '';
+ let codeLinesHTML = '';
+
+ for (let i = 0; i < lines.length; i++) {
+ const lineNumber = i + 1;
+ lineNumbersHTML += `${lineNumber}
`;
+ codeLinesHTML += `${lines[i] || ' '}
`;
+ }
+
+ lineNumbers.innerHTML = lineNumbersHTML;
+ codeContent.innerHTML = codeLinesHTML;
+
+ container.appendChild(lineNumbers);
+ container.appendChild(codeContent);
+
+ codeBlock.innerHTML = '';
+ codeBlock.appendChild(container);
});
}
From 24985bcd87fb2685eafc7dde43921f0cfa868658 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sun, 25 Jan 2026 11:18:01 +0300
Subject: [PATCH 132/275] Update code-hg.js
---
src/theme/settings/code-hg.js | 113 ++++++++++++++++++++++++----------
1 file changed, 81 insertions(+), 32 deletions(-)
diff --git a/src/theme/settings/code-hg.js b/src/theme/settings/code-hg.js
index 1febff69c4d..baefe090ece 100644
--- a/src/theme/settings/code-hg.js
+++ b/src/theme/settings/code-hg.js
@@ -64,16 +64,8 @@ function functionHighlight(func, scheme, match) {
return `${match} `;
}
-function styling(type, scheme) {
- if (scheme[type]) {
- let color = (scheme[type].color & 0xffffff)
- .toString(16)
- .padStart(6, "0")
- .toUpperCase();
- let style = fontStyle(scheme[type].style);
- return `$& `;
- }
- return `$& `;
+function createStyledSpan(color, style, content) {
+ return `${content} `;
}
function fontStyle(style) {
@@ -97,6 +89,23 @@ function escapeHtml(unsafe) {
.replace(/"/g, """);
}
+function getColorFromScheme(type, scheme) {
+ if (scheme[type]) {
+ return (scheme[type].color & 0xffffff)
+ .toString(16)
+ .padStart(6, "0")
+ .toUpperCase();
+ }
+ return "FFFFFF";
+}
+
+function getStyleFromScheme(type, scheme) {
+ if (scheme[type]) {
+ return fontStyle(scheme[type].style);
+ }
+ return fontStyle(0);
+}
+
function highlight(scheme) {
const codeBlocks = document.querySelectorAll("pre code");
@@ -119,27 +128,8 @@ function highlight(scheme) {
const codeContent = document.createElement('div');
codeContent.className = 'code-content';
- let code = escapeHtml(codeBlock.textContent);
-
- let keys = Object.keys(scheme.functionsHighlights || {}).sort(
- (a, b) => b.length - a.length
- );
-
- keys.forEach((key) => {
- code = code.replace(
- new RegExp(`\\${key}\\b`, "g"),
- (match) => functionHighlight(key, scheme, match)
- );
- });
-
- code = code
- .replace(/\;/g, styling("semicolonHighlight", scheme))
- .replace(/\[/g, styling("bracketHighlight", scheme))
- .replace(/\]/g, styling("bracketHighlight", scheme))
- .replace(/\$(?!catch|else|elseif|endif|endtry|error|if|try|nomention\b)[a-zA-Z]+\b/g, styling("fallbackHighlight", scheme))
- .replace(/[^\n]*/g, styling("defaultTextHighlight", scheme));
-
- const lines = code.split('\n');
+ let originalCode = codeBlock.textContent;
+ const lines = originalCode.split('\n');
let lineNumbersHTML = '';
let codeLinesHTML = '';
@@ -147,7 +137,66 @@ function highlight(scheme) {
for (let i = 0; i < lines.length; i++) {
const lineNumber = i + 1;
lineNumbersHTML += `${lineNumber}
`;
- codeLinesHTML += `${lines[i] || ' '}
`;
+
+ let line = escapeHtml(lines[i]);
+
+ // Process specific functions first
+ let keys = Object.keys(scheme.functionsHighlights || {}).sort(
+ (a, b) => b.length - a.length
+ );
+
+ keys.forEach((key) => {
+ const regex = new RegExp(`\\${key}\\b`, "g");
+ line = line.replace(regex, (match) => {
+ return functionHighlight(key, scheme, match);
+ });
+ });
+
+ // Process other patterns
+ // Semicolons
+ line = line.replace(/;/g, (match) => {
+ return createStyledSpan(
+ getColorFromScheme("semicolonHighlight", scheme),
+ getStyleFromScheme("semicolonHighlight", scheme),
+ match
+ );
+ });
+
+ // Brackets
+ line = line.replace(/\[/g, (match) => {
+ return createStyledSpan(
+ getColorFromScheme("bracketHighlight", scheme),
+ getStyleFromScheme("bracketHighlight", scheme),
+ match
+ );
+ });
+
+ line = line.replace(/\]/g, (match) => {
+ return createStyledSpan(
+ getColorFromScheme("bracketHighlight", scheme),
+ getStyleFromScheme("bracketHighlight", scheme),
+ match
+ );
+ });
+
+ // Remaining functions not processed earlier
+ line = line.replace(/\$(?!catch|else|elseif|endif|endtry|error|if|try|nomention\b)[a-zA-Z]+\b/g, (match) => {
+ return createStyledSpan(
+ getColorFromScheme("fallbackHighlight", scheme),
+ getStyleFromScheme("fallbackHighlight", scheme),
+ match
+ );
+ });
+
+ // Apply default text highlight to the entire line
+ // If line is empty, keep it empty
+ if (line.trim() === '' && line.length === 0) {
+ codeLinesHTML += `
`;
+ } else {
+ const defaultColor = getColorFromScheme("defaultTextHighlight", scheme);
+ const defaultStyle = getStyleFromScheme("defaultTextHighlight", scheme);
+ codeLinesHTML += `${line}
`;
+ }
}
lineNumbers.innerHTML = lineNumbersHTML;
From 153c484108ad19b60663d475e59d05d4caa4e3f7 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sun, 25 Jan 2026 11:28:37 +0300
Subject: [PATCH 133/275] Update code-hg.js
---
src/theme/settings/code-hg.js | 71 +++++++++++++++++++++++++----------
1 file changed, 52 insertions(+), 19 deletions(-)
diff --git a/src/theme/settings/code-hg.js b/src/theme/settings/code-hg.js
index baefe090ece..1f7098bfe93 100644
--- a/src/theme/settings/code-hg.js
+++ b/src/theme/settings/code-hg.js
@@ -55,13 +55,13 @@ const scheme = {
},
};
-function functionHighlight(func, scheme, match) {
+function functionHighlight(func, scheme) {
let color = (scheme.functionsHighlights[func].color & 0xffffff)
.toString(16)
.padStart(6, "0")
.toUpperCase();
let style = fontStyle(scheme.functionsHighlights[func].style);
- return `${match} `;
+ return `${func} `;
}
function createStyledSpan(color, style, content) {
@@ -138,22 +138,41 @@ function highlight(scheme) {
const lineNumber = i + 1;
lineNumbersHTML += `${lineNumber}
`;
- let line = escapeHtml(lines[i]);
+ let line = lines[i];
+
+ // Escape HTML first
+ line = escapeHtml(line);
// Process specific functions first
let keys = Object.keys(scheme.functionsHighlights || {}).sort(
(a, b) => b.length - a.length
);
- keys.forEach((key) => {
- const regex = new RegExp(`\\${key}\\b`, "g");
- line = line.replace(regex, (match) => {
- return functionHighlight(key, scheme, match);
+ // Create regex pattern for all functions
+ const functionPattern = new RegExp(`(${keys.map(k => `\\${k}\\b`).join('|')})`, 'g');
+
+ // Replace all functions at once
+ if (keys.length > 0) {
+ line = line.replace(functionPattern, (match) => {
+ // Find which function was matched
+ const matchedFunc = keys.find(key => {
+ const regex = new RegExp(`\\${key}\\b`);
+ return regex.test(match);
+ });
+
+ if (matchedFunc) {
+ let color = (scheme.functionsHighlights[matchedFunc].color & 0xffffff)
+ .toString(16)
+ .padStart(6, "0")
+ .toUpperCase();
+ let style = fontStyle(scheme.functionsHighlights[matchedFunc].style);
+ return `${match} `;
+ }
+ return match;
});
- });
-
- // Process other patterns
- // Semicolons
+ }
+
+ // Process semicolons
line = line.replace(/;/g, (match) => {
return createStyledSpan(
getColorFromScheme("semicolonHighlight", scheme),
@@ -162,7 +181,7 @@ function highlight(scheme) {
);
});
- // Brackets
+ // Process brackets
line = line.replace(/\[/g, (match) => {
return createStyledSpan(
getColorFromScheme("bracketHighlight", scheme),
@@ -179,8 +198,17 @@ function highlight(scheme) {
);
});
- // Remaining functions not processed earlier
- line = line.replace(/\$(?!catch|else|elseif|endif|endtry|error|if|try|nomention\b)[a-zA-Z]+\b/g, (match) => {
+ // Process remaining functions (not in functionsHighlights)
+ // First, we need to skip already processed functions
+ const processedFunctionsPattern = keys.length > 0
+ ? new RegExp(`\\$(?!(${keys.map(k => k.substring(1)).join('|')})\\b)[a-zA-Z]+\\b`, 'g')
+ : /\$[a-zA-Z]+\b/g;
+
+ line = line.replace(processedFunctionsPattern, (match) => {
+ // Check if this is inside a span tag (already processed)
+ if (/]*>.*<\/span>/.test(match)) {
+ return match;
+ }
return createStyledSpan(
getColorFromScheme("fallbackHighlight", scheme),
getStyleFromScheme("fallbackHighlight", scheme),
@@ -188,20 +216,25 @@ function highlight(scheme) {
);
});
- // Apply default text highlight to the entire line
- // If line is empty, keep it empty
+ // Wrap the entire line in default styling if it's not empty
if (line.trim() === '' && line.length === 0) {
codeLinesHTML += `
`;
} else {
- const defaultColor = getColorFromScheme("defaultTextHighlight", scheme);
- const defaultStyle = getStyleFromScheme("defaultTextHighlight", scheme);
- codeLinesHTML += `${line}
`;
+ // Don't wrap in another span if the line already has styling
+ // Just apply default color to the container
+ codeLinesHTML += `${line}
`;
}
}
lineNumbers.innerHTML = lineNumbersHTML;
codeContent.innerHTML = codeLinesHTML;
+ // Apply default text color to the entire code content
+ const defaultColor = getColorFromScheme("defaultTextHighlight", scheme);
+ const defaultStyle = getStyleFromScheme("defaultTextHighlight", scheme);
+ codeContent.style.color = `#${defaultColor}`;
+ codeContent.style.cssText += `; ${defaultStyle}`;
+
container.appendChild(lineNumbers);
container.appendChild(codeContent);
From abc5321e82c4803ac1e92091fc4109450f755f13 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sun, 25 Jan 2026 11:34:35 +0300
Subject: [PATCH 134/275] Update code-hg.js
---
src/theme/settings/code-hg.js | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/theme/settings/code-hg.js b/src/theme/settings/code-hg.js
index 1f7098bfe93..8f36ae492b6 100644
--- a/src/theme/settings/code-hg.js
+++ b/src/theme/settings/code-hg.js
@@ -129,7 +129,18 @@ function highlight(scheme) {
codeContent.className = 'code-content';
let originalCode = codeBlock.textContent;
- const lines = originalCode.split('\n');
+ // Split by newline and remove empty lines at the end
+ let lines = originalCode.split('\n');
+
+ // Remove trailing empty lines
+ while (lines.length > 0 && lines[lines.length - 1].trim() === '') {
+ lines.pop();
+ }
+
+ // If no lines left after removing empty ones, add one empty line
+ if (lines.length === 0) {
+ lines = [''];
+ }
let lineNumbersHTML = '';
let codeLinesHTML = '';
From b94ba583b7076a77d5bd8b382ca1c524c7eb2ccd Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sun, 25 Jan 2026 11:38:33 +0300
Subject: [PATCH 135/275] Update code-hg.js
---
src/theme/settings/code-hg.js | 151 +++++++++++++++++-----------------
1 file changed, 75 insertions(+), 76 deletions(-)
diff --git a/src/theme/settings/code-hg.js b/src/theme/settings/code-hg.js
index 8f36ae492b6..348c8982a4b 100644
--- a/src/theme/settings/code-hg.js
+++ b/src/theme/settings/code-hg.js
@@ -55,15 +55,6 @@ const scheme = {
},
};
-function functionHighlight(func, scheme) {
- let color = (scheme.functionsHighlights[func].color & 0xffffff)
- .toString(16)
- .padStart(6, "0")
- .toUpperCase();
- let style = fontStyle(scheme.functionsHighlights[func].style);
- return `${func} `;
-}
-
function createStyledSpan(color, style, content) {
return `${content} `;
}
@@ -145,94 +136,104 @@ function highlight(scheme) {
let lineNumbersHTML = '';
let codeLinesHTML = '';
+ // Get colors and styles for all scheme types
+ const defaultColor = getColorFromScheme("defaultTextHighlight", scheme);
+ const defaultStyle = getStyleFromScheme("defaultTextHighlight", scheme);
+ const bracketColor = getColorFromScheme("bracketHighlight", scheme);
+ const bracketStyle = getStyleFromScheme("bracketHighlight", scheme);
+ const semicolonColor = getColorFromScheme("semicolonHighlight", scheme);
+ const semicolonStyle = getStyleFromScheme("semicolonHighlight", scheme);
+ const fallbackColor = getColorFromScheme("fallbackHighlight", scheme);
+ const fallbackStyle = getStyleFromScheme("fallbackHighlight", scheme);
+
+ // Prepare function highlights
+ const functionHighlights = {};
+ let keys = Object.keys(scheme.functionsHighlights || {}).sort(
+ (a, b) => b.length - a.length
+ );
+
+ keys.forEach((key) => {
+ let color = (scheme.functionsHighlights[key].color & 0xffffff)
+ .toString(16)
+ .padStart(6, "0")
+ .toUpperCase();
+ let style = fontStyle(scheme.functionsHighlights[key].style);
+ functionHighlights[key] = { color, style };
+ });
+
for (let i = 0; i < lines.length; i++) {
const lineNumber = i + 1;
lineNumbersHTML += `${lineNumber}
`;
let line = lines[i];
- // Escape HTML first
+ // Escape HTML first (for plain text parts)
line = escapeHtml(line);
// Process specific functions first
- let keys = Object.keys(scheme.functionsHighlights || {}).sort(
- (a, b) => b.length - a.length
- );
-
- // Create regex pattern for all functions
- const functionPattern = new RegExp(`(${keys.map(k => `\\${k}\\b`).join('|')})`, 'g');
-
- // Replace all functions at once
- if (keys.length > 0) {
- line = line.replace(functionPattern, (match) => {
- // Find which function was matched
- const matchedFunc = keys.find(key => {
- const regex = new RegExp(`\\${key}\\b`);
- return regex.test(match);
- });
-
- if (matchedFunc) {
- let color = (scheme.functionsHighlights[matchedFunc].color & 0xffffff)
- .toString(16)
- .padStart(6, "0")
- .toUpperCase();
- let style = fontStyle(scheme.functionsHighlights[matchedFunc].style);
- return `${match} `;
- }
- return match;
+ keys.forEach((key) => {
+ const regex = new RegExp(`(${key.replace(/\$/g, '\\$')})(?!\\w)`, 'g');
+ line = line.replace(regex, (match) => {
+ const funcData = functionHighlights[key];
+ return `${match} `;
});
- }
-
- // Process semicolons
- line = line.replace(/;/g, (match) => {
- return createStyledSpan(
- getColorFromScheme("semicolonHighlight", scheme),
- getStyleFromScheme("semicolonHighlight", scheme),
- match
- );
});
- // Process brackets
- line = line.replace(/\[/g, (match) => {
- return createStyledSpan(
- getColorFromScheme("bracketHighlight", scheme),
- getStyleFromScheme("bracketHighlight", scheme),
- match
- );
+ // Process other elements
+ // Brackets
+ line = line.replace(/\[/g, () => {
+ return `[ `;
});
- line = line.replace(/\]/g, (match) => {
- return createStyledSpan(
- getColorFromScheme("bracketHighlight", scheme),
- getStyleFromScheme("bracketHighlight", scheme),
- match
- );
+ line = line.replace(/\]/g, () => {
+ return `] `;
});
- // Process remaining functions (not in functionsHighlights)
- // First, we need to skip already processed functions
- const processedFunctionsPattern = keys.length > 0
- ? new RegExp(`\\$(?!(${keys.map(k => k.substring(1)).join('|')})\\b)[a-zA-Z]+\\b`, 'g')
- : /\$[a-zA-Z]+\b/g;
+ // Semicolons
+ line = line.replace(/;/g, () => {
+ return `; `;
+ });
- line = line.replace(processedFunctionsPattern, (match) => {
- // Check if this is inside a span tag (already processed)
- if (/]*>.*<\/span>/.test(match)) {
- return match;
+ // Remaining functions (not in functionsHighlights)
+ // Create pattern to match $function names
+ const remainingFuncPattern = /\$[a-zA-Z]+\b/g;
+ line = line.replace(remainingFuncPattern, (match) => {
+ // Skip if already inside a span (already processed)
+ if (line.indexOf(`/g) || []).length;
+
+ // If we're inside a span, don't wrap again
+ if (spansBefore > spansClosedBefore) {
+ return match;
+ }
}
- return createStyledSpan(
- getColorFromScheme("fallbackHighlight", scheme),
- getStyleFromScheme("fallbackHighlight", scheme),
- match
- );
+
+ // Check if this is a known function (already processed)
+ let isKnown = false;
+ keys.forEach((key) => {
+ if (match === key) {
+ isKnown = true;
+ }
+ });
+
+ if (!isKnown) {
+ return `${match} `;
+ }
+
+ return match;
});
- // Wrap the entire line in default styling if it's not empty
+ // Add the line to output
if (line.trim() === '' && line.length === 0) {
codeLinesHTML += `
`;
} else {
- // Don't wrap in another span if the line already has styling
- // Just apply default color to the container
codeLinesHTML += `${line}
`;
}
}
@@ -241,8 +242,6 @@ function highlight(scheme) {
codeContent.innerHTML = codeLinesHTML;
// Apply default text color to the entire code content
- const defaultColor = getColorFromScheme("defaultTextHighlight", scheme);
- const defaultStyle = getStyleFromScheme("defaultTextHighlight", scheme);
codeContent.style.color = `#${defaultColor}`;
codeContent.style.cssText += `; ${defaultStyle}`;
From b1c81334922b2dbe7f3c856966f89b095afbd19d Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sun, 25 Jan 2026 12:09:58 +0300
Subject: [PATCH 136/275] Update code-hg.js
---
src/theme/settings/code-hg.js | 248 ++++++++++++++++++----------------
1 file changed, 130 insertions(+), 118 deletions(-)
diff --git a/src/theme/settings/code-hg.js b/src/theme/settings/code-hg.js
index 348c8982a4b..2c42d637a8f 100644
--- a/src/theme/settings/code-hg.js
+++ b/src/theme/settings/code-hg.js
@@ -55,48 +55,6 @@ const scheme = {
},
};
-function createStyledSpan(color, style, content) {
- return `${content} `;
-}
-
-function fontStyle(style) {
- switch (style) {
- case 0:
- return "font-style: normal; font-weight: normal;";
- case 1:
- return "font-style: normal; font-weight: bold;";
- case 2:
- return "font-style: italic; font-weight: normal;";
- case 3:
- return "font-style: italic; font-weight: bold;";
- }
-}
-
-function escapeHtml(unsafe) {
- return unsafe
- .replace(/&/g, "&")
- .replace(//g, ">")
- .replace(/"/g, """);
-}
-
-function getColorFromScheme(type, scheme) {
- if (scheme[type]) {
- return (scheme[type].color & 0xffffff)
- .toString(16)
- .padStart(6, "0")
- .toUpperCase();
- }
- return "FFFFFF";
-}
-
-function getStyleFromScheme(type, scheme) {
- if (scheme[type]) {
- return fontStyle(scheme[type].style);
- }
- return fontStyle(0);
-}
-
function highlight(scheme) {
const codeBlocks = document.querySelectorAll("pre code");
@@ -136,115 +94,169 @@ function highlight(scheme) {
let lineNumbersHTML = '';
let codeLinesHTML = '';
- // Get colors and styles for all scheme types
- const defaultColor = getColorFromScheme("defaultTextHighlight", scheme);
- const defaultStyle = getStyleFromScheme("defaultTextHighlight", scheme);
- const bracketColor = getColorFromScheme("bracketHighlight", scheme);
- const bracketStyle = getStyleFromScheme("bracketHighlight", scheme);
- const semicolonColor = getColorFromScheme("semicolonHighlight", scheme);
- const semicolonStyle = getStyleFromScheme("semicolonHighlight", scheme);
- const fallbackColor = getColorFromScheme("fallbackHighlight", scheme);
- const fallbackStyle = getStyleFromScheme("fallbackHighlight", scheme);
+ // Prepare colors
+ const defaultColor = (scheme.defaultTextHighlight.color & 0xffffff).toString(16).padStart(6, "0").toUpperCase();
+ const bracketColor = (scheme.bracketHighlight.color & 0xffffff).toString(16).padStart(6, "0").toUpperCase();
+ const semicolonColor = (scheme.semicolonHighlight.color & 0xffffff).toString(16).padStart(6, "0").toUpperCase();
+ const fallbackColor = (scheme.fallbackHighlight.color & 0xffffff).toString(16).padStart(6, "0").toUpperCase();
- // Prepare function highlights
- const functionHighlights = {};
- let keys = Object.keys(scheme.functionsHighlights || {}).sort(
- (a, b) => b.length - a.length
- );
+ // Prepare styles
+ const defaultStyle = scheme.defaultTextHighlight.style;
+ const bracketStyle = scheme.bracketHighlight.style;
+ const semicolonStyle = scheme.semicolonHighlight.style;
+ const fallbackStyle = scheme.fallbackHighlight.style;
- keys.forEach((key) => {
- let color = (scheme.functionsHighlights[key].color & 0xffffff)
- .toString(16)
- .padStart(6, "0")
- .toUpperCase();
- let style = fontStyle(scheme.functionsHighlights[key].style);
- functionHighlights[key] = { color, style };
+ // Prepare function styles
+ const functionStyles = {};
+ Object.keys(scheme.functionsHighlights).forEach(key => {
+ functionStyles[key] = {
+ color: (scheme.functionsHighlights[key].color & 0xffffff).toString(16).padStart(6, "0").toUpperCase(),
+ style: scheme.functionsHighlights[key].style
+ };
});
+ // Function to get style string
+ function getStyleString(styleNum) {
+ switch (styleNum) {
+ case 0: return "font-style: normal; font-weight: normal;";
+ case 1: return "font-style: normal; font-weight: bold;";
+ case 2: return "font-style: italic; font-weight: normal;";
+ case 3: return "font-style: italic; font-weight: bold;";
+ default: return "font-style: normal; font-weight: normal;";
+ }
+ }
+
for (let i = 0; i < lines.length; i++) {
const lineNumber = i + 1;
lineNumbersHTML += `${lineNumber}
`;
let line = lines[i];
+ let resultLine = '';
+ let currentPos = 0;
- // Escape HTML first (for plain text parts)
- line = escapeHtml(line);
+ // Escape HTML in the line
+ line = line.replace(/&/g, "&")
+ .replace(//g, ">")
+ .replace(/"/g, """);
- // Process specific functions first
- keys.forEach((key) => {
- const regex = new RegExp(`(${key.replace(/\$/g, '\\$')})(?!\\w)`, 'g');
- line = line.replace(regex, (match) => {
- const funcData = functionHighlights[key];
- return `${match} `;
- });
- });
+ // Find all special tokens in the line
+ const tokens = [];
- // Process other elements
- // Brackets
- line = line.replace(/\[/g, () => {
- return `[ `;
+ // Find functions from functionsHighlights
+ Object.keys(functionStyles).forEach(func => {
+ const regex = new RegExp(func.replace(/\$/g, '\\$'), 'g');
+ let match;
+ while ((match = regex.exec(line)) !== null) {
+ tokens.push({
+ start: match.index,
+ end: match.index + func.length,
+ type: 'function',
+ value: func,
+ content: match[0]
+ });
+ }
});
- line = line.replace(/\]/g, () => {
- return `] `;
+ // Find brackets
+ ['[', ']'].forEach(bracket => {
+ let pos = -1;
+ while ((pos = line.indexOf(bracket, pos + 1)) !== -1) {
+ tokens.push({
+ start: pos,
+ end: pos + 1,
+ type: 'bracket',
+ value: bracket,
+ content: bracket
+ });
+ }
});
- // Semicolons
- line = line.replace(/;/g, () => {
- return `; `;
- });
+ // Find semicolons
+ let semicolonPos = -1;
+ while ((semicolonPos = line.indexOf(';', semicolonPos + 1)) !== -1) {
+ tokens.push({
+ start: semicolonPos,
+ end: semicolonPos + 1,
+ type: 'semicolon',
+ value: ';',
+ content: ';'
+ });
+ }
- // Remaining functions (not in functionsHighlights)
- // Create pattern to match $function names
- const remainingFuncPattern = /\$[a-zA-Z]+\b/g;
- line = line.replace(remainingFuncPattern, (match) => {
- // Skip if already inside a span (already processed)
- if (line.indexOf(`/g) || []).length;
-
- // If we're inside a span, don't wrap again
- if (spansBefore > spansClosedBefore) {
- return match;
- }
- }
+ // Find other $functions (fallback)
+ const funcRegex = /\$[a-zA-Z]+\b/g;
+ let funcMatch;
+ while ((funcMatch = funcRegex.exec(line)) !== null) {
+ // Check if this function is already in tokens
+ const isAlreadyProcessed = tokens.some(token =>
+ token.start === funcMatch.index && token.type === 'function'
+ );
- // Check if this is a known function (already processed)
- let isKnown = false;
- keys.forEach((key) => {
- if (match === key) {
- isKnown = true;
- }
- });
+ if (!isAlreadyProcessed) {
+ tokens.push({
+ start: funcMatch.index,
+ end: funcMatch.index + funcMatch[0].length,
+ type: 'fallback',
+ value: funcMatch[0],
+ content: funcMatch[0]
+ });
+ }
+ }
+
+ // Sort tokens by position
+ tokens.sort((a, b) => a.start - b.start);
+
+ // Build the line with styled tokens
+ let lastPos = 0;
+
+ tokens.forEach(token => {
+ // Add plain text before token
+ if (token.start > lastPos) {
+ resultLine += line.substring(lastPos, token.start);
+ }
- if (!isKnown) {
- return `${match} `;
+ // Add styled token
+ let color, style;
+ switch (token.type) {
+ case 'function':
+ color = functionStyles[token.value].color;
+ style = getStyleString(functionStyles[token.value].style);
+ break;
+ case 'bracket':
+ color = bracketColor;
+ style = getStyleString(bracketStyle);
+ break;
+ case 'semicolon':
+ color = semicolonColor;
+ style = getStyleString(semicolonStyle);
+ break;
+ case 'fallback':
+ color = fallbackColor;
+ style = getStyleString(fallbackStyle);
+ break;
}
- return match;
+ resultLine += `${token.content} `;
+ lastPos = token.end;
});
+ // Add remaining plain text
+ if (lastPos < line.length) {
+ resultLine += line.substring(lastPos);
+ }
+
// Add the line to output
if (line.trim() === '' && line.length === 0) {
codeLinesHTML += `
`;
} else {
- codeLinesHTML += `${line}
`;
+ codeLinesHTML += `${resultLine}
`;
}
}
lineNumbers.innerHTML = lineNumbersHTML;
codeContent.innerHTML = codeLinesHTML;
- // Apply default text color to the entire code content
- codeContent.style.color = `#${defaultColor}`;
- codeContent.style.cssText += `; ${defaultStyle}`;
-
container.appendChild(lineNumbers);
container.appendChild(codeContent);
From 50ae50c754a495d7b6a4c1c140f273fdd3262c19 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Sun, 25 Jan 2026 12:32:07 +0300
Subject: [PATCH 137/275] Update chrome.css
---
src/theme/css/chrome.css | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/theme/css/chrome.css b/src/theme/css/chrome.css
index 9a90ca2e3f1..7a39744e244 100644
--- a/src/theme/css/chrome.css
+++ b/src/theme/css/chrome.css
@@ -888,7 +888,7 @@ code.hljs:not(.discord-message code) {
.nostyle {
/* Disabled Code HL style */
- color: inherit !important;
+ color: var(--text-secondary) !important;
font-weight: inherit !important;
font-style: normal !important;
}
From c8a0ab161f802560d54af8318d4f63fb65a8e8b3 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Tue, 27 Jan 2026 17:41:08 +0300
Subject: [PATCH 138/275] Update chrome.css
---
src/theme/css/chrome.css | 42 +++++++++++++++++++++++++++++++++++++---
1 file changed, 39 insertions(+), 3 deletions(-)
diff --git a/src/theme/css/chrome.css b/src/theme/css/chrome.css
index 7a39744e244..848fce4c2ad 100644
--- a/src/theme/css/chrome.css
+++ b/src/theme/css/chrome.css
@@ -881,9 +881,44 @@ pre {
}
code.hljs:not(.discord-message code) {
- background: var(--card-bg);
- padding: 0.8em;
- margin-bottom: -0.5rem;
+ background: var(--card-bg);
+ margin-bottom: -0.5rem;
+}
+
+.code-container {
+ margin-top: -7px;
+ margin-bottom: -6px;
+ margin-left: -6px;
+ display: flex;
+}
+
+.line-numbers {
+ background: hsl(0deg 0% 100% / 3%);
+ color: var(--text-muted);
+ padding: 1em 0.5em;
+ text-align: right;
+ user-select: none;
+ min-width: 4rem;
+ border-right: 1px solid var(--text-muted);
+}
+
+.line-number {
+ padding: 0 0.5em;
+ min-height: 1.4em;
+}
+
+
+.code-content {
+ flex: 1;
+ padding: 15px;
+ overflow-x: auto;
+ tab-size: 4;
+ line-height: 1.4;
+}
+
+.code-line {
+ margin-left: -5px !important;
+ line-height: 1.4;
}
.nostyle {
@@ -1638,3 +1673,4 @@ ul#searchresults span.teaser em {
+
From bbc92ba626efbcb728fd4daade2839f6b3df6c00 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Tue, 27 Jan 2026 18:10:33 +0300
Subject: [PATCH 139/275] Update chrome.css
---
src/theme/css/chrome.css | 45 ++++++++++++++++++++--------------------
1 file changed, 23 insertions(+), 22 deletions(-)
diff --git a/src/theme/css/chrome.css b/src/theme/css/chrome.css
index 848fce4c2ad..d89569696e7 100644
--- a/src/theme/css/chrome.css
+++ b/src/theme/css/chrome.css
@@ -881,44 +881,44 @@ pre {
}
code.hljs:not(.discord-message code) {
- background: var(--card-bg);
- margin-bottom: -0.5rem;
+ background: var(--card-bg);
+ margin-bottom: -0.5rem;
}
.code-container {
- margin-top: -7px;
- margin-bottom: -6px;
- margin-left: -6px;
- display: flex;
+ margin-top: -12px;
+ margin-bottom: -6px;
+ margin-left: -6px;
+ display: flex;
}
.line-numbers {
- background: hsl(0deg 0% 100% / 3%);
- color: var(--text-muted);
- padding: 1em 0.5em;
- text-align: right;
- user-select: none;
- min-width: 4rem;
- border-right: 1px solid var(--text-muted);
+ background: hsl(0deg 0% 100% / 3%);
+ color: var(--text-muted);
+ padding: 1em 0.5em;
+ text-align: right;
+ user-select: none;
+ min-width: 4rem;
+ border-right: 1px solid var(--text-muted);
}
.line-number {
- padding: 0 0.5em;
- min-height: 1.4em;
+ padding: 0 0.5em;
+ min-height: 1.4em;
}
.code-content {
- flex: 1;
- padding: 15px;
- overflow-x: auto;
- tab-size: 4;
- line-height: 1.4;
+ flex: 1;
+ padding: 15px;
+ overflow-x: auto;
+ tab-size: 4;
+ line-height: 1.4;
}
.code-line {
- margin-left: -5px !important;
- line-height: 1.4;
+ margin-left: -5px !important;
+ line-height: 1.4;
}
.nostyle {
@@ -1674,3 +1674,4 @@ ul#searchresults span.teaser em {
+
From b678db40d5c4afafe23c0699b805deb5b79c4ba9 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Tue, 27 Jan 2026 18:20:16 +0300
Subject: [PATCH 140/275] Update book.js
---
src/theme/book.js | 51 +++++++++++++++++++++++++++++++++++++----------
1 file changed, 40 insertions(+), 11 deletions(-)
diff --git a/src/theme/book.js b/src/theme/book.js
index b75236bca88..55f1a0d7a8d 100644
--- a/src/theme/book.js
+++ b/src/theme/book.js
@@ -272,17 +272,45 @@ if (window.playground_copyable) {
})();
(function syntax() {
- const syntaxButtons = document.querySelectorAll(".syntax-button");
- syntaxButtons.forEach((hgButton) => {
- hgButton.addEventListener("click", (e) => {
- const playground = hgButton.closest("pre");
- const codeBlock = playground.querySelector("code");
- const spans = codeBlock.querySelectorAll("span");
- spans.forEach((span) => {
- span.classList.toggle("nostyle");
- });
- });
- });
+ const syntaxButtons = document.querySelectorAll(".syntax-button");
+ syntaxButtons.forEach((hgButton) => {
+ hgButton.addEventListener("click", (e) => {
+ const playground = hgButton.closest("pre");
+ const codeBlock = playground.querySelector("code");
+ const codeLines = codeBlock.querySelectorAll(".code-line");
+
+ codeLines.forEach((codeLine) => {
+ codeLine.classList.toggle("nostyle");
+
+ const walker = document.createTreeWalker(
+ codeLine,
+ NodeFilter.SHOW_TEXT,
+ null,
+ false
+ );
+
+ let node;
+ while (node = walker.nextNode()) {
+ if (node.textContent.trim() !== '' &&
+ node.parentNode.nodeType === Node.ELEMENT_NODE &&
+ node.parentNode.tagName !== 'SPAN') {
+
+ const span = document.createElement('span');
+ span.className = 'nostyle';
+ span.textContent = node.textContent;
+ node.parentNode.replaceChild(span, node);
+ }
+ }
+ });
+
+ const spans = codeBlock.querySelectorAll("span");
+ spans.forEach((span) => {
+ if (!span.closest('.code-line')) {
+ span.classList.toggle("nostyle");
+ }
+ });
+ });
+ });
})();
(function scrollToTop() {
@@ -379,3 +407,4 @@ if (window.playground_copyable) {
{ passive: true }
);
})();
+
From bbb409def04a5c53c482c324d828d867e8c2061c Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Tue, 27 Jan 2026 18:30:43 +0300
Subject: [PATCH 141/275] Update code-hg.js
---
src/theme/settings/code-hg.js | 266 ++++++++++------------------------
1 file changed, 77 insertions(+), 189 deletions(-)
diff --git a/src/theme/settings/code-hg.js b/src/theme/settings/code-hg.js
index 2c42d637a8f..3ff8fc10f70 100644
--- a/src/theme/settings/code-hg.js
+++ b/src/theme/settings/code-hg.js
@@ -55,6 +55,48 @@ const scheme = {
},
};
+function functionHighlight(func, scheme) {
+ let color = (scheme.functionsHighlights[func].color & 0xffffff)
+ .toString(16)
+ .padStart(6, "0")
+ .toUpperCase();
+ let style = fontStyle(scheme.functionsHighlights[func].style);
+ return `$& `;
+}
+
+function styling(type, scheme) {
+ if (scheme[type]) {
+ let color = (scheme[type].color & 0xffffff)
+ .toString(16)
+ .padStart(6, "0")
+ .toUpperCase();
+ let style = fontStyle(scheme[type].style);
+ return `$& `;
+ }
+ return `$& `;
+}
+
+function fontStyle(style) {
+ switch (style) {
+ case 0:
+ return "font-style: normal; font-weight: normal;";
+ case 1:
+ return "font-style: normal; font-weight: bold;";
+ case 2:
+ return "font-style: italic; font-weight: normal;";
+ case 3:
+ return "font-style: italic; font-weight: bold;";
+ }
+}
+
+function escapeHtml(unsafe) {
+ return unsafe
+ .replace(/&/g, "&")
+ .replace(//g, ">")
+ .replace(/"/g, """);
+}
+
function highlight(scheme) {
const codeBlocks = document.querySelectorAll("pre code");
@@ -68,201 +110,47 @@ function highlight(scheme) {
} catch {}
codeBlocks.forEach((codeBlock) => {
- const container = document.createElement('div');
- container.className = 'code-container';
-
- const lineNumbers = document.createElement('div');
- lineNumbers.className = 'line-numbers';
-
- const codeContent = document.createElement('div');
- codeContent.className = 'code-content';
-
- let originalCode = codeBlock.textContent;
- // Split by newline and remove empty lines at the end
- let lines = originalCode.split('\n');
-
- // Remove trailing empty lines
- while (lines.length > 0 && lines[lines.length - 1].trim() === '') {
- lines.pop();
- }
-
- // If no lines left after removing empty ones, add one empty line
- if (lines.length === 0) {
- lines = [''];
- }
-
- let lineNumbersHTML = '';
- let codeLinesHTML = '';
-
- // Prepare colors
- const defaultColor = (scheme.defaultTextHighlight.color & 0xffffff).toString(16).padStart(6, "0").toUpperCase();
- const bracketColor = (scheme.bracketHighlight.color & 0xffffff).toString(16).padStart(6, "0").toUpperCase();
- const semicolonColor = (scheme.semicolonHighlight.color & 0xffffff).toString(16).padStart(6, "0").toUpperCase();
- const fallbackColor = (scheme.fallbackHighlight.color & 0xffffff).toString(16).padStart(6, "0").toUpperCase();
-
- // Prepare styles
- const defaultStyle = scheme.defaultTextHighlight.style;
- const bracketStyle = scheme.bracketHighlight.style;
- const semicolonStyle = scheme.semicolonHighlight.style;
- const fallbackStyle = scheme.fallbackHighlight.style;
-
- // Prepare function styles
- const functionStyles = {};
- Object.keys(scheme.functionsHighlights).forEach(key => {
- functionStyles[key] = {
- color: (scheme.functionsHighlights[key].color & 0xffffff).toString(16).padStart(6, "0").toUpperCase(),
- style: scheme.functionsHighlights[key].style
- };
+ let code = escapeHtml(codeBlock.textContent);
+
+ code = code
+ .replace(/\;/g, styling("semicolonHighlight", scheme))
+ .replace(/\[/g, styling("bracketHighlight", scheme))
+ .replace(/\]/g, styling("bracketHighlight", scheme))
+ .replace(/\$[a-zA-Z]*/g, styling("fallbackHighlight", scheme))
+ .replace(/.*/g, styling("defaultTextHighlight", scheme));
+
+ let keys = Object.keys(scheme.functionsHighlights || {}).sort(
+ (a, b) => b.length - a.length
+ );
+ keys.forEach((key) => {
+ code = code.replace(
+ new RegExp(`\\${key}`, "g"),
+ functionHighlight(key, scheme)
+ );
});
+
+ const lines = code.split('\n');
+ const lineCount = lines.length;
- // Function to get style string
- function getStyleString(styleNum) {
- switch (styleNum) {
- case 0: return "font-style: normal; font-weight: normal;";
- case 1: return "font-style: normal; font-weight: bold;";
- case 2: return "font-style: italic; font-weight: normal;";
- case 3: return "font-style: italic; font-weight: bold;";
- default: return "font-style: normal; font-weight: normal;";
- }
+ let lineNumbersHtml = '';
+ for (let i = 1; i <= lineCount; i++) {
+ lineNumbersHtml += `${i}
`;
}
- for (let i = 0; i < lines.length; i++) {
- const lineNumber = i + 1;
- lineNumbersHTML += `${lineNumber}
`;
-
- let line = lines[i];
- let resultLine = '';
- let currentPos = 0;
-
- // Escape HTML in the line
- line = line.replace(/&/g, "&")
- .replace(//g, ">")
- .replace(/"/g, """);
-
- // Find all special tokens in the line
- const tokens = [];
-
- // Find functions from functionsHighlights
- Object.keys(functionStyles).forEach(func => {
- const regex = new RegExp(func.replace(/\$/g, '\\$'), 'g');
- let match;
- while ((match = regex.exec(line)) !== null) {
- tokens.push({
- start: match.index,
- end: match.index + func.length,
- type: 'function',
- value: func,
- content: match[0]
- });
- }
- });
-
- // Find brackets
- ['[', ']'].forEach(bracket => {
- let pos = -1;
- while ((pos = line.indexOf(bracket, pos + 1)) !== -1) {
- tokens.push({
- start: pos,
- end: pos + 1,
- type: 'bracket',
- value: bracket,
- content: bracket
- });
- }
- });
-
- // Find semicolons
- let semicolonPos = -1;
- while ((semicolonPos = line.indexOf(';', semicolonPos + 1)) !== -1) {
- tokens.push({
- start: semicolonPos,
- end: semicolonPos + 1,
- type: 'semicolon',
- value: ';',
- content: ';'
- });
- }
-
- // Find other $functions (fallback)
- const funcRegex = /\$[a-zA-Z]+\b/g;
- let funcMatch;
- while ((funcMatch = funcRegex.exec(line)) !== null) {
- // Check if this function is already in tokens
- const isAlreadyProcessed = tokens.some(token =>
- token.start === funcMatch.index && token.type === 'function'
- );
-
- if (!isAlreadyProcessed) {
- tokens.push({
- start: funcMatch.index,
- end: funcMatch.index + funcMatch[0].length,
- type: 'fallback',
- value: funcMatch[0],
- content: funcMatch[0]
- });
- }
- }
-
- // Sort tokens by position
- tokens.sort((a, b) => a.start - b.start);
-
- // Build the line with styled tokens
- let lastPos = 0;
-
- tokens.forEach(token => {
- // Add plain text before token
- if (token.start > lastPos) {
- resultLine += line.substring(lastPos, token.start);
- }
-
- // Add styled token
- let color, style;
- switch (token.type) {
- case 'function':
- color = functionStyles[token.value].color;
- style = getStyleString(functionStyles[token.value].style);
- break;
- case 'bracket':
- color = bracketColor;
- style = getStyleString(bracketStyle);
- break;
- case 'semicolon':
- color = semicolonColor;
- style = getStyleString(semicolonStyle);
- break;
- case 'fallback':
- color = fallbackColor;
- style = getStyleString(fallbackStyle);
- break;
- }
-
- resultLine += `${token.content} `;
- lastPos = token.end;
- });
-
- // Add remaining plain text
- if (lastPos < line.length) {
- resultLine += line.substring(lastPos);
- }
-
- // Add the line to output
- if (line.trim() === '' && line.length === 0) {
- codeLinesHTML += `
`;
- } else {
- codeLinesHTML += `${resultLine}
`;
+ const formattedCode = lines.map(line => {
+ if (line.trim() === '') {
+ return '
';
}
- }
-
- lineNumbers.innerHTML = lineNumbersHTML;
- codeContent.innerHTML = codeLinesHTML;
-
- container.appendChild(lineNumbers);
- container.appendChild(codeContent);
+ return `${line}
`;
+ }).join('');
- codeBlock.innerHTML = '';
- codeBlock.appendChild(container);
+ codeBlock.innerHTML = `
+
+
${lineNumbersHtml}
+
${formattedCode}
+
+ `;
});
}
-highlight(scheme);
\ No newline at end of file
+highlight(scheme);
From 3190918d62a3ce61f8bc3f2d1fc1fd37112e49ed Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Tue, 27 Jan 2026 18:32:03 +0300
Subject: [PATCH 142/275] Update book.js
---
src/theme/book.js | 51 +++++++++++------------------------------------
1 file changed, 12 insertions(+), 39 deletions(-)
diff --git a/src/theme/book.js b/src/theme/book.js
index 55f1a0d7a8d..a73e069412c 100644
--- a/src/theme/book.js
+++ b/src/theme/book.js
@@ -272,45 +272,17 @@ if (window.playground_copyable) {
})();
(function syntax() {
- const syntaxButtons = document.querySelectorAll(".syntax-button");
- syntaxButtons.forEach((hgButton) => {
- hgButton.addEventListener("click", (e) => {
- const playground = hgButton.closest("pre");
- const codeBlock = playground.querySelector("code");
- const codeLines = codeBlock.querySelectorAll(".code-line");
-
- codeLines.forEach((codeLine) => {
- codeLine.classList.toggle("nostyle");
-
- const walker = document.createTreeWalker(
- codeLine,
- NodeFilter.SHOW_TEXT,
- null,
- false
- );
-
- let node;
- while (node = walker.nextNode()) {
- if (node.textContent.trim() !== '' &&
- node.parentNode.nodeType === Node.ELEMENT_NODE &&
- node.parentNode.tagName !== 'SPAN') {
-
- const span = document.createElement('span');
- span.className = 'nostyle';
- span.textContent = node.textContent;
- node.parentNode.replaceChild(span, node);
- }
- }
- });
-
- const spans = codeBlock.querySelectorAll("span");
- spans.forEach((span) => {
- if (!span.closest('.code-line')) {
- span.classList.toggle("nostyle");
- }
- });
- });
- });
+ const syntaxButtons = document.querySelectorAll(".syntax-button");
+ syntaxButtons.forEach((hgButton) => {
+ hgButton.addEventListener("click", (e) => {
+ const playground = hgButton.closest("pre");
+ const codeBlock = playground.querySelector("code");
+ const spans = codeBlock.querySelectorAll("span");
+ spans.forEach((span) => {
+ span.classList.toggle("nostyle");
+ });
+ });
+ });
})();
(function scrollToTop() {
@@ -408,3 +380,4 @@ if (window.playground_copyable) {
);
})();
+
From c10f0c1b48917f93b10aabbb897b0c67c71e66e0 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Tue, 27 Jan 2026 18:36:27 +0300
Subject: [PATCH 143/275] Update chrome.css
---
src/theme/css/chrome.css | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/theme/css/chrome.css b/src/theme/css/chrome.css
index d89569696e7..b817cad956e 100644
--- a/src/theme/css/chrome.css
+++ b/src/theme/css/chrome.css
@@ -886,8 +886,8 @@ code.hljs:not(.discord-message code) {
}
.code-container {
- margin-top: -12px;
- margin-bottom: -6px;
+ margin-top: -47px;
+ margin-bottom: -40px;
margin-left: -6px;
display: flex;
}
@@ -1675,3 +1675,4 @@ ul#searchresults span.teaser em {
+
From ba0c199b22a8fe1e5e60385c409033e450b69b4c Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Tue, 27 Jan 2026 18:37:20 +0300
Subject: [PATCH 144/275] Update code-hg.js
---
src/theme/settings/code-hg.js | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/theme/settings/code-hg.js b/src/theme/settings/code-hg.js
index 3ff8fc10f70..00432f18212 100644
--- a/src/theme/settings/code-hg.js
+++ b/src/theme/settings/code-hg.js
@@ -130,17 +130,15 @@ function highlight(scheme) {
});
const lines = code.split('\n');
- const lineCount = lines.length;
+ const filteredLines = lines.filter(line => line.trim() !== '' || lines.length === 1);
+ const lineCount = filteredLines.length;
let lineNumbersHtml = '';
for (let i = 1; i <= lineCount; i++) {
lineNumbersHtml += `${i}
`;
}
- const formattedCode = lines.map(line => {
- if (line.trim() === '') {
- return '
';
- }
+ const formattedCode = filteredLines.map(line => {
return `${line}
`;
}).join('');
From 54a93219f21f0c8234614798cc3034e4de2dee71 Mon Sep 17 00:00:00 2001
From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com>
Date: Tue, 27 Jan 2026 18:42:34 +0300
Subject: [PATCH 145/275] Update settings.md
---
src/settings.md | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/src/settings.md b/src/settings.md
index 84f73461c17..3f0bd641e35 100644
--- a/src/settings.md
+++ b/src/settings.md
@@ -1,13 +1,4 @@
-
-
-
- Experimental Feature!
- If you encountered an error, please contact us on the official BDFD Support Server.
-
-
-
# Settings
-
Let's customize your experience in our Bot Designer For Discord wiki world!
@@ -43,15 +34,6 @@ Let's customize your experience in our Bot Designer For Discord wiki world!