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/monobook.js"
< User:Emi
Jump to navigation
Jump to search
Line 5: | Line 5: | ||
− | addOnloadHook(function() { | + | addOnloadHook(function() { |
var something = document.getElementById('disclaimer'); | var something = document.getElementById('disclaimer'); | ||
+ | |||
+ | |||
+ | if (wgNamespaceNumber != 2 && wgNamespaceNumber != 3) // User or User talk | ||
+ | return; | ||
+ | var user = wgTitle.split("/")[0]; | ||
+ | var url = wgScript + "?title=Special:Contributions&user=" + 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:recent changes'>recent changes</a>"; | ||
+ | |||
+ | insertAfter( something, newLI ); | ||
var newLI = document.createElement('li'); | var newLI = document.createElement('li'); | ||
Line 13: | Line 30: | ||
insertAfter( something, newLI ); | insertAfter( something, newLI ); | ||
+ | |||
}); | }); | ||
Revision as of 04:30, 25 April 2010
importScript('User:Emi/clock.js');
importScript('User:Emi/newpages.js');
importScript('User:Emi/colorcontrib.js');
importScript('User:Briess/hideAnnouncements.js');
addOnloadHook(function() {
var something = document.getElementById('disclaimer');
if (wgNamespaceNumber != 2 && wgNamespaceNumber != 3) // User or User talk
return;
var user = wgTitle.split("/")[0];
var url = wgScript + "?title=Special:Contributions&user=" + 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:recent changes'>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);
}