MozillaZine

User CSS mode (like opera)

Discussion of features in Mozilla Firefox
dunda
 
Posts: 126
Joined: January 27th, 2003, 7:22 am

Post Posted March 18th, 2003, 4:24 am

The last thing I am really missing as an ex opera user is the user css mode where you could change the page to white background black text and standard coloured links etc.. It really helps on badly designed pages.

I found something in prefsbar where you can turn colors/fonts off but its not really the same, is there any way of achieving this?

thanks.

Thumper

User avatar
 
Posts: 8037
Joined: November 4th, 2002, 5:42 pm
Location: Linlithgow, Scotland

Post Posted March 18th, 2003, 6:26 am


alanjstr
Moderator

User avatar
 
Posts: 9100
Joined: November 5th, 2002, 4:43 pm
Location: Anywhere but here

Post Posted March 18th, 2003, 6:34 am

No, that's for alternative style sheets provided by the website. This topic has been discussed before, though.
Former UMO Admin, Former MozillaZine General Mod
I am rarely on mozillaZine, so please do not send me a private message.
My Old Firefox config files

seb

User avatar
 
Posts: 1578
Joined: November 4th, 2002, 11:26 pm
Location: Paris, France

Post Posted March 18th, 2003, 10:31 am

Add this bookmarklet to your bookmarks toolbar, and just click on it when you want to modify the CSS of a website.

(Kudos to the author of the bookmarklet, I forgot who he is)
Code: Select all
javascript:(function(){function update(){if(!x || x.closed){ ta.style.backgroundColor="#ddd";return;}try { x.bookmarkletStyleSheet; } catch (er){ta.style.backgroundColor="#fdc"; setTimeout(update, 150);dead=true;return;}if(dead){ dead=false;ta.style.backgroundColor="";oldCSS=null;}if(!x.bookmarkletStyleSheet){var newSS; newSS=x.document.createElement("link"); newSS.rel="stylesheet"; newSS.type="text/css"; x.document.documentElement.childNodes[0].appendChild(newSS); x.bookmarkletStyleSheet=newSS; oldCSS=null; x.bookmarkletStyleWindow=window;} if(oldCSS!=ta.value) { oldCSS=ta.value;x.bookmarkletStyleSheet.href="data:text/css,"+ta.value; } setTimeout(update, 150);} if(window.bookmarkletStyleWindow && !bookmarkletStyleWindow.closed) { bookmarkletStyleWindow.focus(); } else { var y;y=window.open('','','resizable,width=450,height=300'); y.document.write('<title>New CSS Style Sheet</title><body style="margin: 0px;"><form name="f" style="margin: 0px;"><textarea name="ta" wrap="hard" style="margin: 0px; border: 0px; width:100%; height:100%;">/* Type CSS rules here and they will automatically be\napplied to pages from '+location.host+'\nas long as you keep this window open. */\n\n\n </textarea><script>'+update+'dead=false; oldCSS=null; x=opener; ta=document.f.ta; if (x.bookmarkletStyleSheet)ta.value=x.bookmarkletStyleSheet.href.slice(14); ta.focus(); update();<'+'/script>');y.document.close();}})();
Last edited by seb on March 23rd, 2003, 2:20 pm, edited 2 times in total.

Jesse

User avatar
 
Posts: 398
Joined: November 4th, 2002, 7:00 pm
Location: Mountain View, CA

Post Posted March 18th, 2003, 7:06 pm

The bookmarklet is called <a href="http://www.squarefree.com/bookmarklets/webdevel.html">test styles</a>, and I am the author. (Btw, has anyone else noticed that this forum doesn't let you post links with # in them?)

sag

User avatar
 
Posts: 386
Joined: November 19th, 2002, 8:56 pm

Post Posted March 18th, 2003, 8:12 pm


goodben
 
Posts: 61
Joined: January 15th, 2003, 3:28 pm

Post Posted March 19th, 2003, 2:53 am

What is the CSS code to make a page look like this?

dunda wrote:The last thing I am really missing as an ex opera user is the user css mode where you could change the page to white background black text and standard coloured links etc.. It really helps on badly designed pages.

seb

User avatar
 
Posts: 1578
Joined: November 4th, 2002, 11:26 pm
Location: Paris, France

Post Posted March 19th, 2003, 3:04 am

Code: Select all
body {
 background-color:white !important;
}

* {
  color: black !important;
}

:link {
  color: blue !important;
}

dunda
 
Posts: 126
Joined: January 27th, 2003, 7:22 am

Post Posted March 19th, 2003, 3:22 am

I think it also removes background page images.

I couldnt get that bookmarklet to work but if it works for you I am no doubt doing something wrong and will try again.

Its still not up to opera though because when you click a link the colours will revert back.

I might end up using proximitron to do it but its not ideal..

Vigil
 
Posts: 71
Joined: January 28th, 2003, 2:40 am

Post Posted March 22nd, 2003, 11:39 pm

The ideal solution is to expand the alternate-stylesheet switcher extension to allow entries for user stylesheets also. These entries could be added and removed via the "Settings" dialog of the extension.

Allenz

User avatar
 
Posts: 788
Joined: December 12th, 2002, 5:44 am
Location: Atlanta, GA

Post Posted March 23rd, 2003, 9:47 am

I'm just curious. Is this page extremely wide for everyone or just me? I have to scroll forever to get to the right side of the page.

Chris Cook

User avatar
 
Posts: 898
Joined: December 14th, 2002, 9:57 am
Location: Québec, Canada

Post Posted March 23rd, 2003, 10:52 am

Allenz wrote:I'm just curious. Is this page extremely wide for everyone or just me? I have to scroll forever to get to the right side of the page.

It is because of the code that Netsabes posted. Perhaps he should change it to a link to the code instead.

seb

User avatar
 
Posts: 1578
Joined: November 4th, 2002, 11:26 pm
Location: Paris, France

Post Posted March 23rd, 2003, 11:01 am

Sorry. I added a few spaces here and there. It shoud display normally now.

Jesse

User avatar
 
Posts: 398
Joined: November 4th, 2002, 7:00 pm
Location: Mountain View, CA

Post Posted March 23rd, 2003, 2:10 pm

chris cook: It's also because this forum uses a table-heavy layout. Forums that use CSS layouts do not suffer from this problem. In a CSS layout, the long line would create a scrollbar, but other lines (and lines in other posts) would not be affected, so you would only need to use the horizontal scrollbar to read the post with the long line in it.

netsabes: The page is still a little wide for me (maximized Phoenix @ 800x600).

seb

User avatar
 
Posts: 1578
Joined: November 4th, 2002, 11:26 pm
Location: Paris, France

Post Posted March 23rd, 2003, 2:22 pm

Jesse wrote:netsabes: The page is still a little wide for me (maximized Phoenix @ 800x600).
And now?
(sorry, I'm using 1280*1024, I assumed it'd be fine in lower resolutions too)

Return to Firefox Features


Who is online

Users browsing this forum: No registered users and 0 guests