Commit Graph

125 Commits

Author SHA1 Message Date
tophf
ce61112020 reuse "configure" message and simplified tooltip
we'll implement a built-in config dialog for USO styles in the future
2017-12-10 00:05:31 +03:00
derv
ce278fb4d0 Show styles from userstyles.org in Stylus popup (#251) 2017-12-10 00:03:17 +03:00
tophf
38e0937f45 config dialog tweaks
* 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
2017-12-07 01:07:55 +03:00
eight
07a0518586 Add config dialog to popup (#283) 2017-12-06 00:14:21 +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
narcolepticinsomniac
a185b6b182
Another popup mockup (#271)
* 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.
2017-12-02 18:55:23 -05:00
tophf
0ba3cfb725 FF: fix transition-bug-suppressor condition 2017-12-02 19:38:03 +03:00
tophf
f05debf686 popup: show hotkey info upon clicking the area on the right 2017-12-02 04:07:09 +03:00
tophf
c0a227fa39 popup: show style numbers, add more hotkeys
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 *
2017-11-29 17:59:02 +03:00
tophf
8f04e17d27 fix #223 - Android compatibility 2017-11-25 16:25:20 +03:00
tophf
7cf27601ae popup: USO workaround for finding extension styles 2017-09-30 03:19:27 +03:00
tophf
36d790e0c2 improve CSS transition suppression on own pages in FF 2017-09-04 01:05:32 +03:00
tophf
90ab2959a6 abandon automatic translation in CSS
* it fails with some languages in some versions of FF
* it's not as flexible as HTML templates
* we were only using it for a few messages
2017-08-27 13:02:17 +03:00
tophf
fb7f7d5471 URL-mode in manager's search and popup's manage button
* 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
2017-08-23 12:16:32 +03:00
tophf
6625cd4349 use optionsOpenManager message in popup's "manage" button tooltip 2017-08-18 14:48:35 +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
0e1124b8bb optionsUI: make "Shortcuts" a button; unify translations 2017-04-29 19:56:37 +03:00
tophf
b3b1d4a628 own page load microopt: reduce blocking on i18n
* localStorage cache is faster than chrome.i18n.get
* TreeWalker is faster than tHTML for removing extraneous whitespace
* simple for() is faster than for-of with [...iterable]
2017-04-18 12:47:02 +03:00
tophf
1749057b91 Explainer for stylusUnavailableForURL message
We don't mention the G+ iframe on CWS stylable only when "Out of process iframes" feature is enabled which can be set manually via chrome://flags/#enable-site-per-process. It's still in development and is known to break some sites, which is why it's not enabled by default.
2017-04-18 12:46:35 +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
2bb7d31042 fixups for Opera/Vivaldi/Firefox-compatibility 2017-04-18 12:46:32 +03:00
tophf
ff84e924fa polyfill DOM enumerables for Chrome 49 2017-04-18 12:46:32 +03:00
tophf
f147b409df embed SVG to help buggy Chrome's GC
Chrome doesn't garbage-collect (or even leaks) SVG <symbol> referenced via <use> so we'll embed the code directly on manage and popup pages where dozens/hundreds of svgs are displayed.
2017-04-18 12:46:31 +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
f8d13d8dec Remove code:false mode; show sloppy regexps in popup
* Now that our own pages retrieve the styles directly via getStylesSafe the only 0.001% of cases where code:false would be needed (the browser is starting up with some of the tabs showing our built-in pages like editor or manage) is not worth optimizing for.

* According to CSS4 @document specification the entire URL must match. Stylish-for-Chrome implemented it incorrectly since the very beginning. We detect styles that abuse the bug by finding the sections that would have been applied by Stylish but not by us as we follow the spec. Additionally we'll check for invalid regexps.
2017-04-18 12:46:28 +03:00
tophf
04084864cc Reverse button order when OS is not Windows 2017-04-18 12:46:23 +03:00
tophf
363f752934 Use messageBox in manage for confirm; partially revert c5741aff 2017-04-18 12:46:23 +03:00
tophf
4936426fa3 dom.js: extract common DOM functions 2017-04-18 12:46:22 +03:00
tophf
b51c264c8b confirmDelete: extract, refactor, use in manage 2017-04-18 12:46:22 +03:00
tophf
b5fa934652 confirmOK -> confirmDelete 2017-04-18 12:46:21 +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
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
Jeremy Schomery
708ff97723 new fix for https://github.com/schomery/stylish-chrome/issues/43#issuecomment-286154032 2017-03-13 22:56:43 +03:30
Jeremy Schomery
2a5953a106 changing the order of buttons to match Windows OS confirm box; based on https://github.com/schomery/stylish-chrome/issues/43#issuecomment-286111716 2017-03-13 17:33:38 +03:30
Jeremy Schomery
52d3387c6a based on https://github.com/schomery/stylish-chrome/issues/43#issuecomment-286102989 2017-03-13 17:11:01 +03:30
Jeremy Schomery
65845c6c6e replacing window.confirm 2017-03-13 16:28:35 +03:30
Jeremy Schomery
3be2c300b2 revert back localization.js changes based on 2da4a8708c (commitcomment-21270367) 2017-03-11 19:23:53 +03:30
Jeremy Schomery
2da4a8708c Supporting tooltip; https://github.com/schomery/stylish-chrome/issues/38#issuecomment-285350914 2017-03-11 12:41:38 +03:30
narcolepticinsomniac
b555c395eb Edit/delete as buttons with icons
The icons I used are from right here on Github. They're SVG, so there should't be reliability issues. Wanted to see how they'd look, and I really kinda like it. Thoughts?
2017-03-09 07:53:00 -05:00
Jeremy Schomery
0646f6bd65 a few changes in the popup look based on #38 2017-03-06 17:44:09 +03:30
narcolepticinsomniac
17e1b3f658 Change 'body' id 2017-03-05 09:40:48 -05:00
narcolepticinsomniac
9a2cab60dd Options UI discoverability and other fixes
#34
2017-02-28 18:57:03 -05:00
narcolepticinsomniac
fa159cf845 Options UI discoverability
#34
2017-02-24 06:04:43 -05:00
narcolepticinsomniac
d6808e46ff Minor cosmetic tweaks 2017-01-30 14:18:34 -05:00
Jeremy Schomery
9582c65a84 import styles from Stylish extension 2017-01-11 15:25:38 +03:30
Jason
cc95a62c7c Various Firefox error and warning fixes #166 2016-03-07 23:22:28 -06:00
tophf
4f61494e0d Move html templates to html file 2015-08-03 08:13:01 +03:00
tophf
0e6f63951a Localization: embed in html, autorun, apply earlier 2015-05-01 13:33:01 +03:00
Jason
ac00f48d19 Popup CSS tweaks 2015-04-17 09:33:03 -05:00
Jason
f0e00ec5c6 Switch 'all styles off' style to strikethrough to make them not look disabled 2015-04-08 14:18:12 -05:00
Jason
cf4da22a0a Make style names in popup toggle the styles 2015-04-08 14:14:16 -05:00
Jason
32584911ea Add a bit of spacing after style name in pop-up 2015-04-08 14:10:34 -05:00
Jason
6c47b78763 Add left gutter to popup for checkboxes 2015-04-08 14:07:30 -05:00
tophf
f0f5a28c46 fixup for checkbox pos; add wrapper & visual feedback 2015-03-24 20:27:13 +03:00
hideheader
f45a6506be Add 'Disable all styles' to popup 2015-03-24 20:21:19 +03:00
hideheader
222f970d23 [option] List actions before styles in the popup
Styles are listed before actions by default. Actions are listed before
styles if `popup.stylesFirst` is false. A control for the option is shown
in "Manage" if `popup.stylesFirstUI` is true.
2015-03-14 21:35:45 -04:00
hideheader
83acbaa77c A little to the left... no, more to the right... 2015-03-03 19:02:52 -05:00
hideheader
5fabfc4207 CSS + 'new style' code changes 2015-03-03 19:02:51 -05:00
hideheader
b48bdeff77 Put the menu actions in a box 2015-02-25 00:20:55 -05:00
hideheader
a632e68b8d Make 'New style' the last menu action
Append the new menu entry to the existing entries for continuity with the previous menu layout.
2015-02-18 15:47:40 -05:00
Jason Barnabe
bd83d65da6 Add enable/disable links back as hidden #17 2015-02-17 13:01:15 -06:00
Jason Barnabe
5e3efb3df6 Apply styles to Stylish pages 2015-02-08 22:25:35 -06:00
Jason Barnabe
0756f2d2b8 Add write new style options to toolbar pop-up #14 2015-01-30 11:28:05 -06:00
Jason Barnabe
09384b1d57 Don't show disabled-looking controls for disabled styles, code cleanup #20 2014-10-06 11:13:05 -05:00
Jaroslav Petrnoušek
01e705aef0 Arrow cursor on style name 2014-10-03 22:31:25 +02:00
Baegus
40da07846b Checkbox for enabling/disabling styles
This fixes #17
2014-10-01 21:51:25 +02:00
LouCypher
ae634474bf Fixed weird behaviour on Opera 15 2013-07-05 05:12:16 +07:00
Jason Barnabe
1184861a0d Don't target=_new when opening manage window 2013-07-03 11:43:42 -05:00
Jason Barnabe
2064f56796 issue 102 Do something reasonable if the Stylish DB can't be read 2013-06-25 23:25:04 -05:00
Jason Barnabe
5d1e987a38 issue 80 Add 'id' attribute to 'HTML' or 'BODY' element in Stylish for Chrome settings pages 2013-01-25 18:50:46 -06:00
Jason Barnabe
9270dc1596 issue 44 Stop using deprecated Chrome APIs 2012-08-19 20:14:33 -05:00
Jason Barnabe
b019038f57 initial commit 2012-04-15 20:56:12 -05:00