Stylish for Chrome 1.3.0b3

edited April 2015 in Stylish Firefox

Available here.

Translation is now on Transifex

Changes since 1.3.0b2

  • Styles applied to Stylish internal pages are applied more quickly.
  • Styles for domains are now applied when on non-standard ports.
  • Style changes are now immediately applied to the Stylish pop-up.
  • Fixes an editor bug related to undoing and unsaved changes.
  • Various tweaks to the layout of the pop-up and editor.

Changes since 1.3.0b1

Thanks to @tophf and @hideheader who have submitted numerous pull requests in this version.

  • Many changes to the UI, mostly the editor
  • Turn on/off all styles feature
  • Improved application of styles to iframes
  • Added Dutch translation

Changes since 1.2.2

  • Stylish now applies styles earlier, greatly reducing or eliminating "flicker".
  • Styles are now applied as late in the document as possible. This provides more consistency and better compatibility with Firefox.
  • Stylish can now affect some dynamically generated iframes. (It's kind of flaky.)
  • Stylish can now affect file: URIs. You must enable this from the Extensions page.
  • Stylish can now affect its own pages - chrome-extension://fkcllfpkdjkihkdjkaihobkbbebkcdlf/manage.html, chrome-extension://fkcllfpkdjkihkdjkaihobkbbebkcdlf/popup.html, and chrome-extension://fkcllfpkdjkihkdjkaihobkbbebkcdlf/edit.html. It still can't affect other chrome-extension: URIs.
  • Updated display of toolbar pop-up, including links for creating a new style for the current site.
  • Updated CodeMirror (code editor) - long code no longer gets cut off when pasting.
  • Styles are now sorted alphabetically in manage page.
  • Detach an edit tab and then all edit pages will open in new windows. Reattach and they'll go back to opening in tabs.
  • Don't show styles with two @namespaces as global.
«13

Comments

  • Release depends on the feedback. If I get bug reports, then I'll fix them and release another beta. If no one says anything, I assume everything is good and release.

    Oh yeah, that ID may be different in the release...

    You can see some discussion on iframes at https://github.com/JasonBarnabe/stylish-chrome/issues/3 . The devmo editor works only if you apply after the page loads for me.
  • edited February 2015 Chrome
    image
    1. Styling file: URLs works fine, but "Find more styles" should be suppressed - it won't find any styles, it will only leak your local folder structure across the network.
    2. Stylish styling Stylish works fine.
    3. There is no popup link to write a global style - thank you.
    4. "New style for this domain" links work, even when the domain is the Stylish extension ID. I wonder if the subdomain links could be combined - forum.userstyles.org this URL - with highlighting changing with hover to show which subdomain will be targeted.
    5. I really dislike the checkboxes. They aren't useful, they steal space from the style names which are useful, and I'm reminded of it every time I click what used to be the Enable/Disable link. Please restore the link; make it display:none if you like.
    6. Styles are sorted alphabetically in the Styles Manager. I misread that - I was sure that the names in the popup menu would be sorted alphabetically.
    7. I prefer having the static links at the top of the popup menu. Menu entries shouldn't be able to run away when you're try to click them. (Though that would be more sporting.)
    8. Detach an editor, open a second editor - second editor opens in its own window as advertised. Drag the second editor tab into the first editor's window, then open a third editor from the toolbar icon in the original window. I was hoping it would join the first two, but no.
    9. "Use smart indentation" is disabled by default. Shouldn't it be enabled by default, for continuity?
    10. If those "<style ID> does not apply due to <url>" console messages aren't useful anymore, can you remove them? Otherwise, can you collect 'em in a collapsed group?
      https://developer.chrome.com/devtools/docs/console-api#consolegroupcollapsedobject-object
    11. Style names are click targets in the popup menu; the cursor should be a pointer when you're over them.
      .style-name, .checker {cursor: pointer;}
    12. "Write new style" in the Style Manager won't open the editor in a new window.
    281 x 303 - 29K
  • You've done an excellent job fixing the flickering issue. Congrats & THANK YOU. In regards to the new way of handling iframes, it's more than a little flaky. Make a style for domain google.com: a{color:red !important;} and then browse styles on userstyles.org. It turns all the links red just because there's an iframe from google.com somewhere in the page. Having started out using Stylebot (which styles all iframes on domains a style affects but only while you're on that domain) I used to think having to style iframes separately was unnecessarily complicated (especially for beginners). Over time I've become so accustomed to it to it (and created so many ridiculous regexp's) that I don't look forward to the change. If it applied the style to all iframes (not just ones from the same domain) and only applied it while on that domain, I suppose it would be useful and more user-friendly. Right now it's a bit of mess.
  • edited February 2015 Chrome

    Back in dub-ya dub-ya two I became so accustomed to it to it I used to think having to style iframes separately was unnecessarily complicated ... we used to call it "ridin' the charlie-horse," and boy did it itch...

    It's a problem with the flickering fix. background.js should be including a frame ID when it pushes stylesheets to the content scripts. Instead, it's broadcasting the stylesheets to all frames in a tab.
    https://github.com/JasonBarnabe/stylish-chrome/blob/master/background.js#L5
    https://developer.chrome.com/extensions/webNavigation#frame_ids

    Unfortunately, you can't specify a frame ID until Chrome 41. (Today just keeps getting better, don't it Jason?) Until then, every style that targets an IFRAME will also splatter the top-level document.
    https://developer.chrome.com/extensions/tabs#method-sendMessage

    My advice is, drop match_about_blank, use a MutationObserver to shuffle stylesheets when IFRAMEs and STYLEs come and go, and revisit the issue after Chrome 41 is Stable.
    http://googlechromereleases.blogspot.com/
    ... Wait, you're still gonna have to skip the frames in webNavigation.onCommitted until Chrome 41 arrives. I do think match_about_blank should go, but it's a separable issue.
    chrome.webNavigation.onCommitted.addListener(function(data) {
    if (data.frameId !== 0) return;
    ...
  • Little Miss Sunshine might as well have said:
    Once again I would like to demonstrate how being a condescending know-it-all does not translate into being even remotely funny.

    I can take a joke but I prefer ones that make me laugh.

    As far as the iframes go, the way they're being handled is too screwy to evaluate. I can't even tell if they're supposed to be able to be regexped out. Not to mention that for big content providers like Google or various social media sites who inject iframes practically everywhere, regexping out rather than in could be a much bigger pain in the ass. The only way I see a feature like this adding any real value is if it styles iframes like the Disqus ones. Most comment section iframes have something unique to that particular site in the url that you can latch on to, but clicking on a profile usually brings up an iframe that does not. Grandpa Stylebot did handle those nicely.
  • Apologies. What you described is a bug in the new "flicker less" code, an important bug at that. It has nothing at all to do with the new "anonymous iframe" code which adds user styles to IFRAMEs without source URLs.

    That is why you were able to trigger the bug by adding a style to an IFRAME that did have a source URL. Stylish has always added user styles to IFRAMEs with source URLs. What is new, bug-wise, is that the styles added to any one of these IFRAMEs are also being added to the containing web page and to every other IFRAME in the page.

    Neither Stylish (1.2.2) nor Stylebot adds styles to IFRAMEs without source URLs. Whatever comparison you were trying to make is some other issue. If it's important to you, explain in detail what you want without assuming that anyone here has ever used Stylebot. If Disqus IFRAMEs are a problem, provide some example URLs of problem pages.

    Clear?
  • edited February 2015 Chrome
    When you said the bug was caused by the "flicker less" code I guess I wrongly assumed you meant it's interaction with the new iframe feature. In my experience Stylish has always had a kinda-sorta rendering of iframes. It usually applies background and text colors but links are styled randomly at best. Anything beyond that (hover effects, balloon tip backgrounds, etc.) is missing. In this new version I see no difference. Stylebot definitely does interact with iframes completely different than any other style extension. Here's a good example:

    Install my Torrentfreak style https://userstyles.org/styles/109932/torrentfreak-black-red-any-browser
    Go to Torrentfreak, click on any article, scroll to the bottom and click on "comments".
    Once it opens you can see that everything in the iframe is styled exactly like the rest of the domain.
    Open the style and copy/delete the regexp under section 1. Save and check out the difference .
    Add the regexp back and click on any profile which will bring up an iframe which has nothing unique to Torentfreak in it's url. The regexp is useless and Stylish ignores it by default.

    Copy the code from section 1 and drop it in a Stylebot style for domain torrentfreak.com. Not only will the style fully apply to the comments section but when you click on a profile the Disqus iframe that pops up will also have the style fully applied. I haven't fully styled it for obvious reasons but enough of it is there that you'll be able to tell that it works.
  • Applied hideheader's PR and it seems to fix the iframe-style-applied-to-containing-document issue.

    Styling file: URLs works fine, but "Find more styles" should be suppressed - it won't find any styles, it will only leak your local folder structure across the network.

    I'd rather keep it consistent. I did file this though to make the search work.

    I wonder if the subdomain links could be combined - forum.userstyles.org this URL - with highlighting changing with hover to show which subdomain will be targeted.

    I think that would be a bit too clever.

    Please restore the link; make it display:none if you like.

    Done.

    I was sure that the names in the popup menu would be sorted alphabetically.

    Also sorting the pop-up now.

    I prefer having the static links at the top of the popup menu.

    I think it's better to have the more important stuff (the existing styles) first.

    Detach an editor, open a second editor - second editor opens in its own window as advertised. Drag the second editor tab into the first editor's window, then open a third editor from the toolbar icon in the original window. I was hoping it would join the first two, but no.

    It's either "in a window on its own" or "as a tab in the current window".

    "Use smart indentation" is disabled by default. Shouldn't it be enabled by default, for continuity?

    It should've been, I just made a mistake in thinking an undefined would be a null. Fixed now.

    If those " does not apply due to " console messages aren't useful anymore, can you remove them?

    Done.

    Style names are click targets in the popup menu; the cursor should be a pointer when you're over them.

    They're checkbox labels, which by default have the normal arrow (at least in Linux).

    "Write new style" in the Style Manager won't open the editor in a new window.

    This is by design. The new window behaviour is limited to the pop-up.
  • edited February 2015 Chrome

    Q: file: URLs ... "Find more styles"
    A: I'd rather keep it consistent.
    OK, but the client shouldn't be sending folder structure. Maybe you could truncate it to file: and kill two birds with one stone.
    https://userstyles.org/styles/browse?search_terms=file:
    Q: I wonder if the subdomain links could be combined
    A: I think that would be a bit too clever.
    Not really. Breadcrumbs aren't new, nor is representing subdomains with breadcrumb-like links. In any case it can be done in a user style if the leftmost DNS label is an attribute of each subdomain link.
    Q: I prefer having the static links at the top of the popup menu.
    A: I think it's better to have the more important stuff (the existing styles) first.
    You'd think otherwise were your "Manage" link disappearing off the end of the menu like mine is [figure]. If you box up the three "action" links in a DIV it can done, more or less, in a user style. (I think.)
    Q: the cursor should be a pointer when you're over [style names].
    A: They're checkbox labels
    (Really hate the checkbox. A picture of a checkbox on .style-name::before would be easier to replace, and just as functional.) In fact they're clickable menu items, and right now there's no visual indication that they are. The other menu items are links, so cursor:pointer made sense to me, but if you want to keep cursor:default then maybe you can change the text color on :hover and :focus like Chrome does in Settings. (Oh Baegus, if only you'd been able to draw a check mark... [1])
    Q: Please restore the [enable/disable] link
    Q: console messages ...?
    A: Done. ... Also sorting the pop-up now.
    Thank you, thank you, and thank you.
    A: [The editor]'s either "in a window on its own" or "as a tab in the current window".
    Q: "Write new style" in the Style Manager won't open the editor in a new window.
    A: This is by design.
    It's fine, much better than before.
    image
  • edited February 2015 Firefox
    sorry for being impatient but when do you believe it will be release-grade material ?

    I'm running this build but explaining the installationprocess for chrome-friends because they want to stop being flashbanged by the flicker (dark/black themes) is somewhat painful plus chrome keeps on naging on you for potential harmful addon and tries to remove it.
  • I would estimate less than a week until b2, 2-3 weeks until release.
  • alright thanks for the update, both of them ;)
  • edited February 2015 Chrome
    Kurim said:

    explaining the installationprocess ... is somewhat painful

    To install a copy Stylish from Github,
    1. Find the revision you want at Github. That will probably be the current tip [1] or one of the releases [2]. (Apparently the tag fell off of 1.3.0b1.)
    2. Find the "Download ZIP" button and click it. The archive contains one folder - extract that folder (and its contents).
    3. Load the "Extensions" manager in Chrome ([menu] > More tools > Extensions) and enable "Developer mode".
    4. Click "Load unpacked extension..." and show Chrome the folder you just extracted.
    5. The next time Chrome starts it will offer to remove your unpacked extension(s). Click "Cancel" to keep using it.
  • almost exactly the same cept i tell them to download the crx or whatever and open the file with winrar at this step half of them are lost the other half click to uninstall it after they restart chrome and it warns them about harmful addon so yeaa.... easier to say "update will be out in about 3 weeks"
  • edited February 2015 Chrome

    Gotta say I like the new features!
    Keep up the great work!image

  • Styles from "Stylish 1.2.2" not available to "Stylish 1.3.0".

  • Replace the new (1.3.0) Stylish database with a copy of the old (1.2.2) Stylish database. If you intend to use both versions, replace it with a hard link to the old database.
    https://forum.userstyles.org/discussion/34466/how-to-backup-and-restore
  • Ok, so my skins seem to be having a strange issue on this new version of Stylish for chrome. All of my G+/Google skins would seem to impose themselves on gmail even though I do not have any code that goes to anything remotely gmail. I also see this doesn't happen on the official version of Stylish. Here's the list of domains and urls my skins cover. Hope this helps us figure out the problem. One more thing. The icon does not register as covering Gmail.

    @-moz-document url-prefix("https://plus.google.com"), domain("plus.google.com") {
    @-moz-document url("https://www.google.com/"), url-prefix("https://www.google.com/search"), url-prefix("https://www.google.f"), url-prefix("https://www.google.d"), url-prefix("https://www.google.s"), url-prefix("https://www.google.r"), url-prefix("https://www.google.j"), url-prefix("https://www.google.a"), url-prefix("https://encrypted.google."), url-prefix("https://www.google.com/webhp"), url-prefix("https://translate.google."), url-prefix("https://www.google.com/?gws")
    @-moz-document domain("talkgadget.google.com")
    @-moz-document url-prefix("https://plus.google.com/hangouts") {
    @-moz-document domain("docs.google.com") {

    Thanks again!
  • Sounds like the same bug in b1 mentioned previously in this thread. Supposedly it's been fixed for a couple weeks, but the link in this thread still hasn't been updated to a packed version of b2. There's Github if you feel like dealing with an unpacked version.
  • People seem to have discovered that this is open source and they can make changes too. Once I get through all the pending pull requests, I'll release b2.
  • edited March 2015 Chrome
    Sounds good to me. Regular Stylish has been crapping out and my users count on it working to use them. This is a much more workable version, Gmail excluded. Will this new build make its way into the chrome web store?
  • We need a names for a new Style Manager feature. The feature removes from view all but styles that are enabled, or all but styles you yourself created by clicking the "Write new style" button [figure]. The working names are
    • "Filters" for the feature itself,
    • "Only enabled styles" for the option to hide all but enabled styles, and
    • "Only my styles" for the option to hide all but styles you created with "Write new style"
    "Locally added styles", "Locally written styles", and "Non-tracked styles" have been suggested as names for the second option. Other suggestions (in any language)? Opinions?

    image
    1007 x 708 - 40K
  • edited March 2015 Chrome
    "Personal Styles"? It's very similar in a lot of common languages.
  • I favor "Only edited styles", since sooner or later that's what it should be.
  • That makes sense, especially if once you edit an installed style it switches over.
  • edited March 2015 Chrome

    The above suggestions of "My styles", "Edited styles", "Personal styles" seem to be specific to the style writers, which of course we are, but this is biased.

    A more neutral wording which would also reflect the actual state of affairs:

    1. Show:

      [ ] Only enabled styles

      [x] Auto-updated styles

      [x] Locally created styles

      That's a default config which would show all the items. Not sure though if all-checkboxes-cleared state should be allowed, maybe it'd be reasonable to attach a js handler to disallow unchecking of both #2 and #3.

    2. Show:

      [ ] Only enabled styles

      ---

      ( ) Only auto-updated styles

      ( ) Only locally created styles

      (•) Both

      This would be logical even without the above mentioned js-handler.

    Not sure whether Stylish-Chrome actually auto-updates the styles, so maybe the wording of corresponding items should be a little different.

  • Default Browser
    it will be cool if Stylish have and option to load css at document start like in Tampermonkey, or like Stylebot, i'm using Tampermonkey where is possible and Stylebot, because for example i set a global dark theme to all websites, and when i'm loading other page or in the same page there is a white splash, but with Tampermonkey or Stylebot it's ok
  • @drakulaboy, do you mean the first item mentioned in the changelog?

    Stylish now applies styles earlier, greatly reducing or eliminating "flicker".

Sign In or Register to comment.