diff --git a/public/scripts/extensions/token-counter/index.js b/public/scripts/extensions/token-counter/index.js index 7b2bd36a8..54df1bb66 100644 --- a/public/scripts/extensions/token-counter/index.js +++ b/public/scripts/extensions/token-counter/index.js @@ -1,10 +1,11 @@ -import { callPopup, main_api } from '../../../script.js'; +import { main_api } from '../../../script.js'; import { getContext } from '../../extensions.js'; import { SlashCommand } from '../../slash-commands/SlashCommand.js'; import { SlashCommandParser } from '../../slash-commands/SlashCommandParser.js'; import { getFriendlyTokenizerName, getTextTokens, getTokenCountAsync, tokenizers } from '../../tokenizers.js'; import { resetScrollHeight, debounce } from '../../utils.js'; import { debounce_timeout } from '../../constants.js'; +import { POPUP_TYPE, callGenericPopup } from '../../popup.js'; function rgb2hex(rgb) { rgb = rgb.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i); @@ -63,8 +64,7 @@ async function doTokenCounter() { }, debounce_timeout.relaxed); dialog.find('#token_counter_textarea').on('input', () => countDebounced()); - $('#dialogue_popup').addClass('wide_dialogue_popup'); - callPopup(dialog, 'text', '', { wide: true, large: true }); + callGenericPopup(dialog, POPUP_TYPE.TEXT, '', { wide: true, large: true }); } /**