Commit Graph

320 Commits

Author SHA1 Message Date
tophf
be633bf903 usercss: update URL and sessionStorage on replacing the style 2017-11-29 13:35:27 +03:00
tophf
260cbddae0 usercss: force-refresh codemirror on saving to repaint vars 2017-11-29 13:27:55 +03:00
tophf
b995a9d316 usercssData.vars may be absent (e.g. in unsaved style)
fixes #267
2017-11-29 13:24:13 +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
d39e9f6037 show most of the sidebar in big codemirror popups 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
99512da9da use CSSLint in a web werkker 2017-11-27 17:02:30 +03:00
tophf
761f6a5085 fix an ancient bug with setting tabSize option to a string 2017-11-27 14:54:19 +03:00
tophf
d660e6bd72 usercss validator: more precise error position report 2017-11-27 14:54:18 +03:00
tophf
a603cc081b use the same "configure" icon in editor an manager 2017-11-27 14:53:34 +03:00
tophf
13d7e30a75 usercss saving: display errors from mozparser in <pre> 2017-11-27 06:55:12 +03:00
tophf
8d3fd9cc3b fixups for a58f42de (backtick) and 05677d93 (copy changed meta) 2017-11-27 03:19:31 +03:00
tophf
841e556f42 calc an actual per-item height even though CM doesn't seem to care 2017-11-27 02:59:44 +03:00
tophf
170bd0ccb1 reuse line index cache for posFromIndex
100ms -> 50ms rendering time in updateInvisible() for "RU AdList CSS Fixes" style
300ms -> 50ms is the final speedup with the widget height cache in 3fd4343c
2017-11-27 02:43:10 +03:00
eight
5dbd2249dd Add: use cache template 2017-11-27 02:43:10 +03:00
tophf
3fd4343cfd usercss: don't recalc widget height => spend 0 time in CM
300ms -> 100ms rendering time in updateInvisible() for "RU AdList CSS Fixes" style
2017-11-27 01:33:16 +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
74e6ea5a56 fixup c8c02805: +1 only when no previous widget found 2017-11-26 05:10:31 +03:00
tophf
c8c02805f4 fixup 82651ed6: recreate widgets for active line if needed 2017-11-25 17:44:32 +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
3ed98cb506 fixup 80547aef: autocomplete should fallback to original helper 2017-11-25 04:29:56 +03:00
tophf
7c0d8f0841 prevent inline overlays from breaking color swatches 2017-11-24 13:19:19 +03:00
tophf
7e4683d417 USO-vars in CSSLint 2017-11-24 13:19:19 +03:00
tophf
80547aef70 recognize USO-variables /*[[foo]]*/ and provide autocomplete hints 2017-11-24 13:19:18 +03:00
tophf
3152a7ebfe simpler plain string method for same token check 2017-11-24 13:19:18 +03:00
tophf
8bff4a297e disallow Space as a colorpicker hotkey 2017-11-24 13:19:17 +03:00
tophf
d2826d92f6 CodeMirror css mode: recognize "isolation" 2017-11-24 13:19:17 +03:00
tophf
c1d1c26c23 CodeMirror css mode: recognize "mix-blend-mode" 2017-11-24 13:19:16 +03:00
tophf
4fc54450b7 de-marginalize usercss editor; fix narrow @media 2017-11-24 13:19:15 +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
06cda0b2c1 fix colorpicker swatch glitches by monkeypatching match-highlighter 2017-11-24 13:19:14 +03:00
tophf
a30ef3ed14 restore the original match-highlighter and monkeypatch it 2017-11-24 13:19:14 +03:00
tophf
a7b8286e4f remove textareas 2017-11-24 13:19:11 +03:00
tophf
e1fae23927 init CM to usercss @preprocessor before setting the code 2017-11-24 13:19:11 +03:00
tophf
78bf2c8d9b close colorpicker config on Enter 2017-11-24 13:19:10 +03:00
tophf
612b21c732 register colorpicker command on first use 2017-11-24 13:19:09 +03:00
tophf
64cb128b06 intercept the hotkey assigned to colorpicker via hotkeyRerouter 2017-11-24 13:19:09 +03:00
tophf
d767ad7a8c autoLoadMode -> loadScript; chain to avoid flicker on load 2017-11-24 13:19:08 +03:00
tophf
786cde781d pull out colorpicker-helper.js 2017-11-24 13:19:08 +03:00
tophf
7bae73bcb4 add onclick for colorpicker-settings icon in usercss mode 2017-11-24 13:19:07 +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
7f37b8d1dd unify markup and CSS for icons within options 2017-11-24 13:19:05 +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