Stylish 0.2.1 (Now with repository!)

Talk about add-ons and extension development.
Locked
old np
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old np »

Is there a Bugzilla bug for this? If not, can you file one?
vinc17
Posts: 31
Joined: July 17th, 2005, 2:25 pm
Location: Lyon, France
Contact:

Problem with sourceforge.net

Post by vinc17 »

I've added the following style:

Code: Select all

@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document domain("sourceforge.net") {
  pre { font-size: medium; }
}

But it doesn't apply automatically on SourceForge, e.g. https://sourceforge.net/tracker/index.php?func=detail&aid=1180993&group_id=67789&atid=518973
(see the comments in big characters). After the page has been loaded, I need to disable the style (from the status bar) and re-enable it.
Motohiko
Posts: 65
Joined: November 22nd, 2003, 8:05 pm
Location: Japan
Contact:

Post by Motohiko »

np wrote:Is there a Bugzilla bug for this? If not, can you file one?

I've filed new one.
Bug 323014 - Add RDF node fails after removing all of nodes
# sorry for funny English.


EDIT (Jan 12):
OK. This patch resolves the issue. Trust me.
EDIT (Jan 20): removed

The library 'rdfds.js' has a bug about this; there is no code to unregister datasource by using nsIRDFService::UnregisterDataSource method.
Last edited by Motohiko on January 19th, 2006, 10:56 pm, edited 2 times in total.
Motohiko
Posts: 65
Joined: November 22nd, 2003, 8:05 pm
Location: Japan
Contact:

Re: Problem with sourceforge.net

Post by Motohiko »

vinc17 wrote:I've added the following style:

Code: Select all

@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document domain("sourceforge.net") {
  pre { font-size: medium; }
}

But it doesn't apply automatically on SourceForge, e.g. https://sourceforge.net/tracker/index.php?func=detail&aid=1180993&group_id=67789&atid=518973
(see the comments in big characters). After the page has been loaded, I need to disable the style (from the status bar) and re-enable it.
Please refer the release announcement.

np wrote:Known issues
(snip)
* Instant apply has a slightly different priority than normal apply. As long as you use !important, it shouldn't be a problem.


Adding '!important' to the rule will resolve your question.
User avatar
Thumper
Posts: 8037
Joined: November 4th, 2002, 5:42 pm
Location: Linlithgow, Scotland
Contact:

Post by Thumper »

bump. This extension is complete and utter crack: I have something like 60 style sheets now.

Bug reports and RFEs later.

- CHris
old np
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old np »

Motohiko wrote:OK. This patch resolves the issue. Trust me.

This patch causes a bug... If you edit a style (change its name) it'll work the first time, but not subsequent times.
User avatar
coolynx
Posts: 61
Joined: July 11th, 2003, 4:29 am
Location: Riga, Latvia
Contact:

Post by coolynx »

While you are fighting with bugs...
Feature request:
1. Possibility to put Stylish icon on the Navigation toolbar via Customize.
2. Export and Import styles in xml or similar format
old np
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old np »

CooLynX wrote:Export and Import styles in xml or similar format

stylish.rdf in the profile folder contains all the info.
User avatar
coolynx
Posts: 61
Joined: July 11th, 2003, 4:29 am
Location: Riga, Latvia
Contact:

Post by coolynx »

I was thinking about something more advanced - export only selected styles and import from .rdf or .xml file new rules that will be added to the list. stylish.rdf is good for backup but not for sharing. ;)
********
Posts: 947
Joined: August 24th, 2005, 12:23 pm

Post by ******** »

CooLynX wrote:I was thinking about something more advanced - export only selected styles and import from .rdf or .xml file new rules that will be added to the list. stylish.rdf is good for backup but not for sharing. ;)


something like Greasemonkey's user.js format, right?

maybe the stylesheets could be exported as CSS files, but with comments as the beginning with the title and other attributes.

that could also be imported with information.

I'm thinking this would require a major-recoding of Stylish, but it would be useful.

But what would be even more useful would be a userscripts.org like repository.

