Diferencia entre revisiones de «Usuario:He7d3r/Tools/LanguageConverter.js»
Apariencia
Contenido eliminado Contenido añadido
Sin resumen de edición |
Solo en text-container |
||
Línea 73: | Línea 73: | ||
t.conv_callback=function(i){t.conv_typo_document();var o,a,s,r,g,c,l,p,d,_,u,h,f,v,m=t.settings.global_dic_page[t.lang],w=[],y=e.config.get("skin");if(!m)return alert(t.getLocalMsg("error_missing_dict_name")+t.lang),n.removeSpinner("var-spinner"),!1;if(!i)return n.removeSpinner("var-spinner"),!1;if(o=i.query,o&&(a=o.pages,s=o.pageids),!o||!a||!s)return n.removeSpinner("var-spinner"),!1;for(typeof m=="object"&&(m=m.pages||m.page),m=m.split("|"),d=0;s.length>d;d+=1)a[s[d]].pageid?w.push([a[s[d]].revisions[0]["*"],m.indexOf(a[s[d]].title)]):(alert(t.getLocalMsg("error_missing_dict")+a[s[d]].title),location.href=e.util.getUrl(null,{variant:e.config.get("wgContentLanguage")}));if(!w.length)return n.removeSpinner("var-spinner"),void 0;for(w.sort(function(e,n){return e[1]-n[1]}),d=0;w.length>d;d+=1){r=w[d][0],g=r.split("\n");for(c in g)h=/^\*\s*(\S[^:]*?)\s*:\s*([\S].*?)\s*(?:\/\/.*?)?$/.exec(g[c]),h&&(t.dictionary[h[1]]=h[2])}if(_=t.settings.local_dic_id,_&&(_=_[t.lang]),u=_?document.getElementById(_):null){r=u.innerHTML,g=r.split("\n");for(d in g)h=/^<li>\s*(\S[^:]*?)(?:\s| | )*:\s*([\S].*?)\s*(?:\/\/.*?)?<\/li>$/i.exec(g[d]),h&&(t.dictionary[h[1]]=h[2])}n.cookie(t.cookie,t.lang,{expires:7,path:"/",secure:t.secure}),v=!1,l=t.conv_text_from_dic(document.title,v),l&&(document.title=l),t.conv_node_from_dic(t.$target[0]),t.conv_text_from_template(),f=t.settings.variants_list;for(p in f)f[p]!==null&&n("#ca-conv-"+p).toggleClass("selected",p===t.lang&&y==="vector");t.settings.show_menu_title&&n("#p-variants-js").find("span").text(f[t.lang]).attr("class","flag-"+t.lang),n("#ca-conv-show-hide-changes").toggle(t.lang!==e.config.get("wgContentLanguage")),t.mustReload=!0,n.removeSpinner("var-spinner")}, |
t.conv_callback=function(i){t.conv_typo_document();var o,a,s,r,g,c,l,p,d,_,u,h,f,v,m=t.settings.global_dic_page[t.lang],w=[],y=e.config.get("skin");if(!m)return alert(t.getLocalMsg("error_missing_dict_name")+t.lang),n.removeSpinner("var-spinner"),!1;if(!i)return n.removeSpinner("var-spinner"),!1;if(o=i.query,o&&(a=o.pages,s=o.pageids),!o||!a||!s)return n.removeSpinner("var-spinner"),!1;for(typeof m=="object"&&(m=m.pages||m.page),m=m.split("|"),d=0;s.length>d;d+=1)a[s[d]].pageid?w.push([a[s[d]].revisions[0]["*"],m.indexOf(a[s[d]].title)]):(alert(t.getLocalMsg("error_missing_dict")+a[s[d]].title),location.href=e.util.getUrl(null,{variant:e.config.get("wgContentLanguage")}));if(!w.length)return n.removeSpinner("var-spinner"),void 0;for(w.sort(function(e,n){return e[1]-n[1]}),d=0;w.length>d;d+=1){r=w[d][0],g=r.split("\n");for(c in g)h=/^\*\s*(\S[^:]*?)\s*:\s*([\S].*?)\s*(?:\/\/.*?)?$/.exec(g[c]),h&&(t.dictionary[h[1]]=h[2])}if(_=t.settings.local_dic_id,_&&(_=_[t.lang]),u=_?document.getElementById(_):null){r=u.innerHTML,g=r.split("\n");for(d in g)h=/^<li>\s*(\S[^:]*?)(?:\s| | )*:\s*([\S].*?)\s*(?:\/\/.*?)?<\/li>$/i.exec(g[d]),h&&(t.dictionary[h[1]]=h[2])}n.cookie(t.cookie,t.lang,{expires:7,path:"/",secure:t.secure}),v=!1,l=t.conv_text_from_dic(document.title,v),l&&(document.title=l),t.conv_node_from_dic(t.$target[0]),t.conv_text_from_template(),f=t.settings.variants_list;for(p in f)f[p]!==null&&n("#ca-conv-"+p).toggleClass("selected",p===t.lang&&y==="vector");t.settings.show_menu_title&&n("#p-variants-js").find("span").text(f[t.lang]).attr("class","flag-"+t.lang),n("#ca-conv-show-hide-changes").toggle(t.lang!==e.config.get("wgContentLanguage")),t.mustReload=!0,n.removeSpinner("var-spinner")}, |
||
t.startConversion=function(i){var o,a,s,r,g,c,l;if(t.lang=i,t.regClass=RegExp("(?:\\s|^)(?:v-"+t.lang+"|diff-(?:context|deletedline|addedline)|"+t.settings.no_conversion_class+")(?:\\s|$)"),t.regTypoChanges=[],r=t.settings.typo_changes,r&&(r=r[t.lang]),r) if(r.constructor===Array)for(o=0;r.length>o;o+=1)g=r[o],g.length===2&&g[1]!==null&&(typeof g[0]=="string"&&(g[0]=RegExp(e.RegExp.escape(g[0]),"g")),t.regTypoChanges.push(g));else if(r.constructor===Object)for(o in r)if(r.hasOwnProperty&&r[o]!==null)try{a=RegExp(e.RegExp.escape(o),"g"),t.regTypoChanges.push([a,r[o]])} catch(p){alert(t.getLocalMsg("error_typo_processing")+o+": "+r[o]+".\n\n"+p.message)} return i===e.config.get("wgContentLanguage")?!1:(n("#p-variants-js").injectSpinner({id:"var-spinner"}),s=t.settings.global_dic_page[t.lang],typeof s=="object"?(c=s.api,typeof c=="object"&&c.length===2&&(c=t.secure?c[1]:c[0]),s=s.pages||s.page,l=c===e.config.get("wgServer")+e.util.wikiScript("api")?"json":"jsonp"):(c=e.util.wikiScript("api"),l="json"),n.ajax({url:c,dataType:l,data:{format:"json",action:"query",titles:s,prop:"revisions",rvprop:"content",indexpageids:"1"},success:t.conv_callback}),void 0)}, |
t.startConversion=function(i){var o,a,s,r,g,c,l;if(t.lang=i,t.regClass=RegExp("(?:\\s|^)(?:v-"+t.lang+"|diff-(?:context|deletedline|addedline)|"+t.settings.no_conversion_class+")(?:\\s|$)"),t.regTypoChanges=[],r=t.settings.typo_changes,r&&(r=r[t.lang]),r) if(r.constructor===Array)for(o=0;r.length>o;o+=1)g=r[o],g.length===2&&g[1]!==null&&(typeof g[0]=="string"&&(g[0]=RegExp(e.RegExp.escape(g[0]),"g")),t.regTypoChanges.push(g));else if(r.constructor===Object)for(o in r)if(r.hasOwnProperty&&r[o]!==null)try{a=RegExp(e.RegExp.escape(o),"g"),t.regTypoChanges.push([a,r[o]])} catch(p){alert(t.getLocalMsg("error_typo_processing")+o+": "+r[o]+".\n\n"+p.message)} return i===e.config.get("wgContentLanguage")?!1:(n("#p-variants-js").injectSpinner({id:"var-spinner"}),s=t.settings.global_dic_page[t.lang],typeof s=="object"?(c=s.api,typeof c=="object"&&c.length===2&&(c=t.secure?c[1]:c[0]),s=s.pages||s.page,l=c===e.config.get("wgServer")+e.util.wikiScript("api")?"json":"jsonp"):(c=e.util.wikiScript("api"),l="json"),n.ajax({url:c,dataType:l,data:{format:"json",action:"query",titles:s,prop:"revisions",rvprop:"content",indexpageids:"1"},success:t.conv_callback}),void 0)}, |
||
t.isAllowed=function(){var n=t.settings.ns_list,i="*"===n||n[e.config.get("wgNamespaceNumber")],o=t.settings.local_dic_id,a=o[e.config.get("wgContentLanguage")]?document.getElementById(o[e.config.get("wgContentLanguage")]):!1;switch(t.settings.selection_mode){case"AND":if(!i||!a)return!1;break;case"OR":if(!i&&!a)return!1}return!0},t.load=function(){t.settings={msg:{error_missing_dict:"The following dictionary was not found:\n",error_missing_dict_name:"It is necessary to define the page name of the dictionary for ",error_word_processing:"Error has occurred while processing the following word:\n",error_typo_processing:"Error has occurred while processing the following typographic change:\n",help_page_link:"Open help page",show_changes_link:"Show changes",hide_changes_link:"Hide changes",menu_title:"Variants"},word_chars:"a-zA-Z'-",typo_changes:{},variants_list:{},ns_list:{0:!0},local_dic_id:"modernization",no_conversion_class:"no-conversion",global_dic_page:"Project:Dictionary",help_page:"Project:Language Converter",show_changes:!1,show_menu_title:!0,selection_mode:"AND",max_seq:3},n.extend(!0,t.settings,t.config),t.isAllowed()&&(t.secure=location.protocol==="https:",t.$target=n("# |
t.isAllowed=function(){var n=t.settings.ns_list,i="*"===n||n[e.config.get("wgNamespaceNumber")],o=t.settings.local_dic_id,a=o[e.config.get("wgContentLanguage")]?document.getElementById(o[e.config.get("wgContentLanguage")]):!1;switch(t.settings.selection_mode){case"AND":if(!i||!a)return!1;break;case"OR":if(!i&&!a)return!1}return!0},t.load=function(){t.settings={msg:{error_missing_dict:"The following dictionary was not found:\n",error_missing_dict_name:"It is necessary to define the page name of the dictionary for ",error_word_processing:"Error has occurred while processing the following word:\n",error_typo_processing:"Error has occurred while processing the following typographic change:\n",help_page_link:"Open help page",show_changes_link:"Show changes",hide_changes_link:"Hide changes",menu_title:"Variants"},word_chars:"a-zA-Z'-",typo_changes:{},variants_list:{},ns_list:{0:!0},local_dic_id:"modernization",no_conversion_class:"no-conversion",global_dic_page:"Project:Dictionary",help_page:"Project:Language Converter",show_changes:!1,show_menu_title:!0,selection_mode:"AND",max_seq:3},n.extend(!0,t.settings,t.config),t.isAllowed()&&(t.secure=location.protocol==="https:",t.$target=n("#text-container"),t.$target.length||(t.$target=n("#mw-content-text")),t.lang=t.get_preferred_variant(),n.cookie(t.cookie,t.lang,{expires:7,path:"/",secure:t.secure}),t.render_navigation(),t.startConversion(t.lang))},n.when(e.loader.using(["mediawiki.util","jquery.cookie","jquery.spinner","mediawiki.RegExp"]),n.ready).then(function(){t.load(),self.gadget_typographie&&!self.gadget_mod2&&t.conv_typo_document()})}(mediaWiki,jQuery,window.LanguageConverter); |
||
// </nowiki> |
// </nowiki> |
Revisión del 16:35 9 jul 2017
// Keep the line below. It is used to check the global usage of the script at [[Special:GlobalUsage/User:He7d3r/Tools/LanguageConverter.js]]
// [[File:User:He7d3r/Tools/LanguageConverter.js]] (workaround for [[phab:T35355]])
/*jslint browser: true, white: true */
/*global mw */
if ( window.LanguageConverter === undefined ) {
window.LanguageConverter = { };
}
// Define as configurações específicas para o es.Wikisource
window.LanguageConverter.config = {
msg: {
error_missing_dict : 'El siguiente diccionario no pudo ser encontrado: ',
error_word_processing : 'Existe un error al procesar la siguiente palabra: ',
help_page_link : 'Ayuda', // Change this when you create a local help page (see bellow)
show_changes_link : 'Mostrar cambios',
hide_changes_link : 'Ocultar cambios'
},
word_chars : 'a-záàâãçéêẽíóòôõq̃úűüũñA-ZÁÀÂÃÇÉÊẼÍÓÒÔÕQ̃ÚŰÜŨÑ\'-', // Do you need every character in this list? Any other?
variants_list : {
'es':'Ortografía original', // Default language == wgContentLanguage
'es-act':'Ortografía actual'
},
typo_changes : {
'es-act': {
'æ': 'ae',
'ff': 'ff',
'ʃ': 's'
}
},
ns_list : {
'0': true, // Principal
'2': false, // Usuario
'4': true, // Wikisource
'10': true, //Plantilla
'14': false, // Categoría
'102': true, // Página
'104': true // Índice
},
local_dic_id : {
'es':'conv-idiomas',
'es-act':'dic-local-es-act'
},
no_conversion_class : 'no-conversion', // You may want to choose another name (without spaces), but it is probably good idea to avoid accented letters here
global_dic_page : {
'es-act':'Wikisource:Diccionario'
},
help_page : 'Wikisource:Modernización de textos', // You can change this when you create a local help page
show_changes : false,
show_menu_title : true,
selection_mode: 'AND',
max_seq : 3
}; // Config
// Importa [[m:User:He7d3r/Tools/LanguageConverter.js]] para permitir a conversão de idiomas
//mw.loader.load( 'https://meta.wikimedia.org/w/index.php?title=User:He7d3r/Tools/LanguageConverter.js&action=raw&ctype=text/javascript' );
// <nowiki>
window.LanguageConverter===void 0&&(window.LanguageConverter={}),function(e,n,t){"use strict";t.version="2.35",t.cookie=e.config.get("wgCookiePrefix")+"-lang-variant",t.dictionary===void 0&&(t.dictionary={}),t.variant_links={},t.mustReload=!1,
t.getLocalMsg=function(n){var i=t.settings.msg,o=i[n];if(typeof o=="string")return o;if(typeof o=="object"){if(o[t.lang])return o[t.lang];if(o[e.config.get("wgContentLanguage")])return o[e.config.get("wgContentLanguage")];if(o.en)return o.en}return!1},
t.get_URL_variant=function(){var n=e.util.getParamValue("variant"),i=t.settings.variants_list;return i[n]?n:null},
t.get_cookie_variant=function(){var e=n.cookie(t.cookie),i=t.settings.variants_list;return i[e]?e:null},
t.get_preferred_variant=function(){var n=t.get_URL_variant()||t.get_cookie_variant()||e.config.get("wgContentLanguage");return n},
t.toggle_visibility=function(){var e=!t.settings.show_changes;t.settings.show_changes=e,t.$target.toggleClass("show-changes",e),n("#ca-conv-show-hide-changes").find("a").text(e?t.getLocalMsg("hide_changes_link"):t.getLocalMsg("show_changes_link"))},
t.createPortlet=function(){var i,o=e.config.get("skin");switch(o){case"vector":i=n("#p-cactions").clone().find("li").remove().end().attr({id:"p-variants-js","class":"vectorMenu emptyPortlet"}).find("span").text(t.getLocalMsg("menu_title")).addClass("flag-"+t.lang).end().appendTo("#left-navigation");break;default:i=n("#p-tb").clone().attr("id","p-variants-js").find("li").remove().end().find("h5").text(t.getLocalMsg("menu_title")).end().insertBefore("#p-tb")}},
t.render_navigation=function(){var i,o,a=t.settings.variants_list,s=t.settings.show_changes,r=e.config.get("skin"),g=function(n){return function(i){i.preventDefault(),n!==t.lang&&(t.mustReload?location.href=e.util.getUrl(null,{variant:n}):t.startConversion(n))}};t.$target.toggleClass("show-changes",s),t.createPortlet();for(i in a)a[i]!==null&&(o=i===t.lang&&r==="vector",n(e.util.addPortletLink("p-variants-js","#",a[i],"ca-conv-"+i)).toggleClass("selected",o).click(g(i)),o&&n("#p-variants-js").find("span").text(a[i]));t.settings.help_page&&t.getLocalMsg("help_page_link")&&e.util.addPortletLink("p-variants-js",e.util.getUrl(t.settings.help_page),t.getLocalMsg("help_page_link"),"ca-conv-help-page"),t.getLocalMsg("show_changes_link")&&t.getLocalMsg("hide_changes_link")&&n(e.util.addPortletLink("p-variants-js","#",s?t.getLocalMsg("hide_changes_link"):t.getLocalMsg("show_changes_link"),"ca-conv-show-hide-changes")).click(function(e){e.preventDefault(),t.toggle_visibility()}),n("#ca-conv-show-hide-changes").toggle(t.lang!==e.config.get("wgContentLanguage"))},
t.conv_typo_text=function(e){var n,i,o=t.regTypoChanges.length;for(n=0;o>n;n+=1){i=t.regTypoChanges[n];try{e=e.replace(i[0],i[1])}catch(a){alert(t.getLocalMsg("error_typo_processing")+i[0]+": "+i[1]+".\n\n"+a.message)}}return e},
t.conv_typo_node=function(e){var n;if(e.nodeType===3)e.data=t.conv_typo_text(e.data);else for(n=0;e.childNodes.length>n;n+=1)e.id==="editform"||e.className.match(t.regClass)||t.conv_typo_node(e.childNodes[n])},
t.conv_typo_document=function(){t.isAllowed()&&(document.title=t.conv_typo_text(document.title),t.conv_typo_node(t.$target[0]))},
t.reg_split=function(e,n){var t,i,o,a,s=[],r=0,g=(n.ignoreCase?"i":"")+(n.multiline?"m":"")+(n.sticky?"y":"");n=RegExp(n.source,g+"g");var c=/()??/.exec("")[1]===void 0;e+="",c||(t=RegExp("^"+n.source+"$(?!\\s)",g)),i=n.exec(e);var l=function(){var e;for(e=1;arguments.length-2>e;e+=1)arguments[e]===void 0&&(i[e]=void 0)};while(i)o=i.index+i[0].length,o>r&&(s.push(e.slice(r,i.index)),!c&&i.length>1&&i[0].replace(t,l),i.length>1&&e.length>i.index&&Array.prototype.push.apply(s,i.slice(1)),a=i[0].length,r=o),n.lastIndex===i.index&&(n.lastIndex+=1),i=n.exec(e);return r===e.length?(!n.test("")||a)&&s.push(""):s.push(e.slice(r)),s},
t.conv_text_from_dic=function(n,i){var o,a,s,r,g,c,l,p,d,_,u,h,f=RegExp("([^"+t.settings.word_chars+"]+)",""),v=t.reg_split(n,f),m=null,w=t.dictionary;n="",i&&(c=['<span class="v-'+t.lang+'" title="',null,'">',null,"</span>"]);e:for(o=0,s=v.length;s>o;o+=1)if(l=v[o])try{for(r=t.settings.max_seq;r>0;r-=1)if(!(o+2*(r-1)>=s)){for(a=1,g=l;r>a;a+=1)g+=" "+v[o+2*a];if(d=w.hasOwnProperty(g)?w[g]:null,d||(_=g.toLowerCase(),u=g[0].toUpperCase()+_.substring(1),h=g.toUpperCase(),h===g?w.hasOwnProperty(u)?d=w[u].toUpperCase():w.hasOwnProperty(_)&&(d=w[_].toUpperCase()):u===g&&w.hasOwnProperty(_)&&(d=w[_][0].toUpperCase()+w[_].substring(1))),d){i?(c[1]=e.html.escape(g),c[3]=e.html.escape(d),n+=c.join("")):n+=e.html.escape(d),m=!0,o+=2*r-2;continue e}}"&"===l&&"fr"===e.config.get("wgContentLanguage")?(p=v[o-2],d=p&&p===p.toUpperCase()?"ET":"et",i?(c[1]=e.html.escape(l),c[3]=e.html.escape(d),n+=c.join("")):n+=e.html.escape(d),m=!0):n+=e.html.escape(l)}catch(y){alert(t.getLocalMsg("error_word_processing")+v[o]+".\n\n"+y.message)}return m?n:null},
t.conv_text_from_template = function () {
// {{modernizar}}
$( t.$target ).find( "span[data-ortho-orig]" ).each(function() {
$( this ).text($( this ).attr("data-ortho-variant")).addClass("v-es-act");});};
t.conv_node_from_dic=function(e){var i,o,a=!0;if(e.nodeType===3)i=t.conv_text_from_dic(e.data,a),i&&n(e).replaceWith(i);else for(o=0;e.childNodes.length>o;o+=1)e.id==="editform"||e.className.match(t.regClass)||t.conv_node_from_dic(e.childNodes[o])},
t.conv_callback=function(i){t.conv_typo_document();var o,a,s,r,g,c,l,p,d,_,u,h,f,v,m=t.settings.global_dic_page[t.lang],w=[],y=e.config.get("skin");if(!m)return alert(t.getLocalMsg("error_missing_dict_name")+t.lang),n.removeSpinner("var-spinner"),!1;if(!i)return n.removeSpinner("var-spinner"),!1;if(o=i.query,o&&(a=o.pages,s=o.pageids),!o||!a||!s)return n.removeSpinner("var-spinner"),!1;for(typeof m=="object"&&(m=m.pages||m.page),m=m.split("|"),d=0;s.length>d;d+=1)a[s[d]].pageid?w.push([a[s[d]].revisions[0]["*"],m.indexOf(a[s[d]].title)]):(alert(t.getLocalMsg("error_missing_dict")+a[s[d]].title),location.href=e.util.getUrl(null,{variant:e.config.get("wgContentLanguage")}));if(!w.length)return n.removeSpinner("var-spinner"),void 0;for(w.sort(function(e,n){return e[1]-n[1]}),d=0;w.length>d;d+=1){r=w[d][0],g=r.split("\n");for(c in g)h=/^\*\s*(\S[^:]*?)\s*:\s*([\S].*?)\s*(?:\/\/.*?)?$/.exec(g[c]),h&&(t.dictionary[h[1]]=h[2])}if(_=t.settings.local_dic_id,_&&(_=_[t.lang]),u=_?document.getElementById(_):null){r=u.innerHTML,g=r.split("\n");for(d in g)h=/^<li>\s*(\S[^:]*?)(?:\s| | )*:\s*([\S].*?)\s*(?:\/\/.*?)?<\/li>$/i.exec(g[d]),h&&(t.dictionary[h[1]]=h[2])}n.cookie(t.cookie,t.lang,{expires:7,path:"/",secure:t.secure}),v=!1,l=t.conv_text_from_dic(document.title,v),l&&(document.title=l),t.conv_node_from_dic(t.$target[0]),t.conv_text_from_template(),f=t.settings.variants_list;for(p in f)f[p]!==null&&n("#ca-conv-"+p).toggleClass("selected",p===t.lang&&y==="vector");t.settings.show_menu_title&&n("#p-variants-js").find("span").text(f[t.lang]).attr("class","flag-"+t.lang),n("#ca-conv-show-hide-changes").toggle(t.lang!==e.config.get("wgContentLanguage")),t.mustReload=!0,n.removeSpinner("var-spinner")},
t.startConversion=function(i){var o,a,s,r,g,c,l;if(t.lang=i,t.regClass=RegExp("(?:\\s|^)(?:v-"+t.lang+"|diff-(?:context|deletedline|addedline)|"+t.settings.no_conversion_class+")(?:\\s|$)"),t.regTypoChanges=[],r=t.settings.typo_changes,r&&(r=r[t.lang]),r) if(r.constructor===Array)for(o=0;r.length>o;o+=1)g=r[o],g.length===2&&g[1]!==null&&(typeof g[0]=="string"&&(g[0]=RegExp(e.RegExp.escape(g[0]),"g")),t.regTypoChanges.push(g));else if(r.constructor===Object)for(o in r)if(r.hasOwnProperty&&r[o]!==null)try{a=RegExp(e.RegExp.escape(o),"g"),t.regTypoChanges.push([a,r[o]])} catch(p){alert(t.getLocalMsg("error_typo_processing")+o+": "+r[o]+".\n\n"+p.message)} return i===e.config.get("wgContentLanguage")?!1:(n("#p-variants-js").injectSpinner({id:"var-spinner"}),s=t.settings.global_dic_page[t.lang],typeof s=="object"?(c=s.api,typeof c=="object"&&c.length===2&&(c=t.secure?c[1]:c[0]),s=s.pages||s.page,l=c===e.config.get("wgServer")+e.util.wikiScript("api")?"json":"jsonp"):(c=e.util.wikiScript("api"),l="json"),n.ajax({url:c,dataType:l,data:{format:"json",action:"query",titles:s,prop:"revisions",rvprop:"content",indexpageids:"1"},success:t.conv_callback}),void 0)},
t.isAllowed=function(){var n=t.settings.ns_list,i="*"===n||n[e.config.get("wgNamespaceNumber")],o=t.settings.local_dic_id,a=o[e.config.get("wgContentLanguage")]?document.getElementById(o[e.config.get("wgContentLanguage")]):!1;switch(t.settings.selection_mode){case"AND":if(!i||!a)return!1;break;case"OR":if(!i&&!a)return!1}return!0},t.load=function(){t.settings={msg:{error_missing_dict:"The following dictionary was not found:\n",error_missing_dict_name:"It is necessary to define the page name of the dictionary for ",error_word_processing:"Error has occurred while processing the following word:\n",error_typo_processing:"Error has occurred while processing the following typographic change:\n",help_page_link:"Open help page",show_changes_link:"Show changes",hide_changes_link:"Hide changes",menu_title:"Variants"},word_chars:"a-zA-Z'-",typo_changes:{},variants_list:{},ns_list:{0:!0},local_dic_id:"modernization",no_conversion_class:"no-conversion",global_dic_page:"Project:Dictionary",help_page:"Project:Language Converter",show_changes:!1,show_menu_title:!0,selection_mode:"AND",max_seq:3},n.extend(!0,t.settings,t.config),t.isAllowed()&&(t.secure=location.protocol==="https:",t.$target=n("#text-container"),t.$target.length||(t.$target=n("#mw-content-text")),t.lang=t.get_preferred_variant(),n.cookie(t.cookie,t.lang,{expires:7,path:"/",secure:t.secure}),t.render_navigation(),t.startConversion(t.lang))},n.when(e.loader.using(["mediawiki.util","jquery.cookie","jquery.spinner","mediawiki.RegExp"]),n.ready).then(function(){t.load(),self.gadget_typographie&&!self.gadget_mod2&&t.conv_typo_document()})}(mediaWiki,jQuery,window.LanguageConverter);
// </nowiki>