Stylish 0.2.1 (Now with repository!)

Talk about add-ons and extension development.
Locked
User avatar
Schrade
Posts: 1187
Joined: March 17th, 2004, 12:24 am

Post by Schrade »

Just wanted to say I love this extension, thanks a ton np!
"Linux is for those who hate Windows, BSD is for those who love Unix." -Some Guy
Try my themes: QuBranch and QuTrunk
Fix Firefox's Resized image scrolling speed: <b>Bug 163975</b>
Jesse
Posts: 398
Joined: November 4th, 2002, 7:00 pm
Location: Mountain View, CA
Contact:

Post by Jesse »

Nice extension. Planning to add it to addons.mozilla.org and/or enter the extension contest?

Feature requests:
* Instant apply, at least for new scripts, so I don't have to use a separate tool (test styles) when testing a new user stylesheet.
* Site management (like Greasemonkey) so I don't have to remember the -moz-document syntax.
* Separate lists for chrome and content. While most chrome is XUL and most content is HTML, some content is XUL and some chrome is HTML.
* An easier way to edit a script than going to extension manager, double-clicking Stylish, selecting the script, and clicking Edit.
* The "enabled" column should be checkboxes / cyclers, so clicking there enables or disables the stylesheet.
* Double-clicking elsewhere in the list should open the Edit window for that stylesheet.
* Tell me when I have CSS errors. (I don't think this would be too hard to do. CSS errors show up in the JavaScript console when a stylesheet is enabled, although I'm not sure that happens by default. If there's no specific interface for getting information about CSS errors, you could watch for errors appearing in the console service while you're adding a stylesheet.)

Bugs:
* If I show the "code" column, line breaks are shown as squares (on WinXP). This is most visible for the "disable marquee" stylesheet. I think the line breaks should be stripped out for that column.
* If I click "Delete", all the stylesheets below the selected one disappear too! They aren't actually deleted, though.

I'm using a trunk build of Firefox: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20051203 Firefox/1.6a1
old np
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old np »

Jesse wrote:Planning to add it to addons.mozilla.org and/or enter the extension contest?

When I make 0.2, yes. (I plan on starting on 0.2 once I'm done fixing bug 109481.)

Jesse wrote:(features and bugs)

Yeah, most of those I plan on doing and were talked about earlier in the thread.
beej
Posts: 4
Joined: October 20th, 2003, 3:08 am

related to bug 208641

Post by beej »

np: this is related to <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=208641">mozilla bug 208641</a>. maybe you can fix that bug when you have nothing better to do ;)

thanks for the great extension!

marc
hostile17
Posts: 10
Joined: January 22nd, 2005, 9:00 pm

Post by hostile17 »

I love this extension too, it's literally exactly what I was looking for.

There's only one problem -- it doesn't seem to take effect automatically for me.

I'm on 1.5 on Mac:

Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8) Gecko/20051111 Firefox/1.5

and when I start up, the site whose CSS I'm trying to override has reverted. I have to open up the preferences for Stylish, disable and re-enable. Any idea why that is or how I can avoid it?
old np
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old np »

beej wrote:np: this is related to <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=208641">mozilla bug 208641</a>. maybe you can fix that bug when you have nothing better to do ;)

I don't think they're going to implment any changes for that bug. They'll say "get an extension".

hostile17 wrote:There's only one problem -- it doesn't seem to take effect automatically for me.

I'm on 1.5 on Mac:

Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8) Gecko/20051111 Firefox/1.5

and when I start up, the site whose CSS I'm trying to override has reverted. I have to open up the preferences for Stylish, disable and re-enable. Any idea why that is or how I can avoid it?

So the styles take effect when you add or enable them, but don't on startup? Does anything come up in the Javascript Console? If you run Firefox from the command line, do you get any errors? I don't have access to a Mac.
hostile17
Posts: 10
Joined: January 22nd, 2005, 9:00 pm

Post by hostile17 »

Thanks for your response.

Everything is working fine now following a restart of the computer, so I guess it's going to be one of those mysteries now I can't reproduce it.

Couple of other things:

* Double-clicking on the style feels like it should be a short-cut for "Edit".

* If I go to the extensions list and double-click on Stylish, I get the Manage Styles window. If I repeat it, I get *another* ManageStyles window, as many times as I want. I don't know if that will cause technical problems, but it's confusing the Firefox "Window" menu.
old np
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old np »

hostile17 wrote:If I go to the extensions list and double-click on Stylish, I get the Manage Styles window. If I repeat it, I get *another* ManageStyles window, as many times as I want. I don't know if that will cause technical problems, but it's confusing the Firefox "Window" menu.

https://bugzilla.mozilla.org/show_bug.cgi?id=320320
Motohiko
Posts: 65
Joined: November 22nd, 2003, 8:05 pm
Location: Japan
Contact:

Re: Stylish 0.1.1 Released [Oct 11]

Post by Motohiko »

Hello. Thank you for your nice extension!

I'm currently working on:
np wrote:Possible future features
* Import userChrome.css and userContent.css


I want to contribute the code, is it possible?


Current coding style strongly depends on code orders.
Objective JS code style is good for us. I don't know good resource written in English, there is a good examples in Mozilla code tree. Please see nsSidebar.js.

Should be like this:

Code: Select all

function Stylish() {
this.datasourceURI = this.getDatasourceURI();
...
}

Stylish.prototype.getDatasourceURI = function() {
...
}
...
var stylish = new Stylish();


Sorry for my funny English. Thank you.
old np
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old np »

Yes, I welcome any contributions. I'm actually nearing completion of v0.2. You can find the current code here.
As for the code style being currently used, I don't see much gain in switching to prototype-style objects. If you want to discuss further, e-mail me so we don't bore the people in this thread.
User avatar
BenBasson
Moderator
Posts: 13671
Joined: February 13th, 2004, 5:49 am
Location: London, UK
Contact:

Post by BenBasson »

Object oriented style code is only a benefit if you're using things that logically group into objects. Writing code with lots of functions (i.e. modularly) is nice and easy without worrying about templates.
old np
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old np »

It's not OO vs not we're discussing... it's

Code: Select all

function Stylish() {
  this.foo = function() {
  return bar;
  }
}
vs

Code: Select all

function Stylish() {}
Stylish.prototype.foo = function() {
  return bar;
}
User avatar
BenBasson
Moderator
Posts: 13671
Joined: February 13th, 2004, 5:49 am
Location: London, UK
Contact:

Post by BenBasson »

Oh. Yeah, I don't see the difference in terms of practicality. I go for the latter because I want to make the constructor function clearly separated from the rest of the prototype/class.
User avatar
Schrade
Posts: 1187
Joined: March 17th, 2004, 12:24 am

Post by Schrade »

np, can you make it so that the Stylish list sorts when you click on a column title?
"Linux is for those who hate Windows, BSD is for those who love Unix." -Some Guy
Try my themes: QuBranch and QuTrunk
Fix Firefox's Resized image scrolling speed: <b>Bug 163975</b>
old np
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old np »

I'll try, but it's a low priority compared to other things. I'm definitely releasing 0.2 before the contest deadline (Jan 6).
Locked