Added a significant overhaul to the server manager.

This commit is contained in:
2025-12-29 16:07:30 -05:00
parent 4f4e5276a6
commit 216e18a7b4
796 changed files with 528631 additions and 2671 deletions
@@ -0,0 +1,17 @@
const postfixRE = /[?#].*$/;
export function cleanUrl(url) {
return url.replace(postfixRE, '');
}
export function extractQueryWithoutFragment(url) {
const questionMarkIndex = url.indexOf('?');
if (questionMarkIndex === -1) {
return '';
}
const fragmentIndex = url.indexOf('#', questionMarkIndex); // Search for # after ?
if (fragmentIndex === -1) {
return url.substring(questionMarkIndex);
}
else {
return url.substring(questionMarkIndex, fragmentIndex);
}
}