this.languageInput.value = language;
this.callback = callback;
- this.show();
- this.updateEditorMode(language);
-
- window.importVersioned('code').then(Code => {
- Code.setContent(this.editor, code);
- });
+ this.show()
+ .then(() => this.updateEditorMode(language))
+ .then(() => window.importVersioned('code'))
+ .then(Code => Code.setContent(this.editor, code));
}
async show() {
this.historyDropDown.classList.toggle('hidden', historyKeys.length === 0);
this.historyList.innerHTML = historyKeys.map(key => {
const localTime = (new Date(parseInt(key))).toLocaleTimeString();
- return `<li><button type="button" data-time="${key}">${localTime}</button></li>`;
+ return `<li><button type="button" data-time="${key}" class="text-item">${localTime}</button></li>`;
}).join('');
}