Difference between revisions of "MediaWiki:Common.js"

From PlayOnLinux
Jump to: navigation, search
Line 13: Line 13:
 
$(".code.python").each( function( ) {
 
$(".code.python").each( function( ) {
 
$(this).attr('class', 'brush: python;');
 
$(this).attr('class', 'brush: python;');
 +
});
 +
$(".code.java").each( function( ) {
 +
$(this).attr('class', 'brush: java;');
 
});
 
});
 
SyntaxHighlighter.autoloader(
 
SyntaxHighlighter.autoloader(
Line 18: Line 21:
 
['playonlinux','http://www.playonlinux.com/js/highlighter/playonlinux.js'],
 
['playonlinux','http://www.playonlinux.com/js/highlighter/playonlinux.js'],
 
['bash','http://www.playonlinux.com/js/highlighter/bash.js'],
 
['bash','http://www.playonlinux.com/js/highlighter/bash.js'],
['python','http://www.playonlinux.com/js/highlighter/python.js']
+
['python','http://www.playonlinux.com/js/highlighter/python.js'],
 +
                ['java','http://www.playonlinux.com/js/highlighter/java.js']
 
);
 
);
 
SyntaxHighlighter.all();
 
SyntaxHighlighter.all();

Revision as of 23:34, 29 April 2015

/* Tout JavaScript ici sera chargé avec chaque page accédée par n’importe quel utilisateur. */
$.getScript( "http://www.playonlinux.com/js/highlighter/shCore.js", function( data, textStatus, jqxhr ) {
	$.getScript( "http://www.playonlinux.com/js/highlighter/shAutoloader.js", function( data, textStatus, jqxhr ) {
		$(".code.playonlinux").each( function( ) {
			$(this).attr('class', 'brush: playonlinux;');
		});
		$(".code.diff").each( function( ) {
			$(this).attr('class', 'brush: diff;');
		});
		$(".code.bash").each( function( ) {
			$(this).attr('class', 'brush: bash;');
		});
		$(".code.python").each( function( ) {
			$(this).attr('class', 'brush: python;');
		});
		$(".code.java").each( function( ) {
			$(this).attr('class', 'brush: java;');
		});
		SyntaxHighlighter.autoloader(
		['diff','http://www.playonlinux.com/js/highlighter/diff.js'],
		['playonlinux','http://www.playonlinux.com/js/highlighter/playonlinux.js'],
		['bash','http://www.playonlinux.com/js/highlighter/bash.js'],
		['python','http://www.playonlinux.com/js/highlighter/python.js'],
                ['java','http://www.playonlinux.com/js/highlighter/java.js']
		);
		SyntaxHighlighter.all();
	});
});

 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-7841956-1', 'auto');
  ga('set', '&uid', '5df728d5bc6d522361852631c5bc2eb35583b77e'); 
  ga('require', 'displayfeatures');
  ga('send', 'pageview');


document.write('<div class="mainheader"><div class="reducer"><a href="https://www.playonlinux.com"><img src="https://www.playonlinux.com/images/logos/logo96.png" alt="playonlinux" /> playonlinux</a><ul id="menuul"><li><a href="https://www.playonlinux.com/en">Home</a></li><li><a href="https://www.playonlinux.com/en/supported_apps.html">Supported software</a></li><li><a href="https://www.playonlinux.com/en/news.html">News</a></li><li><a href="https://www.playonlinux.com/en/download.html">Download</a></li><li class="selected"><a href="http://wiki.playonlinux.com/">Wiki</a></li><li><a href="https://www.playonlinux.com/en/forums.html">Forums</a></li><li><a href="https://www.playonlinux.com/en/bugs.html">Bugs</a></li></ul></div></div>');