Difference between revisions of "MediaWiki:Common.js"
From M.Eng. René Schwarz, Bremen/Merseburg
René Schwarz (talk | contribs) (Die Seite wurde neu angelegt: „→Das folgende JavaScript wird für alle Benutzer geladen.: //================================================================================ //*** force the…“) |
René Schwarz (talk | contribs) |
||
| Line 27: | Line 27: | ||
includePage("MediaWiki:Onlyifediting.js"); | includePage("MediaWiki:Onlyifediting.js"); | ||
} | } | ||
| + | |||
| + | //================================================================================ | ||
| + | jQuery(document).ready(function(){ | ||
| + | $('.accordion .head').click(function() { | ||
| + | $(this).next().toggle('slow'); | ||
| + | return false; | ||
| + | }).next().hide(); | ||
| + | }); | ||
Revision as of 20:48, 8 January 2011
/* Das folgende JavaScript wird für alle Benutzer geladen. */
//================================================================================
//*** force the loading of another JavaScript file (Kopie von [[Commons:Common.js]])
// Local Maintainer: [[Commons:User:Dschwen]]
function includePage(name) {
document.write('<script type="text/javascript" src="' + wgScript + '?title='
+ name + '&action=raw&ctype=text/javascript&dontcountme=s"><\/script>'); // smaxage=3600
}
//================================================================================
//*** import Onlyifuploading-functions
// SEE ALSO [[MediaWiki:Onlyifuploading.js]]
if (wgCanonicalSpecialPageName == "Upload") {
includePage("MediaWiki:Onlyifuploading.js");
includePage("MediaWiki:Onlyifediting.js");
}
//================================================================================
//*** import Onlyifediting-functions
// SEE ALSO [[MediaWiki:Onlyifediting.js]]
if (document.URL.indexOf("action=edit") > 0 || document.URL.indexOf("action=submit") > 0) {
includePage("MediaWiki:Onlyifediting.js");
}
//================================================================================
jQuery(document).ready(function(){
$('.accordion .head').click(function() {
$(this).next().toggle('slow');
return false;
}).next().hide();
});
Science