Commit Graph

183 Commits

Author SHA1 Message Date
tophf
479d95711b linter report expands/collapses on click; the state is saved 2017-11-24 13:19:15 +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
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
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
aa1ac63c1c fix svg icon rendering in FF: symbols don't need size 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
eight
6a53ea423c Refactor: pull out createAppliesToLineWidget 2017-11-01 11:17:00 +08:00
eight
13ca45a104 Fix: reorder global comment 2017-11-01 11:16:46 +08:00
eight
9ee7e2046c Refactor: split out regexp tester 2017-10-07 23:41:37 +08:00
eight
24cd85688f WIP: install page + editor 2017-09-24 16:54:21 +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
a15493bfb9 Add: source editor 2017-09-12 00:10:27 +08:00
tophf
36d790e0c2 improve CSS transition suppression on own pages in FF 2017-09-04 01:05:32 +03:00
tophf
d3b7b45452 editor: toggle #options block upon clicking its title 2017-09-01 12:49:09 +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
c15082fed4 editor: preload lint gutters css; update on disabling 2017-08-29 17:12:39 +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
6c3501bf9a Use rules or config consistently 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
1d1a2ce1c8 Fix linter config tooltip 2017-08-27 17:20:48 -05:00
Rob Garrison
ac1ffa98b5 Add CSSLint rule configuration 2017-08-27 17:20:46 -05:00
Rob Garrison
29851a8de9 Dynamically load linter when selected 2017-08-27 17:20:44 -05:00
Rob Garrison
f52f8c57d8 Rename linter.js to css-lint.js 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
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
139d7ebb98 Show stylelint warnings & use minified bundle 2017-08-27 17:20:42 -05:00
Rob Garrison
a44b4e7822 Switch from CSSLint to stylelint 2017-08-27 17:20:42 -05:00
Jeremy Schomery
332f95e1ff i18n-html to i18n-text if possible. tNodeList now parses HTML content using tHTML 2017-07-22 12:56:37 +03:00
Rob Garrison
ac91e25eb4 Move messaging.js file & references 2017-07-13 19:52:40 -05:00
Rob Garrison
bb33ff3981 Fix links & split out edit.css 2017-07-12 16:26:20 -05:00
tophf
b45f51f136 editor: CM scroller height fix for resize-grip 2017-07-01 13:37:35 +03:00
tophf
67c6bd16ba spellcheck="false" in text input fields 2017-06-29 16:47:13 +03:00
narcolepticinsomniac
b4f2dffca0 Correct hovers for CodeMirror auto-suggestions 2017-06-28 06:25:26 -04:00
tophf
565f23fa6e editor: add double-click to resize grip 2017-06-28 12:41:34 +03:00
tophf
9ffc525391 editor: horizontal resize grip 2017-06-28 12:40:19 +03:00
tophf
2240a0895e editor: autocomplete on typing 2017-06-18 17:04:14 +03:00
tophf
f603d9b61f simplify html for editor options: reuse the id 2017-06-18 15:47:15 +03:00
tophf
4559162d45 Alt-Enter in the editor to toggle&save the style 2017-06-06 10:56:49 +03:00
narcolepticinsomniac
bd817cd4be Minor adjustment for info icons 2017-05-18 08:05:13 -04:00
tophf
4250f89ed3 Add favicons only in Firefox 2017-05-17 01:09:31 +03:00
tophf
3b9ec2508f Use 16px favicon by default if "sizes" attr isn't respected 2017-05-15 15:50:31 +03:00
tophf
1706f380f2 Show favicons on own pages in FF/Opera 2017-05-15 15:41:15 +03:00
tophf
6000bb33ab editor: dim Save button when not modified 2017-04-26 01:35:15 +03:00
tophf
021f50015b restore editor window size when reopened via Ctrl-Shift-T 2017-04-18 12:47:19 +03:00
tophf
3389812766 remove focus ring from <summary> 2017-04-18 12:46:36 +03:00
tophf
5c8d1950a7 Isolate storage.js in background context
To prevent cross-page leaks we need to create/copy prefs and cachedStyles inside the background page context.

* storage.js is now used only in the background page

* messaging.js now contains less bg-specific methods and more common methods. Added saveStyleSafe, deleteStyleSafe which automatically invoke onRuntimeMessage of the current page or just handleUpdate/handleDelete when notify:false

* prefs.js with 'prefs' for background and UI pages: separate objects because a UI page may load before the background page and it can read prefs from localStorage/sync/defaults
2017-04-18 12:46:34 +03:00
tophf
ff84e924fa polyfill DOM enumerables for Chrome 49 2017-04-18 12:46:32 +03:00
tophf
a889ac6413 templates: compress inter-tag whitespace
to reduce number of DOM nodes by 25%
2017-04-18 12:46:32 +03:00
tophf
1cf904b135 polish popup/manage/edit css/svg/etc.
* restore the correct width of svg icons
* popup: use the standard formatting & SVG <symbol>
* popup .breadcrumbs hover highlight
* manage: black links, transitions; use <p> in #options; trim .homepage
* edit: move regexp tester info link to a template
2017-04-18 12:46:29 +03:00
tophf
6be903e2ad Add UI for 'editor.matchHighlight' option 2017-04-18 12:46:27 +03:00
tophf
c4f219c039 Use our match-highlighter.js mod that reveals only multiple matches 2017-04-18 12:46:26 +03:00
tophf
c356fb9be5 Add regexp tester to the editor 2017-04-18 12:46:26 +03:00
tophf
26e1b67f44 Add <html id="stylus"> to all pages 2017-04-18 12:43:31 +03:00
tophf
2f4da37fdb Refactor and speed up popup & manager
Popup:
* Enforce 200-800px range for the popup width option

