From 1c6644548e8eaa487fe95849459cf2cecd457fc7 Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Sat, 29 Nov 2025 08:20:29 -0500 Subject: [PATCH] docs: Update JS for global context and sorting method Replaced 'window' with 'globalThis' in crowdin.js for broader compatibility. Updated projects.js to use 'toSorted' instead of 'sort' for array sorting, ensuring non-mutating behavior. --- docs/source/_static/js/crowdin.js | 2 +- docs/source/_static/js/projects.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/_static/js/crowdin.js b/docs/source/_static/js/crowdin.js index c801b663..ac845bd1 100644 --- a/docs/source/_static/js/crowdin.js +++ b/docs/source/_static/js/crowdin.js @@ -1 +1 @@ -window.initCrowdIn('LizardByte-docs', 'sphinx') +globalThis.initCrowdIn('LizardByte-docs', 'sphinx') diff --git a/docs/source/_static/js/projects.js b/docs/source/_static/js/projects.js index 1c29c0e1..0243deac 100644 --- a/docs/source/_static/js/projects.js +++ b/docs/source/_static/js/projects.js @@ -85,7 +85,7 @@ $(document).ready(function() { } // sort the projects by name - let sorted_projects = projects.sort(rankingSorter('name_lower', 'name')).reverse() + let sorted_projects = projects.toSorted(rankingSorter('name_lower', 'name')).reverse() for (let a of [false, true]) { for (let i in sorted_projects) {