Changes

no edit summary
Line 22: Line 22:  
   attachEvent("onresize", fixIEScroll);
 
   attachEvent("onresize", fixIEScroll);
 
}
 
}
// </nowiki></pre>
  −
  −
// from [http://en.wikipedia.org/w/index.php?title=User:Thebainer/monobook.js&oldid=32546177 User:Thebainer/monobook.js]
  −
// <pre><nowiki>
  −
  −
// 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
  −
  −
addOnloadHook(function () {
  −
  −
// if this is a user, show the logs for the user rather than the page
  −
if ( wgCanonicalNamespace == "User" || wgCanonicalNamespace == "User_talk" ) {
  −
  url = wgServer + "/w/index.php?title=Special:Log&user=" + wgTitle.split("/")[0];
  −
} else if ( wgCanonicalNamespace == "Special" ) {
  −
  // don't display link for special pages
  −
  return;
  −
} else {
  −
  url = wgServer + "/w/index.php?title=Special:Log&page=" + wgPageName;
  −
}
  −
  −
addPortletLink("p-tb", url, "Logs", "pt-logs");
  −
  −
});
  −
   
// </nowiki></pre>
 
// </nowiki></pre>
  
111

edits