Manage:
* faster search via cachedStyles.byId
* faster restoration of search results on history nav
* style name is clickable and opens the editor
* animated highlight of style element on update/add/save
* expandable extra applies-to targets
* remember scroll position on normal history navigation
* boz-sizing in #header, also in editor
* applies-to targets use structured markup
* get*Tab*, enableStyle and deleteStyle are promisified
2017-04-18 12:43:29 +03:00
tophf
7a7c679811 Avoid flickering of editor header on load, also for manage<=>edit nav 2017-04-18 12:43:29 +03:00
tophf
df59fca29c Add match-highlighter of the word under cursor 2017-04-18 12:43:28 +03:00
tophf
df570dab9e Store SVG icons in a <symbol> collection
+preserve the page colors via fill:currentColor and opacity transition.
2017-04-18 12:43:28 +03:00
narcolepticinsomniac
bab801f90b Correction 2017-03-30 23:00:35 -04:00
narcolepticinsomniac
df0f45dc06 Switch info/external style link icons from img to svg
Switched info to `i` and found a pretty nice external link icon imo. @tophf As for pixelation on the info icons, you mentioned maybe a lighter color would help. For all icons besides external links, I made them lighter with darker hovers. Besides a really high zoom, I never saw any issue to begin with, but let me know if they're alright. I also changed them to use their exact original dimensions, so maybe that helps.
2017-03-30 19:49:03 -04:00
narcolepticinsomniac
ef7a3209d7 Account for editor header overflow 2017-03-05 04:56:17 -05:00
narcolepticinsomniac
bcefdebea1 Fix 'body' id
#40
2017-03-05 04:29:10 -05:00
Jeremy Schomery
0f63da455e muting CSSLint 2017-02-09 08:40:51 +03:30
Jeremy Schomery
03f4900506 updating CSSLint to v1.0.4 2017-02-08 17:18:30 +03:30
Jason Barnabe
b24d7b8246 Merge pull request #168 from tophf/toggle-issues
Narrow-width editor on touchscreens: toggle lint report via click
2016-03-17 22:00:57 -05:00
Jason
cc95a62c7c Various Firefox error and warning fixes #166 2016-03-07 23:22:28 -06:00
tophf
08e35c6990 Narrow-width editor on touchscreens: toggle lint report via click 2016-02-01 17:13:14 +02:00
tophf
b8bbcd01db Autohide lint report in narrow mode; show # of issues 2016-01-20 21:16:58 +03:00
tophf
485932ae49 Update world_go.png to 32x32, also suitable for retina 2015-09-01 21:50:33 +03:00
tophf
d2441213ef Don't use css calc with vw as it fails on Chrome 31
* Also makes showCodeMirrorPopup() size stylable
2015-08-28 19:45:15 +03:00
tophf
0ead2ef259 Editor: paste from Mozilla format; export in styled popup 2015-08-24 08:16:22 +03:00
tophf
4f61494e0d Move html templates to html file 2015-08-03 08:13:01 +03:00
tophf
2e7c35e8f0 Editor: highlight CodeMirror mini-dialogs entirely 2015-08-03 08:12:39 +03:00
tophf
20141b7bfa Editor: add global-replace/replaceAll commands
* Collateral fix: correctly restore openDialog() after Esc
* refactor html templates
2015-08-03 08:12:39 +03:00
tophf
7fdc69fac6 Editor: enlarge click region of close button in help popup 2015-07-04 06:39:39 +03:00
tophf
c3472207bf Editor: add Undo button to CSS-beautifier 2015-07-04 06:39:39 +03:00
tophf
b5df8802a0 Editor: CSS-beautifier 2015-07-04 06:39:39 +03:00
tophf
1250bb970e Editor: show a list of all CSSLint messages 2015-07-04 06:33:40 +03:00
tophf
03c9b04503 Editor: add toggle/line/block comment commands 2015-05-27 21:03:25 +03:00
tophf
0308774fc4 Editor: highlight active line 2015-05-27 21:03:25 +03:00
tophf
39021be48c Editor: add a link to the install source page 2015-05-15 19:49:56 +03:00
tophf
e707a08a84 Editor: showHelp() as html, add help for hotkeys 2015-05-10 12:40:51 +03:00
tophf
614694cf7e Editor: reroute browser hotkeys to CM using keymaps 2015-05-10 12:40:51 +03:00
tophf
bc6476bc52 Editor: option to select CodeMirror CSS theme 2015-05-05 21:14:11 +03:00
tophf
0e6f63951a Localization: embed in html, autorun, apply earlier 2015-05-01 13:33:01 +03:00
Jason
d8e9f61576 Remove extra focus style for CodeMirror 2015-04-08 14:07:59 -05:00
Jason
6abc261f90 Add focus style to CodeMirror 2015-04-08 12:11:22 -05:00
Jason
cf7581a7a8 Standardize editor actions div children 2015-04-08 11:42:39 -05:00
tophf
413c454713 Editor: reroute the browser search to a closest CodeMirror box
Won't work if invoked via the browser menu or a non-standard hotkey
2015-03-26 14:12:47 +03:00
tophf
a4f602c7aa Editor: add resize grip 2015-03-25 16:42:11 +03:00
tophf
9c99495d65 Editor: webkit columns bug workaround; better alignment; rem units 2015-03-24 19:16:16 +03:00
Jason
c8ce70f964 Restore header for narrow width edit and standardize position 2015-03-23 19:52:18 -05:00
Jason
02e1255580 Use columns instead of flex for narrow-width options 2015-03-23 19:39:21 -05:00
Jason
dac381fb57 Adjust display of name/enabled when in a narrow window 2015-03-23 19:25:39 -05:00
Jason
7a2d978d4a Fix shadowy border thing on edit screen 2015-03-23 18:51:51 -05:00