Commit Graph

170 Commits

Author SHA1 Message Date
tophf
443e3a3c7c second lockPageUI runs after there's no codebox anymore 2017-12-09 19:05:00 +03:00
tophf
ab98d46baa show import errors in messageBox 2017-12-09 19:04:19 +03:00
tophf
5f1f9c4d86 unregister CM on closing showCodeMirrorPopup 2017-12-09 18:23:18 +03:00
tophf
1c68ac1a3a initialize editor page fully in First Meaningful Paint frame
* previously it wasn't the case when colorpicker option was enabled
* the cost of always loading colorview is ~1ms for >200ms here
2017-12-08 06:20:56 +03:00
tophf
99cce55a8e ensure long words break before breaking the layout
supersedes 40075a0d
2017-12-07 23:21:27 +03:00
tophf
6a838e9d5e make sure all pre-create hooks finished 2017-12-07 20:26:41 +03:00
tophf
cb7f1de348 use hyphens when breaking words (works only in FF though) 2017-12-05 05:02:28 +03:00
tophf
40075a0d39 forcefully break long labels in aligned options 2017-12-05 04:39:29 +03:00
tophf
1e1ff73612 simplify theme preloader 2017-12-05 04:39:29 +03:00
tophf
a6f63d096e extract checkboxes to global.css, fixes 2017-12-05 04:39:29 +03:00
tophf
c0c60fb7a2 add a terse invocation syntax for $element and rename it to $create 2017-12-04 08:57:12 +03:00
tophf
f4677a7b7b actually use the name when saving 2017-12-03 20:32:50 +03:00
tophf
904e6017f2 close showHelp() if input element has can-close-on-esc class 2017-12-03 00:22:03 +03:00
tophf
0e61de2920 edit.js: pull out hooks, sections, keymap help, beautify
just a simple preparation for a proper encapsulation in the future
2017-12-02 23:46:00 +03:00
tophf
0de69e306d code refactor: add $.remove() and $$.remove() 2017-12-02 19:54:54 +03:00
tophf
a6fbc9db11 render lint squigglies 4x faster
* turns out codemirror lint addon doesn't open an overall op,
  instead it creates an op for each marker.

* also, now there's no need to disable the lint option when initializing codemirror
2017-12-01 03:49:09 +03:00
tophf
a60d53de29 edit: workaround for <details> not showing the toggle 2017-11-29 19:27:31 +03:00
tophf
189342472e manage: collapsible #options block 2017-11-29 19:27:31 +03:00
tophf
bf13383c93 workaround for URLSearchParams not stripping "?" in chrome 49-51 2017-11-28 22:19:00 +03:00
tophf
39c6d897ed mozImport: show hotkey in button tooltip 2017-11-28 20:07:38 +03:00
tophf
493c1a65c0 worker for stylelint; hints in linter config popup 2017-11-28 20:07:37 +03:00
tophf
761f6a5085 fix an ancient bug with setting tabSize option to a string 2017-11-27 14:54:19 +03:00
tophf
05677d93b3 usercss: use cm.changeGeneration() to detect dirtiness 2017-11-27 00:57:25 +03:00
tophf
a58f42dee0 usercss editor: save as template when @name is empty
* reduced the flickering on page open
* show * in title for new styles
* align the values in the default template
* don't ask to save an untouched template
* don't spam the console with errors
* trivial code refactor and cosmetics
2017-11-26 18:43:40 +03:00
tophf
af64ec4ac0 show a real hotkey in Save button tooltip 2017-11-26 15:08:47 +03:00
tophf
8f04e17d27 fix #223 - Android compatibility 2017-11-25 16:25:20 +03:00
tophf
febaefd8dc don't show autocomplete on numbers 2017-11-25 04:30:19 +03:00
tophf
74701810b7 remove cruft; silence eslint 2017-11-24 13:19:15 +03:00
tophf
479d95711b linter report expands/collapses on click; the state is saved 2017-11-24 13:19:15 +03:00
tophf
a7b8286e4f remove textareas 2017-11-24 13:19:11 +03:00
tophf
64cb128b06 intercept the hotkey assigned to colorpicker via hotkeyRerouter 2017-11-24 13:19:09 +03:00
tophf
786cde781d pull out colorpicker-helper.js 2017-11-24 13:19:08 +03:00
tophf
6c858d6449 fix colorpicker hotkey config 2017-11-24 13:19:07 +03:00
tophf
b99391887d add colorpicker hotkey config icon [default: none]
* uses the last submitted color by default
* doesn't insert the default color until a change or the Enter key
* fix a few bugs in colorpicker introduced in the rewrite
2017-11-24 13:19:06 +03:00
tophf
37a62b0407 fix/rewrite/integrate colorpicker
* full rewrite of colorview.js to make it 10-100 times faster (render on demand via extendMode)
* full rewrite of colorpicker.js to simplify CSS
* automatic light/dark theme based on current color of the editor
* fixes, tweaks, speedups
* color spot will always be on the left of its text i.e. no line break on wrapping
* support #RRGGBBAA and #RGBA hex colors
* support "transparent" as rgba(0, 0, 0, 0)
* HEX/hex toggle
* fix HSLA regexp
* Esc/Enter key to close
* innerHTML -> textContent
* toggle the feature correctly
* fade out before autohiding
* always show alpha 1 like devtools does
* set cursor:pointer only on the clickable part of the sliders
* bigger color format switcher with a tooltip
* autofocus input on open, disable spellcheck
* try not to obscure the source color spot & text
* restore focus without scrolling
2017-11-20 15:19:58 +03:00
tophf
9689288bdc new editor option: autoclose brackets/quotes [default: off] 2017-11-17 02:36:05 +03:00
tophf
9868a1819c actually focus code after import 2017-11-15 08:15:06 +03:00
tophf
b9f6095db5 focus code on opening standard editor immediately 2017-11-15 04:53:37 +03:00
tophf
8517e392fe throttle mozImport after 100ms, display progress after 500ms
* Ctrl-Enter = append button
* Shift-Ctrl-Enter = replace button
* instantaneous readiness of import dialog on non-blank input
* code dedup: addSections()
* trimNewLines() -> trim()
2017-11-15 04:24:36 +03:00
tophf
95be66cb61 convert another tHTML in edit.js to $element 2017-11-14 09:36:43 +03:00
tophf
70a827b033 dd69e1e5 followup + handle empty at-values
see #235
2017-11-14 08:55:53 +03:00
eight
7543b8406f Fix: messageBox global 2017-11-09 15:56:29 +08:00
eight
4d8268bb27 Fix: use messageBox 2017-11-09 14:40:46 +08:00
eight
c2687573b3 Add setStyleDirty, refactor replaceStyle 2017-11-09 14:11:27 +08:00
eight
d93bf05f64 Fix: isWarm -> isTouched 2017-11-09 14:11:27 +08:00
eight
9a8c19b09b Fix: move isClean into unbeforeunload handler 2017-11-09 14:11:26 +08:00
eight
95e3ba13cd Fix: newStyleInUsercss -> newStyleAsUsercss 2017-11-09 09:12:14 +08:00
eight
eef17cc4f8 Fix: replaceMetas -> replaceMeta 2017-11-09 09:12:12 +08:00
eight
b4dfe5c836 Fix: use isArray 2017-11-09 09:12:12 +08:00
eight
c4c4b5638e Refactor: isUsercss 2017-11-09 09:12:12 +08:00