open editor a bit faster, fixup <select> bug and widget style
This commit is contained in:
parent
1b19cc0cf6
commit
3a82a66954
|
@ -130,7 +130,7 @@ function createAppliesToLineWidget(cm) {
|
|||
|
||||
chrome.runtime.onMessage.addListener(onRuntimeMessage);
|
||||
|
||||
updateWidgetStyle();
|
||||
requestAnimationFrame(updateWidgetStyle);
|
||||
update();
|
||||
}
|
||||
|
||||
|
|
|
@ -48,16 +48,22 @@ onDOMscriptReady('/codemirror.js').then(() => {
|
|||
// cm.state.search for last used 'find'
|
||||
let searchState;
|
||||
|
||||
onDOMready().then(() => {
|
||||
new MutationObserver((mutations, observer) => {
|
||||
if (!$('#sections')) {
|
||||
return;
|
||||
}
|
||||
observer.disconnect();
|
||||
|
||||
prefs.subscribe(['editor.keyMap'], showKeyInSaveButtonTooltip);
|
||||
showKeyInSaveButtonTooltip();
|
||||
|
||||
// N.B. the event listener should be registered before setupLivePrefs()
|
||||
$('#options').addEventListener('change', onOptionElementChanged);
|
||||
buildOptionsElements();
|
||||
setupLivePrefs();
|
||||
|
||||
rerouteHotkeys(true);
|
||||
});
|
||||
}).observe(document, {childList: true, subtree: true});
|
||||
|
||||
return;
|
||||
|
||||
|
|
|
@ -32,8 +32,6 @@ Promise.all([
|
|||
onDOMready(),
|
||||
])
|
||||
.then(([style]) => {
|
||||
setupLivePrefs();
|
||||
|
||||
const usercss = isUsercss(style);
|
||||
$('#heading').textContent = t(styleId ? 'editStyleHeading' : 'addStyleTitle');
|
||||
$('#name').placeholder = t(usercss ? 'usercssEditorNamePlaceholder' : 'styleMissingName');
|
||||
|
|
Loading…
Reference in New Issue
Block a user