Note
The following things work for Opera and Firefox with Greasemonkey. I don't know how to do it for IE, nor do I care to find out how it should be done in IE.
The Problem
I'm sure I'm not the only one who's annoyed at the fixed width of GW which leaves a LOT of useless whitespace on widescreen and high-res screens. The following pieces of code will solve this problem, and, in addition, I'll give you a piece of code that will also allow you to change the background colour of GW if you dislike the current one.
How to install
Pretty simple, for Opera copy it into a file named gw.js and place it in the user javascript folder, and for FF add it to greasemonkey.
The Code
The following things work for Opera and Firefox with Greasemonkey. I don't know how to do it for IE, nor do I care to find out how it should be done in IE.
The Problem
I'm sure I'm not the only one who's annoyed at the fixed width of GW which leaves a LOT of useless whitespace on widescreen and high-res screens. The following pieces of code will solve this problem, and, in addition, I'll give you a piece of code that will also allow you to change the background colour of GW if you dislike the current one.
How to install
Pretty simple, for Opera copy it into a file named gw.js and place it in the user javascript folder, and for FF add it to greasemonkey.
The Code
// ==UserScript==
// @name Gateworld Widescreen
// @namespace http://forum.gateworld.net/
// @include http://forum.gateworld.net/*
// ==/UserScript==
window.bytes_new_width = function()
{
// define new size
var new_size = "100%";
var color = "#000000";
// get the main table and reset its width
var tbl = document.getElementsByTagName('TABLE')[0];
if (tbl.getAttribute("WIDTH") == 772)
{
tbl.setAttribute("WIDTH", new_size);
document.body.style.backgroundColor = color;
document.body.style.backgroundImage = "url()";
}
}
window.addEventListener("load", window.bytes_new_width, false);
// @name Gateworld Widescreen
// @namespace http://forum.gateworld.net/
// @include http://forum.gateworld.net/*
// ==/UserScript==
window.bytes_new_width = function()
{
// define new size
var new_size = "100%";
var color = "#000000";
// get the main table and reset its width
var tbl = document.getElementsByTagName('TABLE')[0];
if (tbl.getAttribute("WIDTH") == 772)
{
tbl.setAttribute("WIDTH", new_size);
document.body.style.backgroundColor = color;
document.body.style.backgroundImage = "url()";
}
}
window.addEventListener("load", window.bytes_new_width, false);
Comment