tophf
e3d1c6588d
prefill new style name with the domain/hostname
...
implements #344
2018-02-14 05:53:35 +03:00
tophf
7a479edc56
more consistent focus/scroll behavior of global search
...
* keep page scroll position on Esc/close
* focus the match on Enter
2018-02-02 09:04:25 +03:00
tophf
32f0f4bd7a
preserve page scroll position after [de]beautification
2018-02-01 23:51:30 +03:00
tophf
02989edb05
eat unclosed comments
2018-01-30 18:59:28 +03:00
tophf
0f8bca03b8
fixup eaed0de4: don't enable livepreview for unsaved code
2018-01-15 19:16:48 +03:00
tophf
dc1cd890ee
notify event subscribers when toggling the style via Alt-Enter
2018-01-14 17:40:09 +03:00
tophf
3c15521fc2
tweak autocomplete helper
...
* use the faster getStyleAtPos
* autocomplete !important on typing !
* don't autocomplete hex colors
2018-01-14 17:10:54 +03:00
tophf
eaed0de486
init autocomplete/blur/focus for usercss in a common hook
2018-01-14 15:57:29 +03:00
tophf
fb1ef71f25
don't save the style in toggleStyle; use data-hotkey-tooltip
2018-01-12 14:32:15 +03:00
tophf
9affcd13bc
don't preview unsaved styles
2018-01-12 14:11:24 +03:00
tophf
989df35b05
live preview in editor
...
* refreshAllTabs was extracted
* ...and fixed to use each frame's url when getting the styles
2018-01-12 00:54:36 +03:00
tophf
022e588c97
allow errors in usercss when saving in editor and live-reloading
2018-01-07 16:36:30 +03:00
tophf
a6e2cf47ed
don't update the tally when the dialog isn't shown
2018-01-07 12:52:31 +03:00
tophf
d2cba96e10
refactor CSSLint
...
* reduce linting delay
* parse mozformat in worker
* allow empty functions in 'filter:' property
https://drafts.fxtf.org/filter-effects/#supported-filter-functions
* support comma-separated list in :lang()
* strip vendor prefix in isLiteral()
2018-01-07 12:31:23 +03:00
tophf
385dda9923
fixup 227dce01: new styles don't have usercssData
2018-01-06 09:50:48 +03:00
tophf
4a7c675d06
fix '.add-applies-to' click listener
2018-01-06 09:31:37 +03:00
tophf
227dce0177
don't disable Beautify (let the user decide); code cosmetics
2018-01-05 14:05:35 +03:00
tophf
bced23052c
remove some unnecessary deepCopy calls
2018-01-05 14:05:35 +03:00
tophf
bf17c7de94
preserve section indentation in usercss template
2018-01-04 16:45:41 +03:00
tophf
3418ac9cb9
FF: support private/container tabs
2018-01-03 10:43:56 +03:00
tophf
27fe9fa9db
search/replace in extra CodeMirror boxes e.g. lint config
2018-01-01 10:35:22 +03:00
tophf
b2100ea853
fixes for global search/replace
...
* Enter key in input fields:
* [Find mode] closes the dialog and focuses the matched text
* [Replace mode] performs a single replace action
* Undo button checks the new CM changeGeneration and disables itself
if the changes were already undone
* doUndo focuses the visible undo button
2018-01-01 09:56:41 +03:00
tophf
a66c377d8a
fix scrolling over linter issues in usercss mode
2017-12-28 07:01:43 +03:00
tophf
f2efff64fd
FF weird bug workaround: delay initLint() by 100ms
2017-12-25 09:28:26 +03:00
tophf
5df76b04e2
disable #save button right after opening a style
2017-12-25 02:26:01 +03:00
tophf
306b21b75e
show Ctrl-Pause hotkey in keymap info using a dummy command
2017-12-24 12:28:33 +03:00
tophf
57806bed45
don't set sessionStorage.justEditedStyleId to null
2017-12-24 02:37:26 +03:00
tophf
487bc77baa
actually replace 'usercssTemplate'
2017-12-24 01:50:53 +03:00
tophf
9279390e8c
handle double-click between number and %
2017-12-23 09:51:28 +03:00
tophf
8c96165fb4
refactor and improve selectTokenOnDoubleclick logic
2017-12-23 05:39:06 +03:00
tophf
a249167539
remove the no longer used defocusEditor command
2017-12-22 18:35:46 +03:00
tophf
d6c595d94e
detect double-clicked token boundaries better
2017-12-22 16:55:56 +03:00
tophf
068f23b029
fixup: include -+, exclude whitespace at line start
2017-12-22 16:29:52 +03:00
tophf
bf6b4eda83
select entire CSS token on double click
...
* .class-name
* property-name
* #some-id
* #123
* -webkit-any
* !important
* 12.5
2017-12-22 16:23:20 +03:00
tophf
d0380f76c3
rewrite colorview to use CodeMirror::TextMarker
...
* solves all problems with glitching on selection etc.
* perceived performance is same due to lazy-processing
* colors unsupported in current browser are displayed internally as RGB
* the color text is highlighted in the editor when popup is invoked
2017-12-22 11:22:35 +03:00
tophf
2dfaa22c35
Ctrl-Pause defocuses/focuses the editor
2017-12-22 11:22:02 +03:00
tophf
7d8507743d
add the missing CSS colors to codemirror parser
2017-12-20 00:42:51 +03:00
tophf
e50ff316ba
toggle narrow width mode tooltips via html+css; code cosmetics
2017-12-19 02:48:47 +03:00
tophf
1348eeb4e3
code cosmetics
2017-12-18 16:48:33 +03:00
tophf
4ecb6e7bc2
optimistically show 1 in tally only for a code match
2017-12-18 11:28:11 +03:00
tophf
31fd551264
trivial speed-ups for the single editor case
2017-12-18 10:27:50 +03:00
tophf
d10e83d15c
editor: rewrite global search/replace
2017-12-18 10:27:50 +03:00
tophf
fd047f8323
move getRealColors to colorpicker and reuse it
2017-12-18 10:27:50 +03:00
tophf
97e486e139
code cosmetics: silence a warning in edit.css
2017-12-18 10:27:50 +03:00
tophf
db2c4cd6fc
use standard font size in keymap info dialog
2017-12-18 10:27:50 +03:00
tophf
1f45618954
group similar items in keymap option selector
2017-12-18 10:27:50 +03:00
tophf
70d935d1a0
Ctrl-R to invoke replace in pcDefault/sublime keymaps
2017-12-18 10:27:50 +03:00
tophf
b78110aa1c
.CodeMirror-dialog: shorten yellow highlight bright phase
2017-12-18 10:27:50 +03:00
tophf
be20b5a8b4
match-highlighter: always use originalToken
2017-12-18 10:27:50 +03:00
tophf
8119dd4f62
match-highlighter: skip exact tokens highlighted by search
2017-12-18 10:27:50 +03:00
tophf
001db9a19f
make editor fully clean on saving
2017-12-18 10:27:50 +03:00
tophf
9e11435923
make editor permanently dirty when a section is deleted
2017-12-18 10:27:50 +03:00
tophf
748b9afdb4
remember last used search text in editor
2017-12-14 11:35:32 +03:00
tophf
cc5a254e01
make multi-section search instantaneous
2017-12-14 11:20:22 +03:00
tophf
49a995afae
fixup 1c68ac1a: init the find hook after the original one
2017-12-14 09:27:46 +03:00
tophf
6ee952f3d3
more things made focusable
...
* mozilla-format (i) icon
* showHelp() restores original focus
* showHelp's nested confirmation is debounced to enable focusing Yes/No
* RegExp tester tab URLs are focusable now
2017-12-13 07:38:36 +03:00
narcolepticinsomniac
a6c10fe49d
Adjust margins
...
Removed some redundant fixes. Remaining tweaks were mostly info icons. I also applied a hacky margin for checkbox/label options and `.aligned` select options on edit page. They were too close IMO.
2017-12-12 22:09:51 -05:00
tophf
fefe82fd54
remove what-input, use own implementation, rebase on master
2017-12-13 03:27:10 +03:00
Rob Garrison
2cdd264780
fixups
...
Manage: Disable tabindex in nested buttons
Manage: Fix homepage link alignment
Manage: Make entry actions keyboard navigatable
Manage: Add search help accessibility
Msgbox: Save and restore focus
Manage: Fix delete confirmation cancel
Manage: Make history button accessible
Manage: Make favicons dropdown accessible
Manage: Prevent focus on hidden textarea
Msgbox: Stop tabbing outside of msgbox
Usercss: Make nondefault reset accessible
Usercss: Make colorpicker accessible
Edit: Disable tabindex in nested buttons
Edit: Make info and config icons accessible
Options: Cleanup HTML
Options: Make advanced toggle accessible
Edit: Fix issues popup
Edit: Remove link underlines from icons
2017-12-12 21:40:31 +03:00
narcolepticinsomniac
e2842f69c3
Hide focus outlines without crippling a11y, plus active state change for buttons
2017-12-12 21:39:55 +03:00
tophf
3a82a66954
open editor a bit faster, fixup <select> bug and widget style
2017-12-11 09:12:56 +03:00
tophf
fb29638d00
defocus codemirror on Esc
2017-12-11 08:32:27 +03:00
tophf
60a5fb96be
don't steal focus from the find input on page open
2017-12-11 08:32:11 +03:00
tophf
8679e55206
unregister listeners on closing showCodeMirrorPopup
2017-12-10 11:24:52 +03:00
tophf
db8c3585dd
off-by-one in showKeyMapHelp: text after <mark> was lost
2017-12-09 20:43:47 +03:00
tophf
f11235aaf9
Revert 1e1ff736
"simplify theme preloader"
2017-12-09 19:05:44 +03:00
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
5faff66fab
fix cross-section cursor navigation via keyboard
2017-12-08 11:42:33 +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
narcolepticinsomniac
ce47e69b8a
Custom UI elements ( #291 )
2017-12-08 06:18:47 +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
7a07ee9fd9
unbreak narrow editor layout
2017-12-07 05:31:42 +03:00
tophf
9c8e835a80
relay scrolling over #header to usercss code section
2017-12-07 04:36:46 +03:00
tophf
d4ffa04bb6
raise applies-to widget above .CodeMirror-activeline
2017-12-07 04:00:26 +03:00
tophf
ebef35c28c
drop linter name from "see all rules" and make it a link
2017-12-07 01:21:05 +03:00
tophf
d998fb235a
center editor config icons
2017-12-07 01:20:04 +03:00
tophf
8f9705c165
recognize USO vars ending with -rgb
2017-12-06 06:34:02 +03:00
tophf
44ce51e54f
dim regexp-tester note and avoid extending the report width
2017-12-05 22:12:04 +03:00
tophf
61003b378c
usercss editor: show all section regexps in tester
2017-12-05 21:52:24 +03:00
tophf
963930ea1d
usercss editor: restore "Add" and "Regexp test", convert \ in regexps
2017-12-05 21:32:28 +03:00
tophf
bd0f460c56
usercss editor: use real theme color for inputs in widgets
2017-12-05 21:01:32 +03:00
tophf
edfca7bfed
match-highlighter-helper: do nothing when disabled
2017-12-05 07:40:28 +03:00
tophf
3e34c77625
clear previous token/selection highlight from scrollbar
2017-12-05 05:40:33 +03:00
tophf
8e992299c6
clear previous search highlight from scrollbar in all sections
2017-12-05 05:40:27 +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
narcolepticinsomniac
7339643ec3
Custom checkbox and select elements
2017-12-05 04:39:29 +03:00
tophf
3e9810678a
fixup 0e61de29: use break/continue instead of return
...
fixes #282
2017-12-04 20:13:56 +03:00
tophf
01e8c3b080
disable spellchecking in input fields
2017-12-04 09:00:14 +03:00
tophf
48dda41e2e
fixup 99512da9
and 493c1a65: show csslint rule info in issues info box
2017-12-04 08:57:12 +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
e905e4e079
properly escape/unescape regexp in applies-to widgets
2017-12-03 22:51:03 +03:00
tophf
489546e35c
use just one event listener per applies-to widget in usercss editor
2017-12-03 21:21:51 +03:00
tophf
f4677a7b7b
actually use the name when saving
2017-12-03 20:32:50 +03:00
tophf
9314fa0e8a
fixup 0e61de29: register the listener before setupLivePrefs()
2017-12-03 04:18:58 +03:00
tophf
8622dffe1e
usercss: make nextPrevMozDocument work with minified CSS
2017-12-03 04:05:35 +03:00
tophf
43fc26619d
editor: raise highlight limit from 10k to 100k chars in one line
2017-12-03 02:02:22 +03:00
tophf
a5c3c2e895
editor: use 'editor.lineWrapping' option on opening
2017-12-03 01:52:46 +03:00
tophf
904e6017f2
close showHelp() if input element has can-close-on-esc class
2017-12-03 00:22:03 +03:00
tophf
a5f31162f6
de-htmlize showKeymapHelp
2017-12-03 00:20:42 +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
0ba3cfb725
FF: fix transition-bug-suppressor condition
2017-12-02 19:38:03 +03:00
tophf
e32fecd1e3
usercss: tint the active line's @mozdoc widget
2017-12-02 18:53:37 +03:00
tophf
fbd7526092
usercss: Alt-PgUp/PgDn go to prev/next @-moz-document
2017-12-02 18:29:12 +03:00
tophf
d263bc8e55
disallow more nav keys in colorpicker hotkey config dialog
2017-12-02 17:15:55 +03:00
tophf
5bdaacc049
stabilize token highlighting for the match/search mode
2017-12-01 21:16:19 +03:00
tophf
2760b0764b
fixup b41cc8bc: only rewrite query if regexp
2017-12-01 16:22:43 +03:00
tophf
bf8d33a3f4
followup for a60d53de: move #footer down when #lint is collapsed
2017-12-01 06:17:24 +03:00
tophf
b41cc8bca3
4x speed-up of showMatchesOnScrollbar
...
at the cost of a marginally reduced accuracy when line wrapping is enabled, but the difference shouldn't be more than a few pixels, presumably
2017-12-01 05:14:52 +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
71f3dfbffd
usercss: don't relint on save; mode is an object once initialized
2017-11-30 20:42:52 +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
fc0b1dc739
fixup 493c1a65: missed some null checks and a return
2017-11-29 17:59:00 +03:00
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
tophf
09c16ac541
force break-wrapping in regexp-tester's details
2017-11-17 02:17:21 +03:00
tophf
559420a461
FF: outline the active code box
...
-webkit-focus-ring-color rgb value is used, but not the blurred effect (TODO)
2017-11-15 11:49:02 +03:00
tophf
9f4066faa1
code cosmetics: remove redundant comments
2017-11-15 11:36:24 +03:00
tophf
5a9227ce8c
speedup usercss opening: combine a few ops
2017-11-15 11:35:54 +03:00
tophf
15c98bac9e
fixup 8ca7c363: focus() must be the last action
2017-11-15 11:33:37 +03:00
tophf
82651ed6cd
usercss: create applies-to widgets faster on load
...
only the visible portion is built immediately, the rest is throttled
2017-11-15 10:54:19 +03:00
tophf
06cc703887
use CSS variables for applies-to line widgets
2017-11-15 09:04:09 +03:00
tophf
14dbfdd915
update applies-to widget on any style changes
2017-11-15 08:32:22 +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
8ca7c36380
focus code on opening usercss editor
2017-11-15 04:27:33 +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
102b5e03d4
superfast cm.isBlank() instead of !cm.getValue().trim()
2017-11-15 02:50:53 +03:00
tophf
e4cd984061
regexp tester: switch to existing tabs also in other windows
2017-11-14 09:49:07 +03:00
tophf
135d8d9c54
force wrapping in regexp-report summary
2017-11-14 09:38:09 +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
tophf
1d463d7820
Merge pull request #134 from eight04/dev-user-css
...
Install styles from *.user.css file
2017-11-14 08:22:56 +03:00
eight
7543b8406f
Fix: messageBox global
2017-11-09 15:56:29 +08:00
eight
a1c1eb328b
Add: draw line pointer for parsing error
2017-11-09 15:55:06 +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
6d411c01fc
Fix: use sticky flag to avoid text slicing
2017-11-09 14:11:27 +08:00
eight
53770c0db6
i18n: appliesRemoveError
2017-11-09 14:11:26 +08:00
eight
9a8c19b09b
Fix: move isClean into unbeforeunload handler
2017-11-09 14:11:26 +08:00
eight
3011ba836d
Fix: isInit -> initialized
2017-11-09 14:11:26 +08:00
eight
95e3ba13cd
Fix: newStyleInUsercss -> newStyleAsUsercss
2017-11-09 09:12:14 +08:00
eight
0d06f32735
Fix: updateMetas -> updateMeta
2017-11-09 09:12:13 +08:00
eight
48e565079c
Fix: reindent promise
2017-11-09 09:12:12 +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
eight
92cadc03fa
Fix: avoid return short circuit for editor selection
2017-11-09 09:12:11 +08:00
eight
2edd22e37c
Fix: normalizeString -> unquote
2017-11-09 09:12:10 +08:00
eight
3844b3db73
Fix: cm.findPosH in one line
2017-11-09 09:12:10 +08:00
eight
0c64e6013b
Fix: insertBefore -> insertAdjancentElement
2017-11-09 09:12:09 +08:00
eight
3d57fd4158
Fix: e.target -> this
2017-11-09 09:12:09 +08:00
eight
809414941e
Refactor: add createApply
2017-11-09 09:12:08 +08:00
eight
3c5136171e
Fix: use messageBox
2017-11-09 09:12:08 +08:00
eight
9d1b0884e5
Fix: use this.value
2017-11-09 09:12:08 +08:00
eight
191603ae01
Fix: makeInputEl -> makeLi
2017-11-09 09:12:07 +08:00
eight
caaeec08e4
Fix: use Math.max
2017-11-09 09:12:06 +08:00
eight
a7b73e859f
Fix: use debounce
2017-11-09 09:12:06 +08:00
eight
285f3144ca
Fix: style -> gutterStyle
2017-11-09 09:12:04 +08:00
eight
f70cf01155
Fix: move let definition into one line
2017-11-09 09:12:04 +08:00
eight
2b17c07cd6
Fix: use CodeMirror.defineExtension
2017-11-01 11:18:42 +08:00
eight
d981660983
Fix: drop getParams
2017-11-01 11:17:00 +08:00
eight
6a53ea423c
Refactor: pull out createAppliesToLineWidget
2017-11-01 11:17:00 +08:00
eight
8f642dc05c
Fix: drop innerHTML
2017-11-01 11:17:00 +08:00
eight
534803ccfd
Fix: isWarm
2017-11-01 11:17:00 +08:00
eight
9dddbbba9f
Fix: unused getName
2017-11-01 11:16:59 +08:00
eight
45da3ff50e
Fix: style.id consistency
2017-11-01 11:16:59 +08:00
eight
13ca45a104
Fix: reorder global comment
2017-11-01 11:16:46 +08:00
eight
79b6266cf9
Fix: no new line before use strict
2017-11-01 11:13:57 +08:00
tophf
3c665aea08
widen editor input[type="number"], align to match siblings
...
fixes #221
2017-10-31 12:52:11 +03:00
eight
62748b3b79
Fix: use arrow function for IIFE
2017-10-30 01:22:10 +08:00
eight
adc0c8025a
Fix: lazy load regexp tester
2017-10-30 01:07:08 +08:00
eight
ce348d4f86
Fix: add isWarm flag to decide if the editor can be reloaded
2017-10-16 16:08:13 +08:00
eight
0a6de8edb8
Add: make dirtyReporter.clear accept a key
2017-10-16 16:05:48 +08:00
eight
be4a896bc9
Fix: disable CSSLint option in stylus mode
2017-10-16 14:54:47 +08:00
eight
95902388a3
Fix: default linter hacks
2017-10-16 03:58:02 +08:00
eight
368bb34811
Fix: make updateLinter wait linterConfig to load
2017-10-15 05:19:22 +08:00
eight
96a046f774
Fix: toggle style outside of the editor
2017-10-15 04:18:23 +08:00
eight
a1ca416ef2
Fix: miss makeLink global
2017-10-15 02:59:28 +08:00
narcolepticinsomniac
e612a305cc
Moz-import background
...
Fixes #209
I used `!important` because I think it might be necessary to override themes.
2017-10-12 19:50:41 -04:00
eight
54076d9f17
Merge branch 'master' of https://github.com/openstyles/stylus into dev-user-css
2017-10-12 16:28:18 +08:00
eight
ce2a21451a
Add: usercss documentation link in the editor
2017-10-11 22:23:39 +08:00
eight
cd00c20fa4
Fix: newStyleFormat -> newStyleInUsercss
2017-10-09 00:52:05 +08:00
eight
1a6f9dfcaa
Add: confirmation to replace dirty style
2017-10-09 00:43:00 +08:00
eight
228057d231
Add: make source editor work with newly created style
2017-10-08 23:26:55 +08:00
eight
8007f47c09
Revert "Add: save usercss from multi-section editor"
...
This reverts commit da5626a6d7
.
2017-10-08 22:08:47 +08:00
eight
50a5bbecfa
Add: regexp tester in applies-to line widget
2017-10-08 22:03:27 +08:00
eight
9ee7e2046c
Refactor: split out regexp tester
2017-10-07 23:41:37 +08:00
eight
765231581c
Fix: onbeforeunload handler would disable the save button
2017-10-07 18:10:00 +08:00
eight
fc51d806da
Fix: force using stylelint when editor mode is not css
2017-10-07 18:00:25 +08:00
eight
da5626a6d7
Add: save usercss from multi-section editor
2017-10-06 17:05:51 +08:00
eight
c0514a6699
Change: default linter
2017-10-06 16:33:49 +08:00
eight
0f6de587ec
Add: remove/add button in applies-to widget
2017-10-06 01:10:45 +08:00
eight
b69b834949
Fix: handle editor.options.expanded
2017-10-04 16:47:56 +08:00
eight
bb508b6933
Fix: import error is not displayed correctly
2017-10-04 16:39:02 +08:00
eight
04ebc837e2
Fix: use closeCurrentTab
2017-09-25 18:45:44 +08:00
eight
7365a8bada
Fix: various fixes
2017-09-25 18:43:55 +08:00
eight
24cd85688f
WIP: install page + editor
2017-09-24 16:54:21 +08:00
tophf
2d8adf1173
restore size on reopening a closed editor tab
2017-09-23 21:33:57 +03:00
eight
a4e3fba968
Fix: source editor is not closed when style is removed
2017-09-19 08:51:57 +08:00
eight
ba4c06ae82
Fix: lint initialize issue
2017-09-19 08:51:56 +08:00
eight
1d829fe8f5
Fix: split up usercss logic from saveStyle
2017-09-18 11:34:12 +08:00
eight
90ca2f2d23
Fix: autocomplete should use changes event
2017-09-18 07:33:07 +08:00
eight
a0495f466f
Change style structure
2017-09-16 10:14:23 +08:00
eight
dc988a413e
Revert: editors
2017-09-16 08:44:56 +08:00
eight
4d6f856473
Revert "Add: scroll the editor when cursor is outside of the editor"
...
This reverts commit 5a9ac5ce7d
.
2017-09-16 07:33:12 +08:00
eight
a73493d5d2
Add: make applies-to line widget editable
2017-09-15 17:13:58 +08:00
eight
693a0483e3
Add: offset info
2017-09-15 15:36:44 +08:00
eight
ccb5f488e5
Fix: move to new format
2017-09-15 14:11:58 +08:00
eight
5a9ac5ce7d
Add: scroll the editor when cursor is outside of the editor
2017-09-15 07:47:44 +08:00
eight
70bbc08ee0
Add editor.appliesToLineWidget option
2017-09-14 09:58:22 +08:00
eight
37c83ce187
Fix: shouldn't contain new line
2017-09-14 09:10:11 +08:00
eight
b7b5888431
Fix: should't edit the style object directly returned from getStyles cache
2017-09-14 09:09:40 +08:00
eight
97fd2aa083
Compat: firefox
2017-09-13 23:35:34 +08:00
eight
40a5dab311
Fix: script order of loadLinterAssets
2017-09-13 21:26:22 +08:00
eight
411df8b051
Fix: no need to use $$ for element existence check
2017-09-13 20:39:42 +08:00
eight
3c450e7d9d
Fix: resize grip style
2017-09-13 20:28:19 +08:00
eight
b61b058824
Fix: pull out makeLink
2017-09-13 17:34:27 +08:00
eight
d7f0e3c176
fixup! Fix: draw title
2017-09-13 17:33:32 +08:00
eight
0e92e6d0c7
Add applies-to line widget
2017-09-13 16:58:03 +08:00
eight
6195e558e4
Fix: draw title
2017-09-13 16:57:01 +08:00
eight
b102aa0704
Fix: beforeunload warning
2017-09-13 16:56:16 +08:00
eight
31464bb499
Fix: reference error
2017-09-13 16:53:21 +08:00
tophf
3d0b811b27
edit: throttle setOption for 'theme' and 'lineWrapping'
...
when the style has more than 4 sections, these options are propagated to CM instances in 100 ms chunks, and a progress overlay is shown over the corresponding option element after 100 ms
2017-09-12 23:19:10 +03:00
eight
279c7d05a7
Fix: _style -> newStyle
2017-09-13 01:39:45 +08:00
eight
2506b957f8
Fix: rewrite loadScript, merge onDOMscripted, injectCSS, injectScript
2017-09-12 23:19:16 +08:00
eight
dc37588cd1
Fix: drop windowLoaded
2017-09-12 21:34:12 +08:00
eight
a1b8945996
Fix: remove try-catch in util.js
2017-09-12 21:28:26 +08:00
eight
23bd3e2cc7
fixup! Fix: err -> e
2017-09-12 20:48:03 +08:00
eight
9069562587
Fix: err -> e
2017-09-12 20:20:58 +08:00
eight
7c1b140de9
Fix: drop tHTML
2017-09-12 20:06:00 +08:00
eight
431dbdc81c
Fix: remove escapeHtml completely
2017-09-12 20:03:24 +08:00
eight
39df704591
Fix: move editor creation to one structure
2017-09-12 20:01:27 +08:00
eight
4b2f7a1a46
Fix: make codeIsUpdated flag work properly
2017-09-12 19:57:43 +08:00
eight
e7eb38bba9
Fix: drop dummy Promise.resolve
2017-09-12 19:47:32 +08:00
eight
02c61b9276
Fix: self -> _
2017-09-12 19:45:08 +08:00
eight
7612cd3614
Fix: move createEmptyStyle, windowLoaded into init
2017-09-12 19:39:01 +08:00
eight
27f8bc2f85
Fix: don't use leading underscore for function name
2017-09-12 19:37:06 +08:00
eight
e4d3025fca
Revert changes to editors global
2017-09-12 19:34:04 +08:00
eight
de84248e05
Fix: add editors hack
2017-09-12 03:44:19 +08:00
eight
d4ddefe8a0
Merge branch 'master' of https://github.com/openstyles/stylus into dev-user-css
2017-09-12 03:40:56 +08:00
eight
3730a4e483
Fix: i18n and escapeHtml, url
2017-09-12 02:32:27 +08:00
eight
f305719db3
Fix: update progress
2017-09-12 01:23:32 +08:00
eight
a15493bfb9
Add: source editor
2017-09-12 00:10:27 +08:00