MediaWiki:Guidedtour-tour-patrol.js

Origem: Wikipédia, a enciclopédia livre.

Nota: Depois de publicar, poderá ter de contornar a cache do seu navegador para ver as alterações.

  • Firefox / Safari: Pressione Shift enquanto clica Recarregar, ou pressione Ctrl-F5 ou Ctrl-R (⌘-R no Mac)
  • Google Chrome: Pressione Ctrl-Shift-R (⌘-Shift-R no Mac)
  • Internet Explorer / Edge: Pressione Ctrl enquanto clica Recarregar, ou pressione Ctrl-F5
  • Opera: Pressione Ctrl-F5.
/*jshint laxbreak: true */
/*global jQuery, mediaWiki */
( function ( $, mw, gt ) {

	function shouldShowForPage() {
		return mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Recentchanges'
			&& (
				$.inArray( 'autoconfirmed', mw.config.get( 'wgUserGroups') ) !== -1
				|| $.inArray( 'confirmed', mw.config.get( 'wgUserGroups') ) !== -1
				|| $.inArray( 'sysop', mw.config.get( 'wgUserGroups') ) !== -1
			);
	}

	if ( !shouldShowForPage() ) {
		return;
	}

	gt.defineTour( {
		name: 'patrol',
		steps: [ {
			title: 'Ver ou não ver, eis a questão...',
			description: 'Ao acompanhar as mudanças recentes, dê atenção especial às marcadas com um ponto de exclamação. Elas foram feitas por novos editores (ou por anônimos), e ainda precisam ser conferidas e patrulhadas por alguém mais experiente.',
			attachTo: 'abbr.unpatrolled:first',
			position: 'topRight',
			buttons: [ {
				action: 'next'
			} ],
			shouldSkip: function () {
				return $( 'abbr.unpatrolled:first' ).length === 0;
			}
		}, {
			title: 'Otimize o seu tempo!',
			description: 'Filtre a lista de mudanças recentes e veja apenas as que ainda precisam de verificação: basta ocultar as edições patrulhadas.',
			attachTo: 'fieldset.rcoptions a:first',
			position: 'top',
			buttons: [ {
				action: 'next'
			} ]
		}, {
			title: 'Trabalhe em equipe!',
			description: 'Clique no link para conferir as diferenças introduzidas em uma edição, e depois aproveite para marcá-la como patrulhada se for uma edição válida (ou se for inadequada, mas alguém já tiver resolvido o problema, ou revertido). Isso reduzirá a lista de mudanças recentes que outros editores precisarão verificar.',
			attachTo: 'table:not(.mw-collapsible) a[href*="diff="]:first',
			position: 'top',
			buttons: [ {
				action: 'end'
			} ],
			shouldSkip: function () {
				return mw.user.options.get( 'usenewrc' ) === '1' && $( 'table:not(.mw-collapsible) a[href*="diff="]' ).length === 0;
			}
		} ]
	} );

} (jQuery, mediaWiki, mediaWiki.guidedTour ) );