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
eight
1c3317202f
Refactor: init
2017-09-12 00:10:26 +08:00
tophf
1daa713582
always hide lint report on switching the linter option
2017-09-04 01:07:07 +03:00
tophf
ea8eaf3146
swap parameters in prefs.subscribe
2017-09-03 20:06:30 +03:00
tophf
d60aea9333
followup d3b7b454: subscribe to 'editor.options.expanded'
2017-09-03 20:06:30 +03:00
tophf
e9b174f6e3
editor narrow mode: reduce options title margins
2017-09-03 19:43:38 +03:00
tophf
e69b6482b7
reopening a deleted style tab should switch to adding
2017-09-03 19:43:38 +03:00
tophf
0c205df108
fixup 85a5702f: refactor; properly clear renderLintReportNow
2017-09-03 19:36:33 +03:00
tophf
d3b7b45452
editor: toggle #options block upon clicking its title
2017-09-01 12:49:09 +03:00
tophf
1f237a98eb
editor: focus the name input when saving a nameless style
2017-09-01 12:27:59 +03:00
tophf
874088e067
edit: focus the first section upon opening
2017-09-01 12:25:40 +03:00
tophf
96b47e7bdd
editor: autoswitch to next/prev editor on cursor movement
2017-09-01 12:23:49 +03:00
tophf
8809384264
debounce indicateCodeChange per cm
2017-09-01 11:16:57 +03:00
tophf
0a5d9d86bf
editor: on disabling CSS linter option, hide the report entirely
2017-09-01 11:08:48 +03:00
tophf
86ebca5e1a
editor: show progress bar while opening huge styles
2017-09-01 00:52:38 +03:00
tophf
85a5702fe0
refactor lint report stuff, use $element
2017-08-31 23:19:43 +03:00
tophf
ec01914f17
separate 'rule' property in lint annotations
2017-08-31 22:25:28 +03:00
tophf
7f9c377d33
use 'changes' event to reduce overhead upon replaceAll
2017-08-31 22:25:28 +03:00
tophf
ab97108e6f
properly replace the editors in initWithStyle
2017-08-31 21:27:10 +03:00
tophf
799108e880
create code box in write-new-style editor immediately
2017-08-31 21:27:10 +03:00
tophf
0189ae1d64
show lint report on open earlier; lint on import
2017-08-31 21:27:07 +03:00
tophf
8960a9f5ce
fixup 3c5d20f8: show detection results properly
...
fixes #180
2017-08-30 21:21:48 +03:00
tophf
916a3bced3
fixup bf4619fc
possible OOB
2017-08-30 20:54:03 +03:00
tophf
bf4619fc2e
exponentially speedup getEditorInSight to avoid delaying 'find'
...
related: #178
2017-08-30 20:44:41 +03:00
tophf
3c5d20f862
proper partial match detection and display in showRegExpTester
...
closes #180
2017-08-30 17:50:32 +03:00
tophf
58b1c5be81
fixup 508f71f2: revert to 'function' to use the correct 'this'
2017-08-30 16:32:08 +03:00
eight
dece4b57f3
Add: install styles from *.user.css file
...
Fix: handle dup name+namespace
Fix: eslint eqeqeq
Fix: trim @name's spaces
Add: check update for userstyle
Add: build CSS variable
Fix: only check dup when id is not provided
Refactor: userStyle2json -> userstyle.json
Add: style for input
Add: config dialog
Fix: preserve config during update
Fix: onchange doesn't fire on keyboard enter event
Fix: remove empty file
Add: validator. Metas must stay in the same line
Add: warn the user if installation failed
Fix: add some delay before starting installation
Add: open the editor after first installation
Fix: add openEditor to globals
Fix: i18n
Add: preprocessor. Move userstyle.build to background page.
Fix: remove unused global
Fix: preserved unknown prop in saveStyleSource() like saveStyle()
Add: edit userstyle source
Fix: load preprocessor dynamically
Fix: load content script dynamically
Fix: buildCode is async function
Fix: drop Object.entries
Fix: style.sections is undefined
Fix: don't hide the name input but disable it
Fix: query the style before installation
Revert: changes to editor, editor.html
Refactor: use term `usercss` instead of `userstyle`
Fix: don't show homepage action for usercss
Refactor: move script-loader to js/
Refactor: pull out mozParser
Fix: code style
Fix: we don't need to build meta anymore
Fix: use saveUsercss instead of saveStyle to get responsed error
Fix: last is undefined, load script error
Fix: switch to moz-format
Fix: drop injectContentScript. Move usercss check into install-user-css
Fix: response -> respond
Fix: globals -> global
Fix: queryUsercss -> filterUsercss
Fix: add processUsercss function
Fix: only open editor for usercss
Fix: remove findupUsercss fixme
Fix: globals -> global
Fix: globals -> global
Fix: global pollution
Revert: update.js
Refactor: checkStyle
Add: support usercss
Fix: no need to getURL in background page
Fix: merget semver.js into usercss.js
Fix: drop all_urls in match pattern
Fix: drop respondWithError
Move stylus -> stylus-lang
Add stylus-lang/readme
Fix: use include_globs
Fix: global pollution
2017-08-30 17:29:41 +08:00
tophf
6f0ab8113e
suppress reverting to a blank in auto-import on paste
2017-08-30 10:51:29 +03:00
tophf
edc2ab0ead
auto-open import dialog when pasted text has @-moz-document
2017-08-30 02:26:47 +03:00
tophf
f308d0be6c
increase height of a single code box upon pasting
2017-08-30 02:04:41 +03:00
tophf
22824d9ad5
deepCopy linterConfig to avoid rule normalization by stylelint
2017-08-30 00:05:07 +03:00
tophf
e4ea7a44af
updateLinter will be called by watchStorage on save
2017-08-29 18:30:39 +03:00
tophf
c7a0759216
don't run CSS linters in the config dialog json
2017-08-29 18:22:08 +03:00
tophf
3d5383ceaf
debounce and subscribe updateLinter
2017-08-29 17:59:53 +03:00
tophf
c15082fed4
editor: preload lint gutters css; update on disabling
2017-08-29 17:12:39 +03:00
tophf
e65e3c9c0b
fixup efc001c0: css_beautify is dodgy
2017-08-29 14:28:59 +03:00
tophf
73dc33d376
fixup f603d9b6: correctly apply 'highlight' selector
2017-08-29 00:12:53 +03:00
tophf
81e6720341
use $element in showLintHelp
2017-08-28 16:33:45 +03:00
tophf
76eb3f7e28
remove deprecated confirm() from onbeforeunload
2017-08-28 15:20:39 +03:00
tophf
efc001c01d
fixup a44b4e78: css_beautify is exposed via exports
2017-08-28 15:20:38 +03:00
tophf
dd6182aef3
lint issues list: show rule name only on hover
2017-08-28 15:20:38 +03:00
tophf
9946f3c781
regroup some of lint* data and code
...
* all lint-related js files are prefixed by lint-
* config-related stuff is grouped in linterConfig
* CM helper is rewritten and moved in /edit now that CSSLint supports these features
* chromeSync methods that apply LZString got LZ in their names
* empty string is used for 'disabled' in linter selector
2017-08-28 15:20:37 +03:00
Rob Garrison
fdeffde2c3
Set selected linter during import
2017-08-27 17:20:48 -05:00
Rob Garrison
6c3501bf9a
Use rules or config consistently
2017-08-27 17:20:48 -05:00
Rob Garrison
21e22c2b6f
Rename CSSLint ruleset to config
2017-08-27 17:20:48 -05:00
Rob Garrison
1e03910b0b
Rename & organize linter messages
2017-08-27 17:20:48 -05:00
Rob Garrison
5ad23bd681
Do not automatically update the linter after a config reset
2017-08-27 17:20:48 -05:00
Rob Garrison
cb177eba4b
Add linter config reset tooltip
2017-08-27 17:20:47 -05:00
Rob Garrison
1a384142ba
Refocus textbox after save/reset
2017-08-27 17:20:47 -05:00
Rob Garrison
e96f0808ed
Rename CSSLint rule config file & variable
2017-08-27 17:20:47 -05:00
Rob Garrison
b00d9575f8
Clear linter config history
2017-08-27 17:20:47 -05:00
Rob Garrison
2c234893e2
Add config cancel button
2017-08-27 17:20:47 -05:00
Rob Garrison
2df6b8bca0
Clean up lint globals
2017-08-27 17:20:47 -05:00
Rob Garrison
95ff72b722
Make linter config JSON more readable
2017-08-27 17:20:47 -05:00
Rob Garrison
52af5c85c0
Don't show nested "rules" in config
2017-08-27 17:20:47 -05:00
Rob Garrison
e2228964d4
Fix issue when CSSLint isn't loaded
2017-08-27 17:20:47 -05:00
Rob Garrison
988af5f1b8
Store linter rules with sync & LZ compression
2017-08-27 17:20:47 -05:00
Rob Garrison
0cd88873e1
Show alert with invalid JSON and rule names
2017-08-27 17:20:47 -05:00
Rob Garrison
5b2cd77035
Fix indention
2017-08-27 17:20:47 -05:00
Rob Garrison
320fd07789
Rename as generic reset message
2017-08-27 17:20:47 -05:00
Rob Garrison
b7b99f0ed0
Disable non-essential stylelint rules
2017-08-27 17:20:47 -05:00
Rob Garrison
ac1ffa98b5
Add CSSLint rule configuration
2017-08-27 17:20:46 -05:00
Rob Garrison
b178d3d8ee
Open CSSLint rule in a new tab
2017-08-27 17:20:46 -05:00
Rob Garrison
2ae5cde274
Linkify CSSLint rules. See #167
2017-08-27 17:20:46 -05:00
Rob Garrison
4e502e57eb
Fix import into editor
2017-08-27 17:20:46 -05:00
Rob Garrison
afc38b0bc8
update element selectors in all files
2017-08-27 17:20:46 -05:00
Rob Garrison
ce906eb4b6
Move csslint-worker file
2017-08-27 17:20:45 -05:00
Rob Garrison
1fc17861db
Remove "Unexpected" from stylelint messages
2017-08-27 17:20:45 -05:00
Rob Garrison
d563495c26
Fix no-inline-comments issues
2017-08-27 17:20:45 -05:00
Rob Garrison
a3b8b7d168
Fix eslint issue
2017-08-27 17:20:45 -05:00
Rob Garrison
e387d7a5e7
Remove lint issues overflow & ellipsis
2017-08-27 17:20:45 -05:00
Rob Garrison
5ce7a925cb
Move stylelint-config to edit folder
2017-08-27 17:20:45 -05:00
Rob Garrison
75deeddc0e
Fix linting issues table
...
Also fixed severity icon alignment
2017-08-27 17:20:45 -05:00
Rob Garrison
80ed34f3e7
Use correct multi-line statement formatting
2017-08-27 17:20:45 -05:00
Rob Garrison
5bfbab62d7
Use push instead of concat
2017-08-27 17:20:45 -05:00
Rob Garrison
bfe1ad60c2
Remove unnecessary braces
2017-08-27 17:20:45 -05:00
Rob Garrison
3e371f193a
Set eslint no-inline-comments
2017-08-27 17:20:45 -05:00
Rob Garrison
5936d766f8
Update element selectors
2017-08-27 17:20:45 -05:00
Rob Garrison
b429735e86
Use loader script to load beautify
2017-08-27 17:20:44 -05:00
Rob Garrison
92a49759a9
Update empty stylelint rules on initial load
2017-08-27 17:20:44 -05:00
Rob Garrison
f36ce5c625
Fix undefined stylelintDefaultConfig
2017-08-27 17:20:44 -05:00
Rob Garrison
7da5bd1408
Remove link to jsonlint
2017-08-27 17:20:44 -05:00
Rob Garrison
9d1a1427a0
Fix stylelint settings json linting
2017-08-27 17:20:44 -05:00
Rob Garrison
775aec7c72
Add jsonlint resource
2017-08-27 17:20:44 -05:00
Rob Garrison
25ec79e8bb
Fix jsonlint error message text
2017-08-27 17:20:44 -05:00
Rob Garrison
dded798ee3
Fix stylelint error message timer
2017-08-27 17:20:44 -05:00
Rob Garrison
7c5b4c2bcf
Remove extra delay
...
It appears to no longer be an issue
2017-08-27 17:20:44 -05:00
Rob Garrison
29851a8de9
Dynamically load linter when selected
2017-08-27 17:20:44 -05:00
Rob Garrison
b1a7f8d4a2
Fix stylelint popup code & use codemirror
2017-08-27 17:20:44 -05:00
Rob Garrison
287f16dcfa
Use preventDefault
2017-08-27 17:20:43 -05:00
Rob Garrison
b89fb440f7
Replace try/catch with tryJSONparse
2017-08-27 17:20:43 -05:00
Rob Garrison
fefb8f332c
Rename function to be more precise
2017-08-27 17:20:43 -05:00
Rob Garrison
6bd1768b72
Remove unnecessary global
2017-08-27 17:20:43 -05:00
Rob Garrison
0ccdf2fd7f
Remove disabling of unrelated js linting issue
2017-08-27 17:20:43 -05:00
Rob Garrison
9564c21282
Split global definitions
2017-08-27 17:20:43 -05:00
Rob Garrison
73e7a9b3f1
Add stylelint config icon tooltip
2017-08-27 17:20:43 -05:00
Rob Garrison
c2e294beff
Fix js error when no linting issues exist
2017-08-27 17:20:43 -05:00
Rob Garrison
12a09976f2
Prevent vertical scrollbar on header
2017-08-27 17:20:43 -05:00
Rob Garrison
06cd78b643
Add stylelint settings popup & cleanup
2017-08-27 17:20:43 -05:00
Rob Garrison
07dce1006d
Split out lint code from edit.js
2017-08-27 17:20:43 -05:00
Rob Garrison
dfa71f699e
Add linter select option
2017-08-27 17:20:42 -05:00
Rob Garrison
a44b4e7822
Switch from CSSLint to stylelint
2017-08-27 17:20:42 -05:00
tophf
6f2883c6d3
remember window size only in active editor
2017-08-27 19:41:09 +03:00
tophf
a52c6ed9d7
avoid creating conflicts with stylelint PR
2017-08-27 18:03:59 +03:00
tophf
feea5e834e
avoid avoiding to actually avoid
...
it was a Chrome bug workaround which became harmful now that it's fixed in Chrome
2017-08-27 17:50:53 +03:00
tophf
ec95e8e7b4
simplify tabs.onAttached
2017-08-27 17:42:59 +03:00
tophf
d1924c1d63
deglobalize onAttached listener for editor tabs
...
* bonus: one unconditional global listener less
* bonus: in FF the saved window size is restored on detaching
* theoretically possible drawback: 100+ editor tabs on a slow computer may be slower than before
2017-08-27 17:17:28 +03:00
tophf
738846a614
better remember and detect resizing of editor; FF-compatibility
2017-08-27 17:05:05 +03:00
tophf
6256f1ab2d
fix narrow editor media query in FF: use column-count
2017-08-27 14:40:23 +03:00
tophf
92ab165192
don't restore size of editor window if it has many tabs
...
previously it happened occasionally on browser startup resulting in unwanted resizing of the main browser window
2017-08-18 17:09:02 +03:00
tophf
815f8ca959
also find styles for URLs with stripped #hash
...
kinda fixes #155
as per spec the fragment portion is ignored in @-moz-document:
https://www.w3.org/TR/2012/WD-css3-conditional-20120911/#url-of-doc
but we still respect url("foo#hash") set in userstyles
because the spec is outdated and doesn't account for SPA sites
collateral damage: simplified URLS.supported()
2017-08-18 13:18:19 +03:00
tophf
d2b81be9d1
editor: CM scroller height fix for resize-grip (fixup b45f51f1
)
...
fixes #142
2017-08-09 16:56:39 +03:00
tophf
af41d646dd
Don't show editor.contextDelete option in FF; #128
2017-07-31 19:39:44 +03:00
tophf
0d2d21b54d
editor->manage: always highlight the just edited style
2017-07-23 18:33:55 +03:00
Jeremy Schomery
3c298995f1
a few fixes
2017-07-22 12:56:37 +03:00
Jeremy Schomery
3ccdb555da
no insertAdjacentHTML usage on CM theme switching
2017-07-22 12:56:37 +03:00
Jeremy Schomery
53683dcbbd
empty contents of showHelp() before appending childs; based on https://github.com/openstyles/stylus/pull/119#issuecomment-316372767
2017-07-22 12:56:37 +03:00
Jeremy Schomery
7affeedd3b
removing tE()
2017-07-22 12:56:37 +03:00
Jeremy Schomery
0955fc852c
removing a few more innerHTMLs
2017-07-22 12:56:28 +03:00
Jeremy Schomery
61971b97c8
tHTML uses parseFromString instead of innerHTML. showHelp now uses tHTML
2017-07-22 12:56:28 +03:00
Jeremy Schomery
5d46dcc33e
customizeOpenDialog, openDialog, and originalOpenConfirm now use cloned template instead of innerHTML
2017-07-22 12:54:32 +03:00
Jeremy Schomery
0e9c8f290c
optionsHtmlFromArray to optionsFromArray
2017-07-22 12:54:32 +03:00
Jeremy Schomery
7c8dbfc3a4
empty elements with textContent
2017-07-22 12:54:32 +03:00
tophf
eeb826ee97
showRegExpTester: don't blink favicons on typing
2017-07-22 12:54:32 +03:00
tophf
c963a13932
code cosmetics
...
Reorganize showRegExpTester()'s render stats code to better reflect the displayed structure/order of data
2017-07-22 12:54:32 +03:00
tophf
23c870ceb9
fixup b50c19a8: "errors" is now an array
2017-07-22 12:54:32 +03:00
tophf
b50c19a802
editor import: warn about invalid -moz-document functions
...
* fixes #118
* alleviates #116 by switching showRegExpTester() from innerHTML to DOM
2017-07-19 15:09:29 +03:00
Rob Garrison
8cfb37351d
Remove unused variables
2017-07-16 14:40:13 -05:00
Rob Garrison
417e3b5de3
Add eqeqeq definition to eslint
2017-07-16 13:07:21 -05:00
Rob Garrison
24dd0cb562
More cleanup
2017-07-16 13:07:21 -05:00
Rob Garrison
1940318f0f
Fix eslint issues & use arrow functions
2017-07-16 13:07:15 -05:00
Rob Garrison
11d8687af7
Wrap case statement to fix eslint issue
2017-07-14 04:42:55 -05:00
Rob Garrison
81484bbc37
Fix for-loop index declarations
2017-07-14 04:23:47 -05:00
Rob Garrison
01e63d5b1a
Remove escaped single quote
2017-07-14 04:23:46 -05:00
Rob Garrison
a3e149a30e
Fix & rename scoped state variable
2017-07-14 04:22:56 -05:00
Rob Garrison
1a630033bd
Use a single declaration per line
2017-07-14 04:10:00 -05:00
Rob Garrison
61327bfaf1
Restore case declarations in edit.js
2017-07-14 03:33:59 -05:00
Rob Garrison
0037c699d9
Fix eslint issues
2017-07-12 16:26:21 -05:00
Rob Garrison
508f71f26b
Change tabs to spaces in edit.js
2017-07-12 16:26:20 -05:00
Rob Garrison
bb33ff3981
Fix links & split out edit.css
2017-07-12 16:26:20 -05:00
Rob Garrison
7a9d629ec8
Restructure folders
2017-07-12 16:26:20 -05:00