User:Significa liberdade/common.js

Source: Wikipedia, the free encyclopedia.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
/*Rater*/ mw.loader.load( '/w/index.php?title=User:Evad37/rater.js&action=raw&ctype=text/javascript' ); // Backlink: [[User:Evad37/rater.js]]
/* PageCuration for NPP and AfC */ importScript('User:Schminnte/PageCuration.js'); // Linkback: [[User:Schminnte/PageCuration.js]]
/*Copyvio*/ mw.loader.using('mediawiki.util', function() {
	if (mw.config.get('wgNamespaceNumber') < 0) {
		return;
	}
	var url = 'https://copyvios.toolforge.org/?lang=' + mw.config.get('wgContentLanguage') +
		'&project=' + mw.config.get('wgSiteName').toLowerCase() +
		'&title=' + encodeURIComponent(mw.config.get('wgPageName'));
	if (mw.config.get('wgRevisionId') !== mw.config.get('wgCurRevisionId') ||
			mw.util.getParamValue('oldid') !== null) {
		url += '&oldid=' + encodeURIComponent(mw.config.get('wgRevisionId'));
	}
	mw.util.addPortletLink(
		'p-tb',
		url,
		'Copyvio check',
		't-copyvio-check',
		'Check this page for copyright violations'
	);
});
/* AfC */
/*Uploaded from https://github.com/WPAFC/afch-rewrite, commit: 24800715ad8fef3129b80f299ccef602518561b8 (master) */
//<nowiki>
( function () {
	// Check that we're in the right namespace and on the right page
	switch ( mw.config.get( 'wgNamespaceNumber' ) ) {
		case 4: // Wikipedia
		case 5: // Wikipedia talk
			var pageName = mw.config.get( 'wgTitle' );
			// return nothing for now, all drafts are now under Draft namespace
			// currently only the article submission script is running here.
			// to be used when script(s) for other modules such as category and
			// redirect requests are reintergrated into here.
			if ( pageName !== 'Articles for creation/sandbox' ) {
				return;
			}
			break;
		case 2: // User
		case 118: // Draft
			break;
		default:
			return;
	}

	// Initialize the AFCH object
	window.AFCH = {};

	// Set up constants
	AFCH.consts = {};

	AFCH.consts.scriptpath = mw.config.get( 'wgServer' ) + mw.config.get( 'wgScript' );

	// These next two statements (setting beta and baseurl) may be modified
	// by the uploading script! If you change them, check that the uploading
	// script at scripts/upload.py doesn't break.
	AFCH.consts.beta = false;
	AFCH.consts.baseurl = AFCH.consts.scriptpath +
		'?action=raw&ctype=text/javascript&title=MediaWiki:Gadget-afchelper.js';

	$.getScript( AFCH.consts.baseurl + '/core.js' ).done( function () {
		var loaded = AFCH.load( 'submissions' ); // perhaps eventually there will be more modules besides just 'submissions'
		if ( !loaded ) {
			mw.notify( 'AFCH could not be loaded: ' + ( AFCH.error || 'unknown error' ),
				{ title: 'AFCH error' } );
		}
	} );
}() );
//</nowiki>
/*Draftify*/importScript( 'User:MPGuy2824/MoveToDraft.js' ); // Backlink: [[User:MPGuy2824/MoveToDraft.js]]
/*Superlinks is a Wikipedia user script designed to allow powerusers to quickly view pages and information related to the page they are currently viewing*/ importScript( 'User:Bradv/Scripts/Superlinks.js' ); // Backlink: [[User:Bradv/Scripts/Superlinks.js]]
/*CV RevDel*/ importScript( 'User:Enterprisey/cv-revdel.js' ); // Backlink: [[User:Enterprisey/cv-revdel.js]]
/*Capricorn for redirects*/mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Wugapodes/Capricorn.js&action=raw&ctype=text/javascript');
/*Stub sorter*/importScript('User:SD0001/StubSorter.js'); // [[User:SD0001/StubSorter.js]]
/*ReFill*/mw.loader.load( "https://meta.wikimedia.org/w/index.php?title=User:Zhaofeng_Li/Reflinks.js&action=raw&ctype=text/javascript" );
/* This script adds a "Page views" link under "Tools" in the sidebar.
   The link goes to the external tool https://pageviews.toolforge.org.
   On disambiguation pages the script also adds a "Mass views" link to
   page views for all pages linked on the page.
   To use the script, add the following line to Special:MyPage/common.js:
 
importScript('User:PrimeHunter/Pageviews.js'); // Linkback: [[User:PrimeHunter/Pageviews.js]]

*/
 
mw.loader.using(['mediawiki.util'], function () {
  mw.util.addPortletLink(
    'p-tb',
    'https://pageviews.wmcloud.org/?project=en.wikipedia.org&pages=' +
    encodeURIComponent(mw.config.get( 'wgPageName' )),
    'Page views',
    'pt-pageviews',
    'Show page views for this page',
    null,
    '#t-info'
  );
  if ( document.getElementById( 'disambigbox' ) ) {
    mw.util.addPortletLink(
      'p-tb',
      'https://pageviews.wmcloud.org/massviews/?source=wikilinks&' +
      'target=https://en.wikipedia.org/wiki/' +
      encodeURIComponent(mw.config.get( 'wgPageName' )),
      'Massviews',
      'pt-massviews',
      'Show page views for pages linked on this disambiguation page',
      null,
      '#t-info'
    );
  }
});
/*/DYK Check/*/importScript('User:Shubinator/DYKcheck.js'); //DYKcheck tool
/*/MOSNUM date updates /*/
importScript('User:Ohconfucius/script/MOSNUM dates.js'); // [[User:Ohconfucius/script/MOSNUM dates.js]]