Stylish 0.2.1 (Now with repository!)

Talk about add-ons and extension development.
Locked
User avatar
XerBlade
Posts: 865
Joined: October 4th, 2005, 10:45 pm
Location: Nashville, TN, US

Post by XerBlade »

dougeeebear wrote:
cyberrus wrote:but why you want to have the same icon for diffrent windows??? they should be distiguished with diffrent icons - it helps when you have few style edit dialogs and all styles window opened at the same time

The style manager itself has its own window title "Manage Styles".
Each open editor window has its own style's description as its title.
They're pretty easy to find unless you have so many windows open they get "scrunched up" on the tray.

And that, in Windows XP/2000/a few others, still only happens if you have "Group similar taskbar buttons" disabled.
User Agent
Extensions
AMD64/2.41GHz RAM/1.0GB ATI/256MB-GDDR3/128-bit/8xAGP Cable6.0M/384kbps
old np
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old np »

desertfox wrote:could you post the code to open the stylish sidebar?

Code: Select all

toggleSidebar("viewStylishSidebar");

Complicated, no?

Search on userstyles.org works again. I had changed it to make prettier URLs but missed a variable.
User avatar
cyberrus
Posts: 144
Joined: October 15th, 2004, 5:42 pm
Location: Wroclaw, Poland

Post by cyberrus »

dougeeebear wrote:
cyberrus wrote:but why you want to have the same icon for diffrent windows??? they should be distiguished with diffrent icons - it helps when you have few style edit dialogs and all styles window opened at the same time

The style manager itself has its own window title "Manage Styles".
Each open editor window has its own style's description as its title.
They're pretty easy to find unless you have so many windows open they get "scrunched up" on the tray.


i know that they have difrent titles but much more convenient is having diffrent icons for diffrent windows
User avatar
dougeeebear
Posts: 548
Joined: September 15th, 2005, 4:17 pm

Post by dougeeebear »

np, small request...

In the Manage Styles window, the link to userstyles.org opens it in a new window.
Also, after installing a style from userstyles.org, the editor's link to Visit this style's website opens it in a new window.

Since I am a single-window user, I would much rather have these links open in a new tab instead.

Note that "Find Styles for this URL..." does open in a new tab and not a in new window.
old np
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old np »

Whatever's happening is the default behaviour for XUL links. I believe at home on my trunk build it respects my tab preferences. I can't use the same code as the Find Styles menu item because that requires a certain function in browser.js. I would have to load browser.js for the Manage window, which would suck and obviously wouldn't work for Thunderbird.

Ideally, I'd want Find Styles to respect tab preferences too.
User avatar
dougeeebear
Posts: 548
Joined: September 15th, 2005, 4:17 pm

Post by dougeeebear »

I have my tab preferences set to open links in a new tab.
Would be nice, but it's not a real big deal.

Maybe desertfox can come up with a userChrome.js hack that would do that :)
********
Posts: 947
Joined: August 24th, 2005, 12:23 pm

Post by ******** »

i wrote a userChrome.js script to make right-clicking the stylish statusbar icon open/toggle the stylish sidebar:

Code: Select all

stylishBrowserOverlay.handleStatusClick = function(event) {
   if (event.target.id == "stylish-panel") {
         // manage styles...
      if (event.button == 2) {
         // in sidebar on right-click
         toggleSidebar("viewStylishSidebar");
      } else if (event.button == 1) {
         // in window on middle-click
         stylishBrowserOverlay.openManageStyles();
      }
   }
}


@dougeebear: i'm still waiting for zeniko's reply on whether it's possible to apply scripts to other windows and dialogs using userChrome.js
Zoolcar9
Posts: 2225
Joined: November 9th, 2004, 6:45 pm
Location: Jakarta, Indonesia (UTC+7)
Contact:

Post by Zoolcar9 »

Code: Select all

document.getElementById("stylish-panel").setAttribute("onclick", "if(event.target.id == 'stylish-panel') { if (event.button == 2) { stylishBrowserOverlay.openSidebar(); } else { if (event.button == 1) { stylishBrowserOverlay.openManageStyles(); }}}");

My Firefox information | Add-ons | GitHub

"With great power, comes great desire to show it off."
********
Posts: 947
Joined: August 24th, 2005, 12:23 pm

Post by ******** »

