Commit Graph

123 Commits

Author SHA1 Message Date
eight
8016346035 Fix: replaceStyle make style name undefined 2018-10-12 15:30:35 +08:00
eight
bd4a453f45 Merge branch 'dev-usercss-meta' into dev-exclusions 2018-10-11 19:49:37 +08:00
eight
ba64b95575 WIP: kill cachedStyles 2018-10-11 00:54:38 +08:00
eight
d2b36a168e Kill hidden globals 2018-10-10 23:05:20 +08:00
eight
c23f315c52 Refactor: use CodeMirror.defineOption 2018-10-10 17:40:07 +08:00
eight
4419c5dc1e Change: kill editors, styleId 2018-10-10 16:32:39 +08:00
eight
6494985b50 Fix: various 2018-10-10 16:14:51 +08:00
eight
37e1f43f75 Fix: minor 2018-10-10 15:04:03 +08:00
eight
d26ce3238e Add: codemirror-factory 2018-10-10 14:49:37 +08:00
eight
15a1f552f6 WIP: kill getSection 2018-10-10 12:08:35 +08:00
eight
ba6159e067 WIP: edit page 2018-10-10 02:43:09 +08:00
eight
fd9ab5d6e5 Fix: switch to editor 2018-10-10 00:41:07 +08:00
eight
06e22d0d18 Change: add sections-editor 2018-10-09 23:38:29 +08:00
eight
30e8662946 Add: preview error 2018-10-08 20:12:39 +08:00
eight
47b2b4fc49 Add: livePreview.show 2018-10-08 18:38:01 +08:00
eight
7b5e7c96d5 Hook up live preview 2018-10-08 18:16:45 +08:00
eight
057111b171 Update usercss API 2018-10-07 22:59:31 +08:00
eight
24b1eea8a4 Merge branch 'master' of https://github.com/openstyles/stylus into dev-exclusions 2018-10-03 15:00:07 +08:00
eight
08adcb60f2 Merge branch 'master' into dev-usercss-meta 2018-10-01 22:29:39 +08:00
eight
2fd531e253 Rewrite linter system (#487)
* Add: implement new linter system

* Refactor: pull out editor worker

* Switch to new linter and worker

* Enable eslint cache

* Fix: undefined error

* Windows compatibility

* Fix: refresh linter if the editor.linter changes

* Add: stylelint

* Add: getStylelintRules, getCsslintRules

* Fix: logic to get correct linter

* WIP: linter-report

* Fix: toggle hidden state

* Add: matain the order of lint report for section editor

* Add: unhook event

* Add: gotoLintIssue

* Fix: shouldn't delete rule.init

* Add: linter-help-dialog

* Drop linterConfig

* Add: linter-config-dialog, cacheFn

* Add: use cacheFn

* Drop lint.js

* Add: refresh. Fix report order

* Fix: hide empty table

* Add: updateCount. Fix table caption

* Switch to new linter/worker

* Fix: remove unneeded comment

* Fix: cacheFn -> cacheFirstCall

* Fix: use cacheFirstCall

* Fix: cache metaIndex

* Fix: i < trs.length

* Fix: drop isEmpty

* Fix: expose some simple states to global

* Fix: return object code style

* Fix: use proxy to reflect API

* Fix: eslint-disable-line -> eslint-disable-next-line

* Fix: requestId -> id

* Fix: one-liner

* Fix: one-liner

* Fix: move dom event block to top

* Fix: pending -> pendingResponse

* Fix: onSuccess -> onUpdated

* Fix: optimize row removing when i === 0

* Fix: hook/unhook -> enableForEditor/disableForEditor

* Fix: linter.refresh -> linter.run

* Fix: some shadowing

* Fix: simplify getAnnotations

* Fix: cacheFirstCall -> memoize

* Fix: table.update -> table.updateCaption

* Fix: unneeded reassign

* Fix: callbacks -> listeners

* Fix: don't compose but extend

* Refactor: replace linter modules with linter-defaults and linter-engines

* Fix: implement linter fallbacks

* Fix: linter.onChange -> linter.onLintingUpdated

* Fix: cms -> tables

* Fix: parseMozFormat is not called correctly

* Move csslint-loader to background

* Fix: watch config changes

* Fix: switch to LINTER_DEFAULTS

* Fix: csslint-loader -> parserlib-loader
2018-10-01 09:03:17 -05:00
eight
2abbf670d8 Fix: check err.code 2018-09-26 10:37:14 +08:00
eight
3c30bc3eb0 Fix: try to get error message 2018-09-25 21:55:55 +08:00
tophf
2ac9a9db29 fix headerOnScroll 2018-08-24 14:31:29 +03:00
tophf
c0c5f1dbcc avoid overwriting existing usercss on saving a new one 2018-08-18 23:17:20 +03:00
tophf
eff0a7030c display only style name in the editor tab title
"Edit Style" was redundant and made the title unreadable when many tabs were opened.
"Add Style" is still displayed for the new styles.
2018-08-07 19:59:16 +03:00
tophf
bfb35e77b8 strip more trailing spaces in a custom usercss template 2018-08-06 20:56:33 +03:00
tophf
5f623f2f0e fill an empty @name with the default placeholder
fixes #462
2018-08-06 13:35:33 +03:00
tophf
5da1e0fb9b set onbeforeunload only when dirty
https://developers.google.com/web/updates/2018/07/page-lifecycle-api#legacy-lifecycle-apis-to-avoid
2018-08-02 20:54:40 +03:00
Rob Garrison
2b4a1a5635 Modify input method 2018-07-22 11:21:44 -05:00
Rob Garrison
68dfa0153c Add style exclusions. Closes #113 2018-07-22 11:21:43 -05:00
tophf
5ef347a4d9 LESS preprocessor
closes #373
2018-04-19 20:02:23 +03:00
tophf
66704a78b3 actually use 'pre' font for code errors in messageBox.alert/confirm 2018-03-11 16:31:25 +03:00
tophf
4e4f0501d2 fixup: add the empty line correctly 2018-02-22 18:34:15 +03:00
tophf
4bb1a191cc replace the last @-moz-document if present in a usercss template
when creating a new style for the site via popup
see #352
2018-02-22 12:59:56 +03:00
tophf
c5ef92cf9c add the site section to a custom usercss template for new styles
fixes #352
2018-02-22 12:41:55 +03:00
tophf
e3d1c6588d prefill new style name with the domain/hostname
implements #344
2018-02-14 05:53:35 +03:00
tophf
dc1cd890ee notify event subscribers when toggling the style via Alt-Enter 2018-01-14 17:40:09 +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
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
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
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
a66c377d8a fix scrolling over linter issues in usercss mode 2017-12-28 07:01:43 +03:00
tophf
5df76b04e2 disable #save button right after opening a style 2017-12-25 02:26:01 +03:00
tophf
487bc77baa actually replace 'usercssTemplate' 2017-12-24 01:50:53 +03:00