* use .entry collection instead of installed.children
* adjust CSS counters
also:
* KeyboardEvent#code is checked first now - available since Chrome48 and FF32
* synthetic click event is cancelable, otherwise FF would open the editor in popup
the USO site reports style installation unconditionally even if you uninstall it in 5 seconds, but we do it only if the style isn't uninstalled during 60 seconds while the popup is open - thus we exclude previewing of styles, which is a very popular use case
* caching of search results and downloaded style info for one day
* no prefetching of styles
* only the next search results page is prefetched in unattended fashion
* the "configure" button is shown only after installation
* join the code in one closure, regroup and simplify some functions
* same icon in manager
(didn't change the editor config icons as those aren't for usercss)
* "external" icon for USO styles to avoid confusion
(opening a tab is an extremely different action)
* smaller paddings in popup
* removed hover effect on label text
(necause native <select> elements cannot be expanded from js)
* various fixups
* Another popup mockup
This is a fraction of what I want to do with the popup, but these are improvements that can be made to the existing version without a complete overhaul. Should be no difference appearance-wise, only some simple enhancements to existing functionality in terms of click area and stylability.
Eliminates ill-conceived `.left-gutter` altogether. Checkboxes and labels are now either parent/child or siblings, with no weird spaces between them, and their hovers can therefore be styled together. `entry` checkbox/label `.style-name` now occupies the entire height/width of the `.entry` to the left of the `.actions` icons, so no more errant clicks.
* Another popup mockup
* Delete popup.css
* Another popup mockup
* Custom checkboxes
* Custom checkboxes
* Subtlety
>an animated checkbox needlessly draws attention to itself
But... I feel the need. Drawing attention to the checkbox is intentional to indicate click action.
>In case the entire row is highlighted there will be no distraction
Clickable area isn't the entire row, it's everything left of action icons. Hovering background on part of the row will look odd, and it's also a less obvious indicator of click action IMO.
Didn't change "disable all" yet. It's a special kinda function, so maybe slightly more drastic is warranted, but I can tone that down too.
numpad 0-9 same as 0-9
numpad + enables all listed
numpad - disables all listed
numpad * and ` (backtick) - toggles initially enabled styles;
doesn't apply to subsequently enabled styles while the popup is open
so you can restore the initial selection after testing stuff:
simply disable all, then toggle i.e. numpad -, numpad *
1-9, 0 - toggles Nth displayed style (0 is 10)
a-z: - toggles first style with a name that starts with the letter
Shift - opens editor instead of toggling
Promise mode [default]:
- rejects on receiving {__ERROR__: message} created by
background.js::onRuntimeMessage
- suppresses chrome.runtime.lastError
by browserAction.setText which lacks a callback param in chrome API
Callback mode:
- enabled by passing a second param
- doesn't suppress chrome.runtime.lastError
* in manager use search query like url:https://github.com/openstyles/stylus
* in popup shift-click or right-click on manager button opens it and applies the filter
fixes a rare case of the popup being invoked right after switching to a lazily restored tab-on-demand, which doesn't have an URL yet in FF or has an URL but not the content script in some Chrome forks that implement tab-on-demand
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()