@ZoolCar9:
different approach, same result.
get rid of the line breaks and spaces in mine, and it's about the same length.
would yours be better in any way, though?
Zoolcar9
Posts: 2225
Joined: November 9th, 2004, 6:45 pm
Location: Jakarta, Indonesia (UTC+7)
Contact:

Post by Zoolcar9 »


It's only <a href="data:application/x-javascript;charset=utf-8;base64,ZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoInN0eWxpc2gtcGFuZWwiKS5zZXRBdHRyaWJ1dGUoIm9uY2xpY2siLCAiaWYoZXZlbnQudGFyZ2V0LmlkID09ICdzdHlsaXNoLXBhbmVsJykgeyBpZiAoZXZlbnQuYnV0dG9uID09IDIpIHsgc3R5bGlzaEJyb3dzZXJPdmVybGF5Lm9wZW5TaWRlYmFyKCk7IH0gZWxzZSB7IGlmIChldmVudC5idXR0b24gPT0gMSkgeyBzdHlsaXNoQnJvd3Nlck92ZXJsYXkub3Blbk1hbmFnZVN0eWxlcygpOyB9fX0iKTsg">one line</a>.

My Firefox information | Add-ons | GitHub

"With great power, comes great desire to show it off."
old np
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old np »

I've uploaded a new version that fixes the subdomain install issue (www.userstyles.org also redirects to userstyles.org now), the right-click edit issue, and the manage window not refreshing issue.

Anything else outstanding other than the TB overlay?
User avatar
Lee_Dailey
Posts: 14194
Joined: July 27th, 2004, 4:33 pm
Location: milky way galaxy, sol system, terra, north america, usa, tx, bedford

Post by Lee_Dailey »

howdy y'all,

i just pointed a new user at stylish and the very first thing asked was how to install it into tbird. [*grin*] so i pointed out the tbird install instructions on amo right beneath the install/download link.

the next q was "how to use the snippets on the website?".

i know that v03 will have an install button, but i can't find a set of instructions on how to install a snippet when one is given a link to a style in userstyles.org to install. _is_ there an instruction page?

for now, i just listed out the steps. however, it would be nifty to have a set of "official" instructions ... [*grin*]

take care,
lee
bsder
Posts: 3
Joined: April 21st, 2006, 2:15 am

Use stylish to completely reset to CSS defaults

Post by bsder »

My apologies for the newbie question. I did some digging on Google and userstyles.org, but didn't see an obvious answer to my question:

How do I use Stylish to just ignore all CSS from a site completely?

What I want to do is force a really obnoxious site into submission by resetting everything to the defaults and then either A) letting only those elements through which are useful or B) just using my own CSS styles

Is there a wildcard to force back to default? I don't want to have to specify things explicitly because there are *thousands* of individual little styles to override. It must have been generated by some design program.

Please feel free to call me an idiot and point me at a FAQ or TFM. Or feel free to call me an idiot and point out that Stylish isn't the way to do this, I should use procedure XYZ. I would welcome any information as I just can't seem to find it.

Thanks.
User avatar
dougeeebear
Posts: 548
Joined: September 15th, 2005, 4:17 pm

Post by dougeeebear »

Just trying different things out, I just tried to install a style I had installed before and then deleted.
The button had changed from "Install" to "Update" and when I hit Save, I got this popup alert dialog box message:

TypeError: node.getTarget("urn:stylish#code") has no properties

I have installed/deleted/reinstalled some other styles and didn't have that issue.

I'm thinking maybe there's a remnant left from the original install that didn't get deleted.

EDIT:
I found it... there was leftover code:

Code: Select all

  <RDF:Description RDF:about="http://userstyles.org/style/show/127"
                   stylish:urlPrefix="http://userstyles.org/style/" />

I removed the code, and installed the style again with no problem (this time the button said "Install")

Then after deleting the style, and installing it again, It did the same thing again.
I had to manually delete the code again.
old np
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old np »

Lee_Dailey wrote:i know that v03 will have an install button, but i can't find a set of instructions on how to install a snippet when one is given a link to a style in userstyles.org to install. _is_ there an instruction page?

There's an instruction page on how to install into Firefox, but not Thunderbird. I should probably include Thunderbird instructions.
bsder wrote:What I want to do is force a really obnoxious site into submission by resetting everything to the defaults and then either A) letting only those elements through which are useful or B) just using my own CSS styles

a) View -> Page Style -> No Style
b) I believe when you set it to No Style that Stylish styles will still work. Not sure, though.
Locked