MediaWiki:Common.js: Porovnání verzí
Jump to navigation
Bez shrnutí editace |
Bez shrnutí editace |
||
Řádek 1: | Řádek 1: | ||
/* Any JavaScript here will be loaded for all users on every page load. */ | <nowiki>/* Any JavaScript here will be loaded for all users on every page load. */ | ||
// ------------------------------------------------------------------------------- | |||
// Force Preview JavaScript code - Start | |||
// | |||
// To allow any group to bypass being forced to preview, | |||
// enter the group name in the permittedGroups array. | |||
// E.g. | |||
// var permittedGroups = []; // force everyone | |||
// var permittedGroups = [ "user"]; // permit logged-in users | |||
// var permittedGroups = [ "sysop", "bureaucrat"]; // permit sysop, bureaucrat | |||
// ------------------------------------------------------------------------------- | |||
var permittedGroups = [ "sysop", "bureaucrat"]; | |||
Array.prototype.intersects = function() { | |||
// -------------------------------------------------------- | |||
// Returns true if any element in the argument array | |||
// is the same as an element in this array | |||
// -------------------------------------------------------- | |||
var _gaq = _gaq || []; | var _gaq = _gaq || []; | ||
Řádek 13: | Řádek 28: | ||
})(); | })(); | ||
// ----------------------------------------------------- | |||
// Force Preview JavaScript code - End | |||
// ----------------------------------------------------- | |||
</nowiki> | </nowiki> |
Verze z 22. 11. 2010, 12:11
<nowiki>/* Any JavaScript here will be loaded for all users on every page load. */ // ------------------------------------------------------------------------------- // Force Preview JavaScript code - Start // // To allow any group to bypass being forced to preview, // enter the group name in the permittedGroups array. // E.g. // var permittedGroups = []; // force everyone // var permittedGroups = [ "user"]; // permit logged-in users // var permittedGroups = [ "sysop", "bureaucrat"]; // permit sysop, bureaucrat // ------------------------------------------------------------------------------- var permittedGroups = [ "sysop", "bureaucrat"]; Array.prototype.intersects = function() { // -------------------------------------------------------- // Returns true if any element in the argument array // is the same as an element in this array // -------------------------------------------------------- var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-19841557-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); // ----------------------------------------------------- // Force Preview JavaScript code - End // ----------------------------------------------------- </nowiki>