Commit Graph

32 Commits

Author SHA1 Message Date
tophf
80538a17f5 Report unreachable content script in popup
Chrome can't executeScript on file:// URLs even though we have <all_urls> in manifest.json so on such pages we'll display a warning in the popup. This should only happen when Stylus is [re]enabled/reloaded.
2017-04-18 12:46:35 +03:00
tophf
2bb7d31042 fixups for Opera/Vivaldi/Firefox-compatibility 2017-04-18 12:46:32 +03:00
tophf
8b2226936d popup: make the regexp problem indicator red 2017-04-18 12:46:30 +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
b51c264c8b confirmDelete: extract, refactor, use in manage 2017-04-18 12:46:22 +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
narcolepticinsomniac
9dac68410d Handle popup overflow better
Max height is 600px for the popup, regardless of resolution (so says Google), so we can set the styles section to a max height in px and let the overflow scroll inside the div, instead of scrolling the whole popup. This way the other actions are always present at the bottom of the popup without needing to scroll to use them. I left a little breathing room for the rare instance when domain name in "write style for" is long enough to cause a line break, so there should never really be any overflow for the popup itself.

https://github.com/schomery/stylish-chrome/pull/50#issuecomment-287665085
2017-03-20 05:58:38 -04:00
narcolepticinsomniac
e2e64113fe Remove unnecessary text-indent 2017-03-16 01:15:58 -04:00
Jeremy Schomery
2fdbf321a1 fixes https://github.com/schomery/stylish-chrome/issues/43#issuecomment-286388663 2017-03-14 16:37:08 +03:30
Jeremy Schomery
b1582d508d popup resizes itself after style changes 2017-03-14 09:42:00 +03:30
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
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
narcolepticinsomniac
1d00055e5e "Turn all styles off" stylename strikethrough
#43
2017-03-12 18:18:09 -04:00
narcolepticinsomniac
759096f0d0 Edit delete links cosmetic tweaks 2017-03-11 05:20:02 -05:00
narcolepticinsomniac
79c801fa63 Edit/delete link cosmetic tweaks
Feel free to improve upon this if you want.
2017-03-11 05:15:03 -05:00
Jeremy Schomery
616a2517f5 https://github.com/schomery/stylish-chrome/issues/38#issuecomment-285854060 2017-03-11 12:35:37 +03:30
narcolepticinsomniac
9deef0ed97 Lighten icons a bit 2017-03-10 19:22:50 -05:00
narcolepticinsomniac
888faf4c61 Alignment tweak for "Turn all styles off" 2017-03-09 18:33:32 -05:00
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
885bab9a03 moving popupWidth pref to localStorage base on https://github.com/schomery/stylish-chrome/issues/38#issuecomment-284693730 2017-03-08 16:41:26 +03:30
Jeremy Schomery
974aaee823 popup width is now adjustable 2017-03-06 23:47:32 +03:30
Jeremy Schomery
0646f6bd65 a few changes in the popup look based on #38 2017-03-06 17:44:09 +03:30
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
narcolepticinsomniac
6367d414ea Update popup.css 2017-01-18 16:36:29 -05:00
Jeremy Schomery
9582c65a84 import styles from Stylish extension 2017-01-11 15:25:38 +03:30