Stylish-Custom

edited March 25 in Stylish
this is an unofficial extension to Stylish (i'll help if i can, but my js is lacking)
Stylish-Custom Guide
GitHub
Files
changelog
AMO page

most features:
customizable edit dialog (drag n drop)
restores the !important button, Color/Site Rules menuitems, enable/update checks
Page button (left click for style page, right for edit page, it also posts the code. middle if you don't want to post code)
style info listing with quick enable toggle (dbl-click to edit style, can also search within styles)
import/export styles and stylish-custom settings
disable all styles then enable them afterwards
take snapshots of style statuses and restore them
adds search/replace to edit dialog (ctrl+F, ctrl+R, and F3)
press ! to type !important (can be changed in edit dialog)
select and un/comment/merge lines of text
discard preview

if anyone wants to do some translating (or just fork it on github)


if you wish to show your appreciation for this extension, please help jason keep the site going and donate
«13456781

Comments

  • Congrats, ChoGGi! I already wanted to recommend the same for Stylish 1.x vs. Stylish 0.5.9 (since otherwise the downgrade becomes quite temporary with automatic updates ASHAMED

    Add another advantage: We don't have to search for the URL through the entire thread when you made another update :p
  • ctrl+f searching is bit annoying.. i mean it doesn't work at all like a search should do... no way of ctrl+f typing something, enter.. enter... oh wtf its just cleared that previously highlited result.. aaargh

    it shouldn't do that.. focus is going away from the search box and it should just stay there if this is how this addon works.. also only case sensitive?

    and what are the Stylish-custom options about? Manage View options?
  • To save some trouble, you can use em:requires Stylish 1.0.* rather than specifying target apps.
  • Congrats ChoGGi, thank you!
    A couple of issues:
    first of all, congrats and thanks for the Disable/Enable option - just awesome (except it stalls Fx for 45+sec. on each of those options). Would be just perfect if after disabling all, it would be possible to enable/disable a few styles, then enable the original state of styles. That's what rawny's button is having troubles with.
    What is No preview for?
  • Posted By: makondoWhat is No preview for?
    What? Looks like ChoGGi picked Alois' request from here, huh? 8-)
  • edited May 2009
    I understand. I don't understand what the hype is about and why this button is necessary. What does it do? (appears, nothing here).
    It's really quite ... easy, Izzy ;-) - if i don't understand, i don't know what i'm missing and if i need it ;-)
  • "...display:none!important" if it hurts you /
  • I think you missed my point: ... if i don't understand, i don't know what i'm missing and if i need it ...
    So, nobody's willing to explain?
  • edited May 2009
    thanks guys (np thanks for the tip, i just copied the your install.rdf, but that works too :)
    just awesome (except it stalls Fx for 45+sec. on each of those options).
    yeah happens to me too, i guess too many styles?
    What is No preview for?
    if you press preview, but you want to temp disable the style you're writing press no preview (think i'm going to move it to the new button menu)
    ctrl+f searching is bit annoying
    i didn't make the code, just added it. i believe np mentioned added search to stylish, if not i'll see about working on it. i had an idea for focusing on the search word (btw f3 for find next). and yes case sensitive
    >Would be just perfect if after disabling all, it would be possible to enable/disable a few styles, then enable the original state of styles. That's what rawny's button is having troubles with.
    i think you can. it just restores the ones that were enabled beforehand?
    and what are the Stylish-custom options about? Manage View options?
    so far change the allowed domains and the manage view
  • edited May 2009
    Right:
    disable all, enable a few, do whatever enabling/disabling them at will. When done, enable all (meaning all that where enabled before you began all that. See. How would the ext. know which 'all' to enable at the end?)
    Oh, thanks for above explanation even though i still don't understand what 'manage view' means ;-)
    And, how to hide that No Preview button? The editor disappears on a DOMi click... TIA!
  • makondo: Manage view is to tell Stylish where to open (stand-alone, sidebar, addons). But don't ask me which value for what - it's 0..2, just try :p

    ChoGGi: To make it clearer, maybe you want to rename "disable/enable" to "disable/restore (state)"? As for the Ctrl-F: Yes, I understood Jason the same way (that he wants to add it).

    Regarding the 45s: Just pressing "Preview" (which is for one style) takes about 5s here as well...
  • disable all, enable a few, do whatever enabling/disabling them at will. When done, enable all (meaning all that where enabled before you began all that. See. How would the ext. know which 'all' to enable at the end?)
    i think it keeps a list, but not really sure about that, have you tried?
    And, how to hide that No Preview button?
    #DisablePreview{display:none}
    maybe you want to rename "disable/enable" to "disable/restore (state)"
    alright
  • edited May 2009
    ChoGGi, i need the whole code, please. I don't have any styles for the editor window and will have to write one (which i have no idea how to even begin!).
    As for the D/E - it's a mess!
    First of all, there's 'Turn all styles off' (under statusbar icon menu in my set up). But then we also have Disable/Enable all styles which seems to be only accessible from the editor window/Tools dropdown. Which means i have to click 'write style' before i can disable all styles?
    But the function itself did work for me all right - tested a few times - which is great!!
    So, i think i'd like to have a Disable/Enable all styles button in my sidebar bottom bar, right next to the Write button (which is first in my setup). Or on the top bar, next to the search bar. Have an idea how to do that?

    Izzy, i have no problems with any buttons except for D/E taking that long and stalling Fx totally - i think it's because the file is too large. Fx also choks on large copy/paste chunks here, i'm not surprised (i remember a few years ago you were lucky if it worked for you at all!).
    And the Manage view - thanks for the explanation, i guess i don't care. Mine is set to 1, i think it's default? don't remember now and don't care. I use ... you've guessed it! a CB to open it in the sidebar. other than that, it opens in window and i can also access it from addons tab. Geeze!.. stylish everywhere!
  • Tested a bit more.
    Let's say you have 3 styles of which 2 are disabled and 1 is enabled. You disable all styles, then enable #1 & 2. Now click Enable all. The first 2 will be enabled also. So, you have to remember if you're enabling disabled styles and disable them before clicking Enable for the last time.
    Other than that (and taking 45sec. to disable or enable) it works fine.
  • Posted By: makondoChoGGi, i need the whole code, please...
    NM! i'm an idiot!
  • Stylish-Custom-0.0.2.xpi
    missed some text to add to dtds
    changed enable/disable styles to say disable/restore rules (and some tooltips)
    added statusbar/toolbar buttons to enable/disable styles (statusbar icon can be hidden in options)
    Posted By: makondoLet's say you have 3 styles of which 2 are disabled and 1 is enabled. You disable all styles, then enable #1 & 2. Now click Enable all. The first 2 will be enabled also. So, you have to remember if you're enabling disabled styles and disable them before clicking Enable for the last time.
    the js basically adds an attribute to enabled styles say it was disabled, then disables it, then when you use restore it only enables the styles with that attribute
  • And I guess makondo is missing this additional step: On disable, already disabled styles get an attribute that they have been disabled before. On restore, these get disabled (in case they had been enabled in the meantime) and, of course, that attribute removed again. So this functionality would really restore to the previous state. If you think about implementing it like that, it's almost like the snapshot version discussed in the other thread - and would make that almost obsolete |-)
  • edited May 2009
    ChoGGi, thanks for the update!
  • Posted By: makondoHuh?
    Just a suggestion - not describing an existing feature :p
  • edited May 2009
    Stylish-Custom-0.0.3.xpi
    esc to close manage window (only for standalone window)
    added comment/uncomment buttons (select some text then press comment to add /**/ to it, like so: selected text => /*selected text*/ )
    Posted By: IzzySo this functionality would really restore to the previous state. If you think about implementing it like that, it's almost like the snapshot version discussed in the other thread - and would make that almost obsolete|-)
    i'll see about it, but don't hold your hopes up
  • Can you add a shortcut key for !important; :)
  • Stylish-Custom-0.0.4.xpi
    disables previously disabled styles after you restore disabled styles
    Posted By: RexelCan you add a shortcut key for !important; :)
    press toggle and enable auto!important (default is ; you can change it)
  • Thanks for the update, ChoGGi! Love that 'Comment/Uncomment' button! Thanks for bringing it up, Barbiegirl!
  • Posted By: ChoGGi
    Posted By: IzzySo this functionality would really restore to the previous state. If you think about implementing it like that, it's almost like the snapshot version discussed in the other thread - and would make that almost obsolete|-)
    i'll see about it, but don't hold your hopes up
    Whenever it fits you. I never needed it yet, but it may come in handy. Take your time! Beer
  • @Izzy i added it to 0.0.4
    if you have disabled/enabled styles and you disable all it marks the disabled ones, then if you enable a disabled one it'll be disabled after you restore the styles
    is that what you wanted?
  • edited May 2009
    It works all right, ChoGGi (and Izzy). The only thing is ... it now takes 90+sec. for each option. While i think it's one of the most useful features in Stylish, hopefully it won't be needed too often and i can set aside a scheduled day when i won't need to use Fx (do laundry or something).
    decompression sickness
  • it has to write to the database for each style, i'd guess that's why it takes so long?
  • ChoGGi: Just a little request: I guess Stylish-Custom is just installed on top of Stylish. For many of us this is only logical, since we followed the development of your marvellous extension from the beginning - but for "new users" it might be worth mentioning that fact on your Stylish-Custom page?
  • i added a readme, but not like anyone is going to read it :)
Sign In or Register to comment.