Only you can help us build a free scout media repository!
Please create an account to start uploading your images now.

MediaWiki:Common.js: Difference between revisions

From ScoutMedia, the free scout media repository
No edit summary
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* Any JavaScript here will be loaded for all users on every page load. */
/* Any JavaScript here will be loaded for all users on every page load. */


/* <source lang="javascript">
/*
Function used in {{Title}}
Function used in {{Title}}
*/
*/
Line 21: Line 21:
addOnloadHook(rewritePageH1);
addOnloadHook(rewritePageH1);


mw.loader.load('http://www.google-analytics.com/ga.js');
importScript('User:Egel/HotCat.js');
 
importScript('User:Egel/ajaxfilemove.js‎');
jQuery( function () {
importScript('User:Egel/SubPages.js');
  try {
importScript('User:Egel/UserRights.js');
    var pageTracker = _gat._createTracker("UA-5399625-12");
importScript('User:Egel/purgetab.js');
    pageTracker._trackPageview();
importScript('User:Egel/External editor.js');
  } catch(err) {}
} )
 
/* </source> */

Latest revision as of 15:52, 11 March 2013

/* Any JavaScript here will be loaded for all users on every page load. */

/*
Function used in {{Title}}
*/
function rewritePageH1() {
  var realTitleBanner = document.getElementById('RealTitleBanner');
  if (realTitleBanner) {
    if (!document.getElementById('DisableRealTitle')) {
      var realTitle = document.getElementById('RealTitle');
      var h1 = document.getElementsByTagName('h1')[0];
      if (realTitle && h1) {
        var titleText = realTitle.innerHTML;
        if (titleText == '') h1.style.display = 'none';
        else h1.innerHTML = titleText;
        realTitleBanner.style.display = 'none';
      }
    }
  }
}
addOnloadHook(rewritePageH1);

importScript('User:Egel/HotCat.js');
importScript('User:Egel/ajaxfilemove.js‎');
importScript('User:Egel/SubPages.js');
importScript('User:Egel/UserRights.js');
importScript('User:Egel/purgetab.js');
importScript('User:Egel/External editor.js');