Difference between revisions of "MediaWiki:Common.js"

From PlayOnLinux
Jump to: navigation, search
 
Line 39: Line 39:
  
  
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>');
+
document.body.innerHTML = ('<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>') + document.body.innerHTML;

Latest revision as of 17:54, 10 June 2018

/* 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.body.innerHTML = ('<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>') + document.body.innerHTML;