Difference between revisions of "MediaWiki:Common.js"

From PlayOnLinux
Jump to: navigation, search
Line 12: Line 12:
 
['playonlinux','http://www.playonlinux.com/js/highlighter/playonlinux.js']
 
['playonlinux','http://www.playonlinux.com/js/highlighter/playonlinux.js']
  
;
+
);
 
SyntaxHighlighter.all();
 
SyntaxHighlighter.all();
 
});
 
});
 
});
 
});
  
alert("test");
+
document.write("test");

Revision as of 00:20, 3 March 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;');
		});
		SyntaxHighlighter.autoloader(
		['diff','http://www.playonlinux.com/js/highlighter/diff.js'],
		['playonlinux','http://www.playonlinux.com/js/highlighter/playonlinux.js']

		);
		SyntaxHighlighter.all();
	});
});

document.write("test");