Move extensions init to function

ff989b3352b085f04063ed8e5a267e3bc2599e0e

Wolfsblvt <wolfsblvt@gmail.com>

2 files changed, +4 -3Showing whitespace changes
public/script.js+2 -1
@@ -158,7 +158,7 @@ import {
158158} from './scripts/utils.js';
159159import { debounce_timeout } from './scripts/constants.js';
160160
161161import { ModuleWorkerWrapper, doDailyExtensionUpdatesCheck, extension_settings, getContext, initExtensions, loadExtensionSettings, renderExtensionTemplate, renderExtensionTemplateAsync, runGenerationInterceptors, saveMetadataDebounced, writeExtensionField } from './scripts/extensions.js';
162162import { COMMENT_NAME_DEFAULT, executeSlashCommands, executeSlashCommandsOnChatInput, executeSlashCommandsWithOptions, getSlashCommandsHelp, initDefaultSlashCommands, isExecutingCommandsFromChatInput, pauseScriptExecution, processChatSlashCommands, registerSlashCommand, stopScriptExecution } from './scripts/slash-commands.js';
163163import {
164164 tag_map,
@@ -956,6 +956,7 @@ async function firstLoadInit() {
956956 initCfg();
957957 initLogprobs();
958958 initInputMarkdown();
959+ initExtensions();
959960 doDailyExtensionUpdatesCheck();
960961 await hideLoader();
961962 await fixViewport();
public/scripts/extensions.js+2 -2
@@ -1041,7 +1041,7 @@ export async function openThirdPartyExtensionMenu(suggestUrl = '') {
10411041 await installExtension(url);
10421042}
10431043
10441044jQuery(export async function initExtensions() {
10451045 await addExtensionsButtonAndMenu();
10461046 $('#extensionsMenuButton').css('display', 'flex');
10471047
@@ -1060,4 +1060,4 @@ jQuery(async function () {
10601060 * @listens #third_party_extension_button#click - The click event of the '#third_party_extension_button' element.
10611061 */
10621062 $('#third_party_extension_button').on('click', () => openThirdPartyExtensionMenu());
10631063});