MediaWiki:Freephile.js: Difference between revisions

From Freephile Wiki
No edit summary
No edit summary
 
Line 1: Line 1:
/**
// install [[User:Cacycle/wikEd]] in-browser text editor
// install [[User:Cacycle/wikEd]] in-browser text editor
document.write('<script type="text/javascript" src="'
document.write('<script type="text/javascript" src="'
+ 'http://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js'
+ 'http://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js'
+ '&action=raw&ctype=text/javascript"></' + 'script>');
+ '&action=raw&ctype=text/javascript"></' + 'script>');
*/


/**
// This code would manipulate the 'Sidebar' (which for this skin is at the bottom of the page)
function AppendLinkToSidebar() {
function AppendLinkToSidebar() {
     myLink = 'http://freephile.com/wiki/index.php/Special:Categories';
     myLink = 'http://freephile.com/wiki/index.php/Special:Categories';
Line 26: Line 30:
   
   
addOnloadHook( AppendLinkToSidebar );
addOnloadHook( AppendLinkToSidebar );
*/

Latest revision as of 23:43, 13 December 2008

/**
// install [[User:Cacycle/wikEd]] in-browser text editor
document.write('<script type="text/javascript" src="'
+ 'http://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js'
+ '&action=raw&ctype=text/javascript"></' + 'script>');
*/

/**
// This code would manipulate the 'Sidebar' (which for this skin is at the bottom of the page)
function AppendLinkToSidebar() {
    myLink = 'http://freephile.com/wiki/index.php/Special:Categories';
    try {
        var node = document.getElementById( "gumax-footer" )
                           .getElementsByTagName('div')[0]
                           .getElementsByTagName('ul')[0];
 
        var aNode = document.createElement( 'a' );
        var liNode = document.createElement( 'li' );
 
        aNode.appendChild( document.createTextNode( 'Categories' ) );
        aNode.setAttribute( 'href' , myLink );
        liNode.appendChild( aNode );
        liNode.className = 'plainlinks';
        node.appendChild( liNode );
    } catch(e) {
        // lets just ignore what's happened
        return;
    }
}
 
addOnloadHook( AppendLinkToSidebar );
*/