Help:Quickbar

From Homestar Runner Wiki

(Difference between revisions)
Jump to: navigation, search
(+c)
(Sectioning)
Line 1: Line 1:
'''Here's how to add a link to your quickbar:'''
'''Here's how to add a link to your quickbar:'''
-
 
+
==Preparation==
1. First, decide what kind of link you would like to add. Here are some suggestions:
1. First, decide what kind of link you would like to add. Here are some suggestions:
Line 14: Line 14:
<pre>http://www.hrwiki.org/index.php/User:(Your user name)/monobook.js</pre>
<pre>http://www.hrwiki.org/index.php/User:(Your user name)/monobook.js</pre>
-
4. Edit the page, and insert the following lines of code:
+
==The Code==
 +
Edit the page, and insert the following lines of code:
<pre>
<pre>
Line 41: Line 42:
</pre>
</pre>
-
5. Now, look at all of the symbols in the code. You'll see stars, @ signs, and number signs. You need to replace them:
+
==Fine Tuning==
 +
Now, look at all of the symbols in the code. You'll see stars, @ signs, and number signs. You need to replace them:
*Where ever you see '''*****''' in the code, replace it with your (very short) new link name. You will do this eight times.
*Where ever you see '''*****''' in the code, replace it with your (very short) new link name. You will do this eight times.
Line 54: Line 56:
*Where you see '''#####''' in the code, replace it with the entire link path to the page you want to link to.
*Where you see '''#####''' in the code, replace it with the entire link path to the page you want to link to.
-
6. Now, save your edit, and reload the page. You should have a brand new link in your quickbar!
+
Now, save your edit, and reload the page. You should have a brand new link in your quickbar!
[[Category:Help|Q]]
[[Category:Help|Q]]

Revision as of 01:11, 7 December 2005

Here's how to add a link to your quickbar:

Preparation

1. First, decide what kind of link you would like to add. Here are some suggestions:

  • A page that you frequent, that isn't easily accessible.
  • One of your user space pages.
  • A friend's user page or talk page.

2. Find the complete address of that page, and copy it down.

3. Go to your monobook.js page by visiting the following address:

http://www.hrwiki.org/index.php/User:(Your user name)/monobook.js

The Code

Edit the page, and insert the following lines of code:

 gs*****InsertBefore = 'pt-@@@@@';
 function *****Link()
 {
   var user = document.getElementById( 'pt-userpage').firstChild.firstChild.data;
   var li = document.createElement( 'li' );
   li.id = 'pt-*****';
   var a = document.createElement( 'a' );
   a.appendChild( document.createTextNode( '******' ) );
   a.href = '#####'
   li.appendChild( a );
   if ( ! gs*****InsertBefore )
   {
      document.getElementById( 'pt-logout' ).parentNode.appendChild( li );
   }
   else
   {
       var before = document.getElementById( gs******InsertBefore );
       before.appendChild( li, before );
   }
 }
 if ( window.addEventListener ) window.addEventListener( 'load', *****Link, false );
 else if ( window.attachEvent ) window.attachEvent( 'onload', *****Link );

Fine Tuning

Now, look at all of the symbols in the code. You'll see stars, @ signs, and number signs. You need to replace them:

  • Where ever you see ***** in the code, replace it with your (very short) new link name. You will do this eight times.
  • Where you see @@@@@ in the code, replace it with one of the following names:
    • Replace it with userpage if you want the link to appear before your userpage link.
    • Replace it with mytalk if you want the link to appear before your my talk link.
    • Replace it with preferences if you want the link to appear before your preferences link.
    • Replace it with watchlist if you want the link to appear before your my watchlist link.
    • Replace it with mycontris if you want the link to appear before your my contributions link.
    • Replace it with logout if you want the link to appear before your log out link.
    • Delete that entire line of text if you want the link to appear after your log out link.
  • Where you see ##### in the code, replace it with the entire link path to the page you want to link to.

Now, save your edit, and reload the page. You should have a brand new link in your quickbar!

Personal tools