Dear All,
To make BoingBoing's crappy 1997-style HTML look tolerable: install URI id, then add this to your ~/.mozilla/firefox/[jumbly stuff]/chrome/userContent.css file:
body#www-boingboing-net, body#www-boingboing-net * { /* Or however you like it: */ background-color: black !important; color: white !important; font-size: 20px !important; } body#www-boingboing-net td[width="125"], body#www-boingboing-net td[width="150"], body#www-boingboing-net td[width="800"][height="90"] { display: none; }Then restart Firefox for the change to take.
CSS is fun.
You have a problem with black text on a white background?
Re:The eye of the beholder
TorgoX on 2005-08-19T22:46:16
No, it's mostly the blindingly small font size that got me to write this. While I was at it, I just up and changed the font size, and killed the inane graphics.Re:The eye of the beholder
n1vux on 2005-08-19T22:54:30
Ah.
Way too many websites have *fixed* widths wider than standard printer margins (e.g., Catalyst.org's Trac wiki) and fixed font sizes so the VIEW|FONT menu doesn't work. You shouldn't have to drop into CSS to fix these, if people followed usability / accessibility standards, we would just set our browser preferences to "Old Eyeballs" or "Young Eyeballs" and all would be fine...
Cheers!
More curiosity than anything else, but is there a specific reason for why you're using userContent.css instead of a quickie GM script ?
It's probably my lack of familiarity with the chrome stuff and also my reluctance to mess with Firefoxy internal files speaking.
Re:greasemonkey?
TorgoX on 2005-08-20T05:34:53
I'm just more at home with that CSS stuff than GreaseMonkey.Re:greasemonkey?
TorgoX on 2005-08-20T19:50:01
BTW, how would you (or you! or you!) do this as a little GreaseMonkey script?Re:greasemonkey?
tinman on 2005-08-22T14:48:55
Uh, I just whipped this up, so I'm not entirely sure if it's according to spec (tell me if it isn't etc). Behold, TorgoBoing 0.1
// TorgoBoing
// ==UserScript==
// @name torgoboing
// @namespace http://diveintogreasemonkey.org/download/
// @description What usercontent.css can do, Greasemonkey can do too
// @include http://*boingboing.net/*
// ==/UserScript==
function addGlobalStyle(css) {
var head, style;
head = document.getElementsByTagName('head')[0];
if (!head) { return; }
style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = css;
head.appendChild(style);
}
/*
These work for removing the sidebars, but I want page widening too
--------------------------------------------------------------------------- ---------------
addGlobalStyle('#sidebar-a { display: none }');
addGlobalStyle('#sidebar-b { display: none }');
*/
// some of us like the content to take up the entire browser window. Adjust to taste.
// addGlobalStyle('#content { width: 1200px; !important }');
addGlobalStyle('body { font-size: 20px; background-color: black; color: white; !important }');
var allTDs, thisTD;
allTDs = document.evaluate('//td[@width=125]', document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
for (var i = 0; i < allTDs.snapshotLength; i++) {
thisTD = allTDs.snapshotItem(i);
thisTD.style.display = 'none';
}
It's all stuff from the cookbook (http://diveintogreasemonkey.org/patterns/)Re:greasemonkey?
tinman on 2005-08-22T19:20:18
I suppose I should provide some explanation
:) Oh, bother. Setting the sidebar divs to not display was my first choice, since that's the ugly part of the page. I also have a preference for having the page content take up the entire screen width, so I did my page widening hack. Hardcoding the pixel size is bad, I know
:( Was too lazy to figure out a nicer way to do it. This is how I would have done it myself. I commented all of that out ultimately and replicated your usercontent.css logic though.
Re:greasemonkey?
TorgoX on 2005-08-22T20:40:21
Wow, this is great! Thanks!For some reason I thought adding stylesheets at "runtime" like this wouldn't work, but obviously it works just fine.
You're a superstar!