Get my Javadoc StyleSheet – Red N Black Theme

I recentry created the brand new site for jDCBot (http://jdcbot.sourceforge.net ). For the Javadoc section I wanted the Javadoc to match the site’s red and black theme. Below is its screenshot. Click on it for a better view, or even better visit jDCBot’s site (link is above) and goto to the Javadoc section.

Well anyway, below is the script.
The code
License: GNU Public License version 3.

/* Javadoc style sheet theme - Red N Black - by Nirupam Biswas (AppleGrew)*/

/* Define colors, fonts and other style attributes here to override the defaults */

/* Page background color */
body { background-color: #FFFFFF; color:#000000 }

/* Headings */
h1, h2, h3 {
font-family: Arial, Helvetica, sans-serif;
color: #555555;
}
h1 {font-size: 145%;}

a:link {
line-height: 14px;
font-weight: bold;
text-decoration: none;
color: #444444;
}
a:visited {
color: #777777;
text-decoration: none;
font-weight: bold;
}
a:hover {
border-bottom: 2px solid #666666;
}
hr{
color: #666666;
background-color: #666666;
text-align: left;
border: 0;
text-align: left;/*this will align it for IE*/
margin-left: 0; /*this will align it left for Mozilla*/
}

/* Table colors */
.TableHeadingColor     { background-image:url(javadoc.jpg); background-repeat:repeat-x; color:#FFFFFF;}
.TableHeadingColor a:link, .TableHeadingColor a:visited {
color: #bbbbbb;
}
.TableHeadingColor a:hover {
border: none;
background-color:#666666;
}
.TableSubHeadingColor  { background: #EEEEEE; color:#000000 }
.TableRowColor         { background: #FFFFFF; color:#000000 }

/* Font used in left-hand frame lists */
.FrameTitleFont   { font-size: 100%; font-family: Helvetica, Arial, sans-serif; color:#000000 }
.FrameHeadingFont { font-size:  90%; font-family: Helvetica, Arial, sans-serif; color:#000000 }
.FrameItemFont    { font-size:  90%; font-family: Helvetica, Arial, sans-serif; color:#000000 }

/* Navigation bar fonts and colors */
.NavBarCell1    { background-image:url(javadoc.jpg);}
.NavBarCell1 a:hover {
border: none;
background-color:#666666;
}
.NavBarCell1Rev { background-color:#666666; color:#FFFFFF}
.NavBarFont1    { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;}
.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;}

.NavBarCell2    { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000}
.NavBarCell3    { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000}

Also please save the following image and save it in the same directory with the style sheet above.

Make the top bar (navbar) disappear.

I once made a similar post. That trick no longer works since blogger.com’s upgrade. Now I have a new cleaner and better trick to make the top banner disappear. Add a new HTML/Javascript widget to your template. Now in this template add the following code.

<!--exclusively BY APPLEGREW (applegrew.blogspot.com),
HIDES Navbar -->
<style type="text/css">
div#navbar { display: none; }
</style>
<!--end of HIDE Navbar-->

Now save the widget and reload the page.

A tip. The navbar won’t disappear until this code gets loaded, hence make it gets loaded faster. Simply put it in head portion of your template.

My first GreaseMonkey script: Blogspot Post PrintView

My first GreaseMonkey script. It provides print option for your posts hosted in blogspot.com. When this script is running a ‘Print’ option will appear next to post’s date header. It depends heavily on the internal code of the template, hence it can very well not work on many non-stock themes and some stock themes.

You can install this from here. I highly recommend that you install it from there.

Anyway I am also providing the code below.
The code
License: GNU Public License version 3.

[code lang=”javascript”]
// Show Posts in Blogspot in Print View
// version 0.1 beta
// 2005-05-02
// Copyright (c) 2008, AppleGrew
// Released under the GPL license
// http://www.gnu.org/copyleft/gpl.html
//
// ——————————————————————–
//
// This is a Greasemonkey user script. To install it, you need
// Greasemonkey 0.3 or later: http://greasemonkey.mozdev.org/
// Then restart Firefox and revisit this script.
// Under Tools, there will be a new menu item to "Install User Script".
// Accept the default configuration and install.
//
// To uninstall, go to Tools/Manage User Scripts,
// select "Access Bar", and click Uninstall.
//
// Usage: When using this script then a new word ‘Print’ will appear
// beside every post’s posting date header.
// ——————————————————————–
//
// ==UserScript==
// @name Blogspot Post PrintView
// @namespace http://applegrew.blogspot.com/search/label/Greasemonkey%20Scripts/
// @description Show Posts in Blogspot in Print View
// @include http://*.blogspot.com/*
// @include file:///home/apple/Desktop/AppleGrew’s%20Mind.html*
// ==/UserScript==

var head, js;
head = document.getElementsByTagName(‘head’)[0];
if (!head) { return; }
js = document.createElement(‘script’);
js.type = ‘text/javascript’;
js.innerHTML =’function printview(id){location.href =location.href + "?print=1&id="+id+""; return;}’;
head.appendChild(js);

var isPrintMode = false;
var qs;
var ID=-1, postClass="post";
if (qs=location.href.match(/\?print=1&id=(\d+)&postclass=(\S+)/i)){
if(qs[1] && qs[2]){
isPrintMode = true;
ID = qs[1];
postClass = unescape(qs[2]);
}
}

var allDates, allPosts;

var postDiv = document.evaluate(
"//div[@class=’blog-posts hfeed’]",
document,
null,
XPathResult.FIRST_ORDERED_NODE_TYPE,
null);

var postDivChildren;
if(postDiv && postDiv.singleNodeValue)
postDivChildren = postDiv.singleNodeValue.childNodes;

if(postDivChildren){
for (var i = 0; i < thisdate =" postDivChildren[i++];" thisdate="postDivChildren[i++];" var="" thispost="postDivChildren[i++];" tagname="" i="" thispost="postDivChildren[i++];" thisdate="" id="" postid="" posttimestamp="thisDate.textContent;" newdiv="document.createElement(‘div’);" var="" divhtml=">h2dateid" href="http://www.blogger.com/post-edit.g?print=1&id=%27+i+%27&postclass=%27+thisPost.getAttribute%28" innerhtml =" DivHTML;" dateid = "dateid" postid = "postid" newbody = "<div\">"+document.getElementById(dateid).innerHTML+
"</h2><div"+postClass+"\"">"+document.getElementById(postid).innerHTML+"</div></div>";
document.body.innerHTML = newbody;

}
[/code]