User:Reywas92/vector.js
Appearance
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
The accompanying .css page for this skin is at User:Reywas92/vector.css. |
importScript('User:Ais523/topcontrib.js');
/*<!---------------------------------------------------------------->*/
importScript('User:Pyrospirit/metadata.js'); //[[User:Pyrospirit/metadata.js]]
/*<!---------------------------------------------------------------->*/
window.popupHideDelay=0;
window.popupFixDabs=true;
/*<!---------------------------------------------------------------->*/
// adds a 'logs for this page' link to the toolbox bar
// if the page is a user's page, talk page or subpage, the link will go to logs for the user instead
// if the page is a special page, then no link is displayed
$(function () {
// if this is a user, show the logs for the user rather than the page
if ( mw.config.get('wgCanonicalNamespace') == "User" || mw.config.get('wgCanonicalNamespace') == "User_talk" ) {
// these pages already have a logs link
return;
} else if (mw.config.get(' mw.config.get('wgCanonicalNamespace')') == "Special" ) {
// don't display link for special pages
return;
} else {
url = mw.config.get('wgServer') + "/w/index.php?title=Special:Log&page=" + encodeURIComponent( mw.config.get('wgPageName') );
}
mw.loader.using( 'mediawiki.util' ).done( function() {
mw.util.addPortletLink("p-tb", url, "Logs", "pt-logs");
});
});
/*<!---------------------------------------------------------------->*/
//
/* Automatically hide "user page" link for anonymous users that do not have user pages */
function hideAnonUserPageLink()
{
var userPageLink = document.getElementById("ca-nstab-user");
if (!window.hideAnonUserPageLinkDisabled && userPageLink.className == "new")
{
document.getElementById("ca-nstab-user").style.visibility = "hidden";
}
}
if (mw.config.get('wgPageName').search(/^(User_talk:(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))$/) === 0)
{
$(hideAnonUserPageLink);
}