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