MediaWiki:Common.js
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
/* Umieszczony tutaj kod JavaScript zostanie załadowany przez każdego użytkownika, podczas każdego ładowania strony. $wgHooks['SkinTemplateSetupPageCss'][] = 'wfHideVariousTabsFromAnonymous'; function wfHideVariousTabsFromAnonymous( &$hidetabcss ) { global $wgUser; if ( !$wgUser->isLoggedIn() ) { $hidetabcss .= '.nav-meta { display: none !important; } '; } return true; } */ $('#mw-mywiki-example').html('This is Hello World by JQuery'); $(document).ready(function(){ var url = "https://hpc.man.poznan.pl/modules/kdm_training/index.php?m=api&a=trainingList.json"; $.getJSON(url, function(data, success) { $.each(data, function(i,lecture){ var old = $("#trainingListSlot").html(); $("#trainingListSlot").html(old + "<li><a href='" + lecture.url + "'>" + lecture.title + "</a></li>"); }); console.log(data); }).done(function( data ) { console.log(data); /* if ($("#trainingListSlot li").length > 0) { $("#trainingListSlot").fadeIn(1000); } else { $(".loading_error").show(); } */ }); });