if userstyles.org isn't registered (I think it isn't), you could use that.

btw, np: I found something about stylish: http://www.squarefree.com/2006/01/15/stylish/
old np
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old np »

CooLynX wrote:I was thinking about something more advanced - export only selected styles and import from .rdf or .xml file new rules that will be added to the list. stylish.rdf is good for backup but not for sharing. ;)

What I have in mind for the repository would let you easily submit your code to it, and then you could share it at will.

desertfox wrote:something like Greasemonkey's user.js format, right?

maybe the stylesheets could be exported as CSS files, but with comments as the beginning with the title and other attributes.

desertfox wrote:But what would be even more useful would be a userscripts.org like repository.

if userstyles.org isn't registered (I think it isn't), you could use that.

This is exactly what I'm planning.

desertfox wrote:btw, np: I found something about stylish: http://www.squarefree.com/2006/01/15/stylish/

Nice, thanks.
Motohiko
Posts: 65
Joined: November 22nd, 2003, 8:05 pm
Location: Japan
Contact:

Post by Motohiko »

np wrote:This patch causes a bug... If you edit a style (change its name) it'll work the first time, but not subsequent times.
I can confirm it. Try this (diff v.s. stylish.js of v0.2):

Code: Select all

--- content/stylish.js.bak   2005-12-29 12:56:22.000000000 +0900
+++ content/stylish.js   2006-01-17 20:59:58.000000000 +0900
@@ -97,7 +97,6 @@
          stylishCommon.toggleNodeDisable(node, false);
       }
       stylishCommon.ds.save();
-      stylishCommon.ds.refresh(true);
    }
 
    //open the add dialog
@@ -195,7 +194,6 @@
 
       //save rdf file
       stylishCommon.ds.save();
-      stylishCommon.ds.refresh(true);
       window.close();
    }
 
@@ -222,17 +220,6 @@
          stylishCommon.ds.deleteRecursive(node);
       }
       stylishCommon.ds.save();
-      stylishCommon.ds.refresh(true);
-
-      //XXX there's a bug somewhere that deleting a style will make all the styles below it not display. to work around this, refresh the tree
-      //remember scroll position. don't remember selection, because everything selected will have been deleted!
-      var topVisibleRow = this.getTopVisibleRow();
-
-      //refresh
-      document.getElementById("styles").datasources = "rdf:null";
-      stylish.manageInit();
-
-      setTimeout("stylish.setTopVisibleRow(" + topVisibleRow + ")", 100);
    }
 
    this.styleListKeyPress = function(aEvent) {
Seems there is no need to refreshing and unregistering datasource.


And np, I got these warnings:
警告: reference to undefined property document.xmlns
ソースファイル名: chrome://stylish/content/stylish.js
行: 401
警告: reference to undefined property document.documentType
ソースファイル名: chrome://stylish/content/stylish.js
行: 401
User avatar
Philip Chee
Posts: 6475
Joined: March 1st, 2005, 3:03 pm
Contact:

Post by Philip Chee »

Motohiko wrote:And np, I got these warnings:
警告: reference to undefined property document.xmlns
ソースファイル名: chrome://stylish/content/stylish.js
行: 401
警告: reference to undefined property document.documentType
ソースファイル名: chrome://stylish/content/stylish.js
行: 401
FYI: The wwwjdict says:
警告 【けいこく】 (n,vs) warning; advice; (P)
ソースファイル (n) source file
名 【な】 (n) name; reputation; (P)
行 【ぎょう】 (n) (1) line; row; (2) verse; (P)

Phil
Last edited by Philip Chee on January 17th, 2006, 9:53 am, edited 1 time in total.
old np
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old np »

When do you get those warnings?
User avatar
Thumper
Posts: 8037
Joined: November 4th, 2002, 5:42 pm
Location: Linlithgow, Scotland
Contact:

Post by Thumper »

For the sake of my sanity at work, have you had a look at tables not getting properly styled on refresh? And could you change the default edit font to monospace?

- Chris
Locked