Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
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);
}