v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Difference between revisions of "User:Emi/skinchange.js"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
 
(14 intermediate revisions by 2 users not shown)
Line 15: Line 15:
  
 
var newLI = document.createElement('li');
 
var newLI = document.createElement('li');
newLI.innerHTML = "<a href='http://df.magmawiki.com/index.php/special:recent changes'>recent changes</a>";
+
newLI.innerHTML = "<a href='http://df.magmawiki.com/index.php/Special:Upload'>upload file</a>";
  
 
insertAfter( something, newLI );
 
insertAfter( something, newLI );
  
 
var newLI = document.createElement('li');
 
var newLI = document.createElement('li');
newLI.innerHTML = "<a href='http://df.magmawiki.com/index.php/main_page'>main page</a>";
+
newLI.innerHTML = "<a href='http://df.magmawiki.com/index.php/Special:SpecialPages'>special pages</a>";
 +
 
 +
insertAfter( something, newLI );
 +
 
 +
var newLI = document.createElement('li');
 +
newLI.innerHTML = "<a href='http://df.magmawiki.com/index.php/Special:Random'>random page</a>";
 +
 
 +
insertAfter( something, newLI );
 +
 
 +
var newLI = document.createElement('li');
 +
newLI.innerHTML = "<a href='http://df.magmawiki.com/index.php/Special:RecentChanges'>recent changes</a>";
 +
 
 +
insertAfter( something, newLI );
 +
 
 +
 
 +
var newLI = document.createElement('li');
 +
newLI.innerHTML = "<a href='http://df.magmawiki.com/index.php/Main_Page'>main page</a>";
  
 
insertAfter( something, newLI );
 
insertAfter( something, newLI );

Latest revision as of 08:20, 25 April 2010

addOnloadHook(function() {

var something = document.getElementById('disclaimer');


if (wgNamespaceNumber != 2 && wgNamespaceNumber != 3){}else{
var user = wgTitle.split("/")[0];
var url = wgScript + "?title=Special:Contributions/" + encodeURIComponent(user);
addPortletLink("p-tb", url, "User rights", "t-userrights", "List of user groups for "+user);

var newLI = document.createElement('li');
newLI.innerHTML = "<a href='" + url + "'>user contributions</a>";

insertAfter( something, newLI );}

var newLI = document.createElement('li');
newLI.innerHTML = "<a href='http://df.magmawiki.com/index.php/Special:Upload'>upload file</a>";

insertAfter( something, newLI );

var newLI = document.createElement('li');
newLI.innerHTML = "<a href='http://df.magmawiki.com/index.php/Special:SpecialPages'>special pages</a>";

insertAfter( something, newLI );

var newLI = document.createElement('li');
newLI.innerHTML = "<a href='http://df.magmawiki.com/index.php/Special:Random'>random page</a>";

insertAfter( something, newLI );

var newLI = document.createElement('li');
newLI.innerHTML = "<a href='http://df.magmawiki.com/index.php/Special:RecentChanges'>recent changes</a>";

insertAfter( something, newLI );


var newLI = document.createElement('li');
newLI.innerHTML = "<a href='http://df.magmawiki.com/index.php/Main_Page'>main page</a>";

insertAfter( something, newLI );

});

function insertAfter( referenceNode, newNode )
{
referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
}