User:Y2K/monobook.js
From Homestar Runner Wiki
(Difference between revisions)
DorianGray (Talk | contribs) (Revert per user request) |
(Adding to here, too.) |
||
| Line 1: | Line 1: | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
// Adds a purge tab. Found this on Lapper's JS. | // Adds a purge tab. Found this on Lapper's JS. | ||
function addPurgeButton() | function addPurgeButton() | ||
| Line 91: | Line 19: | ||
else if ( window.attachEvent ) window.attachEvent( "onload", addPurgeButton ); | else if ( window.attachEvent ) window.attachEvent( "onload", addPurgeButton ); | ||
| - | // | + | // generate a random logo (only works in Firefox) |
| - | + | // started by me, fixed by Phlip | |
| - | + | function changelogo() { | |
| - | // | + | var logos = new Array( |
| - | + | "/images/3/36/Logo_Redesign_Almost_Everybody.png", | |
| - | + | "/images/thumb/b/ba/Logo_Redesign_Basement.png/150px-Logo_Redesign_Basement.png", | |
| - | + | "/images/0/05/Logo_Redesign_Black_Background.png", | |
| - | // | + | "/images/7/7d/Logo_Redesign_Current_Updated.gif", |
| - | + | "/images/thumb/3/38/Logo_Redesign_Edit_Link.png/150px-Logo_Redesign_Edit_Link.png", | |
| - | + | "/images/2/24/Logo_Redesign_Encyclopedia.png", | |
| - | + | "/images/thumb/7/74/Logo_Redesign_Everybody_Everybody.png/150px-Logo_Redesign_Everybody_Everybody.png", | |
| - | // | + | "/images/thumb/2/21/Puzzle_FCUSA.PNG/150px-Puzzle_FCUSA.PNG", |
| - | + | "/images/thumb/8/8e/Logo_Redesign_Field.png/150px-Logo_Redesign_Field.png", | |
| - | + | "/images/b/bb/Logo_Redesign_Homestar_and_SB.gif", | |
| - | + | "/images/a/a8/Logo_Redesign_sbhrfield.png", | |
| - | // | + | "/images/thumb/d/d0/Logo_Redesign_Homestar_Front.PNG/150px-Logo_Redesign_Homestar_Front.PNG", |
| - | + | "/images/7/74/Logo_Redesign_Homestar_Star.png", | |
| - | + | "/images/0/0d/Dotjoey.png", | |
| - | + | "/images/c/c5/Logo_Redesign_FullBody_Blur.gif", | |
| - | // | + | "/images/1/15/Logo_Redesign_Lappy.gif", |
| - | + | "/images/4/42/Logo_Redesign_Official_Logo_Homestar.png", | |
| - | + | "/images/2/20/hrwlogoidea-fixed.png", | |
| - | + | "/images/3/36/Logo_Redesign_Old_New_Star.gif", | |
| - | + | "/images/thumb/f/f7/Logo_Redesign_Puzzle.png/150px-Logo_Redesign_Puzzle.png", | |
| - | + | "/images/thumb/3/36/Logo_Redesign_Running_Intro.png/150px-Logo_Redesign_Running_Intro.png", | |
| - | + | "/images/7/70/Logo_Redesign_Then_and_Now.png", | |
| - | + | "/images/thumb/9/93/Logo_Redesign_Weclome_Back.png/150px-Logo_Redesign_Weclome_Back.png", | |
| - | + | "/images/d/d5/Logo_Redesign_WikiGlobe.png", | |
| - | + | "/images/5/51/Logo_Redesign_World_LighterGrad.png" | |
| - | + | ); | |
| - | + | var i = Math.floor(Math.random() * logos.length); | |
| - | + | document.getElementById('p-logo').getElementsByTagName('a')[0].style.setProperty("background-image", "url(" + logos[i] + ")", "important"); | |
| - | + | } | |
| - | + | addOnloadHook(changelogo); | |
| - | // | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | // | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | // | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | // | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | // | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | / | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | // | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
Revision as of 00:52, 30 November 2006
// Adds a purge tab. Found this on Lapper's JS.
function addPurgeButton()
{
var href = document.location.href;
{
var historyHref = document.getElementById( "ca-history" ).firstChild.href;
var div = document.getElementById( "p-cactions" );
var ul = div.getElementsByTagName( "ul" )[0];
var newLi = document.createElement( "li" );
var newA = document.createElement( "a" );
newA.setAttribute( "href" , historyHref.replace( "=history" , "=purge" ) );
var text = document.createTextNode( "purge" );
newA.appendChild( text );
newLi.appendChild( newA );
ul.appendChild( newLi );
}
}
if ( window.addEventListener ) window.addEventListener( "load" , addPurgeButton , false );
else if ( window.attachEvent ) window.attachEvent( "onload", addPurgeButton );
// generate a random logo (only works in Firefox)
// started by me, fixed by Phlip
function changelogo() {
var logos = new Array(
"/images/3/36/Logo_Redesign_Almost_Everybody.png",
"/images/thumb/b/ba/Logo_Redesign_Basement.png/150px-Logo_Redesign_Basement.png",
"/images/0/05/Logo_Redesign_Black_Background.png",
"/images/7/7d/Logo_Redesign_Current_Updated.gif",
"/images/thumb/3/38/Logo_Redesign_Edit_Link.png/150px-Logo_Redesign_Edit_Link.png",
"/images/2/24/Logo_Redesign_Encyclopedia.png",
"/images/thumb/7/74/Logo_Redesign_Everybody_Everybody.png/150px-Logo_Redesign_Everybody_Everybody.png",
"/images/thumb/2/21/Puzzle_FCUSA.PNG/150px-Puzzle_FCUSA.PNG",
"/images/thumb/8/8e/Logo_Redesign_Field.png/150px-Logo_Redesign_Field.png",
"/images/b/bb/Logo_Redesign_Homestar_and_SB.gif",
"/images/a/a8/Logo_Redesign_sbhrfield.png",
"/images/thumb/d/d0/Logo_Redesign_Homestar_Front.PNG/150px-Logo_Redesign_Homestar_Front.PNG",
"/images/7/74/Logo_Redesign_Homestar_Star.png",
"/images/0/0d/Dotjoey.png",
"/images/c/c5/Logo_Redesign_FullBody_Blur.gif",
"/images/1/15/Logo_Redesign_Lappy.gif",
"/images/4/42/Logo_Redesign_Official_Logo_Homestar.png",
"/images/2/20/hrwlogoidea-fixed.png",
"/images/3/36/Logo_Redesign_Old_New_Star.gif",
"/images/thumb/f/f7/Logo_Redesign_Puzzle.png/150px-Logo_Redesign_Puzzle.png",
"/images/thumb/3/36/Logo_Redesign_Running_Intro.png/150px-Logo_Redesign_Running_Intro.png",
"/images/7/70/Logo_Redesign_Then_and_Now.png",
"/images/thumb/9/93/Logo_Redesign_Weclome_Back.png/150px-Logo_Redesign_Weclome_Back.png",
"/images/d/d5/Logo_Redesign_WikiGlobe.png",
"/images/5/51/Logo_Redesign_World_LighterGrad.png"
);
var i = Math.floor(Math.random() * logos.length);
document.getElementById('p-logo').getElementsByTagName('a')[0].style.setProperty("background-image", "url(" + logos[i] + ")", "important");
}
addOnloadHook(changelogo);
