వాడుకరి:Arjunaraoc/Mediawiki common.js

వికీసోర్స్ నుండి

గమనిక: భద్రపరచిన తర్వాత, మార్పులను చూడాలంటే మీ విహారిణి కోశాన్ని తీసేయాల్సిరావచ్చు.

  • ఫైర్‌ఫాక్స్‌ / సఫారి: Shift మీటని నొక్కిపట్టి Reloadని నొక్కండి లేదా Ctrl-F5 గానీ Ctrl-R (మాకింటోషులో ⌘-Shift-R) గానీ నొక్కండి
  • గూగుల్ క్రోమ్: Ctrl-Shift-R (మాక్ లో ⌘-Shift-R) నొక్కండి
  • ఇంటర్నెట్ ఎక్ప్లోరర్/ఎడ్జి: Ctrl ను నొక్కిపట్టి Refresh నొక్కండి లేదా Ctrl-F5 నొక్కండి.
  • ఒపేరా:* Ctrl-F5 నొక్కండి.
//<source lang="javascript">
/**
 * Keep code in MediaWiki:Common.js to a minimum as it is unconditionally
 * loaded for all users on every wiki page. If possible create a gadget that is
 * enabled by default instead of adding it here (since gadgets are fully
 * optimized ResourceLoader modules with possibility to add dependencies etc.)
 *
 * Since Common.js isn't a gadget, there is no place to declare its
 * dependencies, so we have to lazy load them with mw.loader.using on demand and
 * then execute the rest in the callback. In most cases these dependencies will
 * be loaded (or loading) already and the callback will not be delayed. In case a
 * dependency hasn't arrived yet it'll make sure those are loaded before this.
 */
/* global mw, $, importStylesheet, importScript */
/* jshint curly:false eqnull:true, strict:false, browser:true, */

