User:2257/common.js: Difference between revisions
From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
No edit summary |
(lets try this) |
||
Line 8: | Line 8: | ||
addOnloadHook( fixRecentChangesLink ); | addOnloadHook( fixRecentChangesLink ); | ||
function addInfoTab() { | |||
//do things | |||
mw.util.addPortletLink( | |||
'p-cactions', | |||
wgScript + "?" + wgPageName + "&action=info", | |||
'info', | |||
'ca-info', | |||
'tooltip', | |||
'i', | |||
document.getElementById('ca-history').nextSibling | |||
); | |||
//fix the excessively stupid visual bug | |||
document.getElementById('ca-info').parentNode.insertBefore(document.createTextNode("\n"), document.getElementById('ca-info')); | |||
//if this is the info page, highlight it | |||
if (wgAction == "info") { | |||
document.getElementById('ca-info').className += "selected"; | |||
} | |||
} | |||
addOnloadHook( addInfoTab ); |
Revision as of 04:12, August 27, 2013
function fixRecentChangesLink() {
var link = document.getElementById('n-recentchanges').getElementsByTagName( 'a' );
link[0].href = link[0].href + "?hidemyself=1";
}
addOnloadHook( fixRecentChangesLink );
function addInfoTab() {
//do things
mw.util.addPortletLink(
'p-cactions',
wgScript + "?" + wgPageName + "&action=info",
'info',
'ca-info',
'tooltip',
'i',
document.getElementById('ca-history').nextSibling
);
//fix the excessively stupid visual bug
document.getElementById('ca-info').parentNode.insertBefore(document.createTextNode("\n"), document.getElementById('ca-info'));
//if this is the info page, highlight it
if (wgAction == "info") {
document.getElementById('ca-info').className += "selected";
}
}
addOnloadHook( addInfoTab );