Game Development Community

dev|Pro Game Development Curriculum

Making web pages on GG web site more printer friendly with user installed CSS (using GreaseMonkey)

by Johan Carlsson · 07/24/2005 (3:14 pm) · 2 comments

Problem:

the layout on GG's web doesn't prevent texts from being cut of abruptly at the end.

Solution (only Firefox/Mozilla?):

This solution make the print view more print-friendly, but leave the regulare site as it is.
To see the changes you need to do a Print Preview or print the page.

- Install greasemonkey http://greasemonkey.mozdev.org/ .

- Restart browser for it to load-up.

- Install the CSkinner user script from http://blog.thedt.net/cskinner/

The script: http://blog.thedt.net/wp-content/upload/cskinner.user.js

- To remove the header, footer and menus and enter the remaining content with a max width of 16cm you can use the CSS below,

o Load the CSkinner.user.js file in the browser

o Installing it with Tools:Install User Script

o Add it by using the Tools:User Script Command for the www.garagegames.com (automatically detected if your visiting that GG's site).

o My CSS script (change it as it fits you):


@media print {

html, body {
margin:0;
padding:0;
background-color: #FFF;
min-width: 13cm;
max-width: 16cm;
}

#header {
visibility:hidden;
display:none;
}

#footer {
padding:10px;
background-color:#FFF;
text-align: center;
}

#leftcol {
display:none;
visibility:hidden;
}

#content {
#width:16cm;
#max-width:16cm;
margin:0px 10px 0px 10px;
padding:10px;
}

#footer {
display:none;
visibility:hidden;
}

.formBody {
display:none;
visibility:hidden;
}

#1
07/25/2005 (3:08 pm)
Um sorry to say but on the old version the people who made greasemokey found if you have the previous greasemonkey version on people can hack into your computer and go through any of your files. For more information go here:
http://greasemonkey.mozdev.org/
#2
07/26/2005 (5:04 am)
Thanks for pointing that out. Pat

There is a new version that don't contain the GMAPI (which is accesable from any server script on domains you configured to execute a gm-script for). If you have installed the old one or the beta do replace it with the secure one.