mw.loader.using( ['mediawiki.util', 'jquery.client'] ).done( function () {
/* Begin of mw.loader.using callback */

/**
 * Scripts imported from wikisource.org
 * see [[oldwikisource:Wikisource:Shared Scripts]] for details
 */
//	mw.loader.load('//en.wikisource.org/w/index.php?title=MediaWiki:Base.js&action=raw&ctype=text/javascript');
mw.loader.load('//te.wikisource.org/w/index.php?title=MediaWiki:PageNumbers.js&action=raw&ctype=text/javascript');
// mw.loader.load('//te.wikisource.org/w/index.php?title=MediaWiki:IndexForm.js&action=raw&ctype=text/javascript');
//	mw.loader.load('//en.wikisource.org/w/index.php?title=MediaWiki:OCR.js&action=raw&ctype=text/javascript');
mw.loader.load('//te.wikisource.org/w/index.php?title=MediaWiki:DisplayFooter.js&action=raw&ctype=text/javascript');
// Dictionary.js used for [[DL]]-type links, as per [[A Dictionary of Music and Musicians/A]]
//	mw.loader.load('//en.wikisource.org/w/index.php?title=MediaWiki:Dictionary.js&action=raw&ctype=text/javascript');
//	mw.loader.load('//en.wikisource.org/w/index.php?title=MediaWiki:Corrections.js&action=raw&ctype=text/javascript');
mw.loader.load('//wikisource.org/w/index.php?title=MediaWiki:InterWikiTransclusion.js&action=raw&ctype=text/javascript');

/**
 * Messages are configurable here
 */
if(!self.ws_messages) self.ws_messages = { };

window.ws_msg = function (name) {
	var m = self.ws_messages[name];
	if(m) return m; else return name;
};

self.ws_messages = {
	'author':'Author',
	'translator':'Translator',
	'editor':'Editor',
	'publisher':'Publisher',
	'place':'Place',
	'volume':'Volume',
	'school':'School',
	'book':'Book',
	'collection':'Collection',
	'journal':'Journal or magazine',
	'phdthesis':'Thesis, report',
	'dictionary':'Dictionary',
	'progress':'Progress',
	'progress_T':'Done',
	'progress_V':'To be validated',
	'progress_C':'To be proofread',
	'progress_MS':'Ready for Match & Split',
	'progress_OCR':'Source file needs an OCR text layer',
	'progress_L':'Source file is incorrect (missing pages, unordered pages, etc)',
	'progress_X':'Pagelist needed (to verify file is complete and correct before commencing proofreading)',
	'▲':'పేజీ పై భాగానికి వెళ్లు.',

	'corr_list':'List of typos identified on this page',
	'corr_link':'Typos Marked',
	'corr_one':'One typo</a> has been marked.',
	'corr_many':' typos</a> have been marked.',
	'corr_close':'Close.',

	'iwtrans':'Its text comes from',
	'iwtrans2':'Its text comes from other Wikisource subdomains.',

	'page_namespace_name':      'Page',
	'page_trascluded_in':       'Page trascluded in:',
	'text_number':              'Text',

	'compare_with':  'Comparison with:',
	'compare_texts': 'Compare texts'
};
// Dynamic layouts
if ( !self.ws_layouts ) {
	self.ws_layouts = { };
}
self.ws_layouts['Layout 1'] = {
	'#text-wrap':"",
	'#text-container':"",
	'#text':"",
	'.sidenote-right':"float:right; margin:0.5em; padding:3px; border:solid 1px gray; max-width:9em; text-indent:0em; text-align:left;",
	'.sidenote-left':"float:left; margin:0.5em; padding:3px; border:solid 1px gray; max-width:9em; text-indent:0em; text-align:left;",
	'.mw-editsection':"",
	'#headerContainer':""
};
self.ws_layouts['Layout 2'] = {
	'#text-wrap':"",
	'#text-container':"width:36em; margin:0 auto 0 auto; font-family:Georgia,serif;",
	'#text':"text-align:justify;",
	'.sidenote-right':"position:absolute; left:37em; width:16em; text-indent:0em; text-align:left;",
	'.sidenote-left':"position:absolute; left:37em; width:16em; text-indent:0em; text-align:left;",
	'.mw-editsection':"",
	'#headerContainer':"font-family:sans-serif;"
};
self.ws_layouts['Layout 3'] = {
	'#text-wrap':"",
	'#text-container':"min-width:60em; float:left; width:100%; margin-right:-23em;",
	'#text':"position:relative; text-align:justify; margin-right:23em; text-indent:0em; padding-left:0px; padding-right:0px; width:auto;",
	'.sidenote-right':"position:absolute; right:-10em; width:9em; background-color:#eeeeee; text-indent:0em; text-align:left;",
	'.sidenote-left':"position:absolute; right:-10em; width:9em; background-color:#eeeeee; text-indent:0em; text-align:left;",
	'.mw-editsection':"",
	'#headerContainer':"position:absolute; top:0em; right:-23em; width:21em; float:right; text-align:left;"
};
self.ws_layouts['Proposed Layout'] = {
	'#text-wrap':"",
	'#text-container':"",
	'#text':"margin-right:calc(1rem * 9); text-align:justify;",
	'.sidenote-right':"position:absolute; right:-10em; width:9.00em; background-color:#eeeeee; text-indent:0.00em; text-align:left;",
	'.sidenote-left':"position:absolute; right:-10em; width:9.00em; background-color:#eeeeee; text-indent:0.00em; text-align:left;",
	'.mw-editsection':"",
	'#headerContainer':"font-family:sans-serif;"
};

/* stop faux red links on fresh links */
$( "div.mw-body a" ).removeClass( "stub" );

/*
 * Envelope subNotes found in main navigation header derivatives
 * Namespace coverage: Main (ns-0), Translation (ns-114)
 * See also _____
 * 
 * Ver 0.10, 01-31-2015
 */
jQuery( document ).ready( function ( $ ) {
	var nsSubNotes = [ 0, 114 ];
	if ( $.inArray( mw.config.get( 'wgNamespaceNumber' ), nsSubNotes ) !== -1 ) {
		$( 'div.subNote' ).insertBefore( $ ( 'div#ws-data' ) ); 
	}
} );
/*
 * Envelope hatNotes & similar into main navigation header container
 * Namespace coverage: Main (ns-0), Translation (ns-114)
 * See also _____
 * 
 * Ver 0.20, 01-31-2015
 */
jQuery( document ).ready( function ( $ ) {
	var nsHatNotes = [ 0, 114 ];
	if ( $.inArray( mw.config.get( 'wgNamespaceNumber' ), nsHatNotes ) !== -1 ) {
		$( 'div.similar' ).prependTo( $ ( 'div#headerContainer' ) ); 
	}
} );
/*
 * Force Footer &/or end matter out of Dynamic Layouts
 * Namespace coverage: Main (ns-0), Translation (ns-114)
 * See also _____
 * 
 * Ver 0.40, 01-31-2015
 */
jQuery( document ).ready( function ( $ ) {
	var nsFooters = [ 0, 114 ];
	if ( $.inArray( mw.config.get( 'wgNamespaceNumber' ), nsFooters ) !== -1 ) {
		$( 'table.acContainer' ).insertAfter( $( 'div.printfooter' ) );
		$( 'div.licenseContainer' ).not( 'div.licenseContainer div.licenseContainer' ).insertBefore( $( 'div#catlinks' ) ); 
	}
} );
/*
 * Force Header &/or section heading matter out of Dynamic Layouts
 * Namespace coverage: Main (ns-0), Translation (ns-114)
 * See also _____
 * 
 * Ver 0.10, 01-25-2015
 */
jQuery( document ).ready( function ( $ ) {
	var nsHeaders = [ 0, 114 ];
	if ( $.inArray( mw.config.get( 'wgNamespaceNumber' ), nsHeaders ) !== -1 ) {
		$( 'div#headerContainer' ).insertBefore( $ ( 'div#mw-content-text' ) );
		$( 'div#heedertemplate' ).insertBefore( $ ( 'div#mw-content-text' ) );
	}
} );
/**
 * PageNumbers   Dynamic Layouts helper
 *
 * removes sidebar Display Options menu from all ns except Main and Translation
 *
 */
jQuery( document ).ready( function ( $ ) {
	var nsDynamicLayouts = [ -1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 100, 101, 102, 103, 104, 105, 106, 107, 115, 828, 829 ];
	if ( $.inArray( mw.config.get( 'wgNamespaceNumber' ), nsDynamicLayouts ) !== -1 ) {
		$( 'div' ).remove( '#p-do' );
	}
} );
/* End of mw.loader.using callback */
} );
// Check in userspace using user levl js  first. cropimage formats edit form incorrectly if codestyling is active.(please disable in your editor)
importScript( 'Mediawiki:Scripts/cropimage.js' );
/* DO NOT ADD CODE BELOW THIS LINE */
//</source>