http://cs-ii.demopaedia.org/w/api.php?action=feedcontributions&user=Nicolas+Brouard&feedformat=atom
Demopædia - Příspěvky uživatele [cs]
2024-03-29T13:24:40Z
Příspěvky uživatele
MediaWiki 1.28.0
http://cs-ii.demopaedia.org/w/index.php?title=MediaWiki:Edittools&diff=12953
MediaWiki:Edittools
2017-06-25T20:18:53Z
<p>Nicolas Brouard: naimportována 1 revize</p>
<hr />
<div><div id="editpage-specialchars" style="margin-top: 15px; border: 1px solid #aaaaaa; padding: 2px;" class="edittools-text edittools-version-045"><!-- INCREMENT THIS VERSION NUMBER TO MAKE CHANGES TO [[MediaWiki:Edittools.js]] LIVE --><br />
<!--<br />
This div gets automatically replaced with the actual edit tools by the code in [[MediaWiki:Edittools.js]]. Please make any changes there. Any content is this div is only shown to users with JavaScript turned off (or unsupported).<br />
--><br />
'''Copy and paste:''' – — ° ″ ′ ≈ ≠ ≤ ≥ ± − × ÷ ← → · § &nbsp; '''Sign your posts on talk pages:''' <nowiki>~~~~</nowiki><br />
----<br />
<small><br />
Special Multilingual Demographic Dictionary :<br />
{{TextTerm|Demography|1}} is ... interdisciplinary fields such as {{NonRefTerm|economic demography}} ({{RefNumber|10|4|1}}), <br />
{{Note|1| {{NoteTerm|demographer}}, n.: a specialist in demography.}}<br />
<pre><br />
{{TextTerm|Demography|1}} is ... interdisciplinary fields such as {{NonRefTerm|economic demography}} ({{RefNumber|10|4|1}}), <br />
{{Note|1| {{NoteTerm|demographer}}, n.: a specialist in demography.}}</pre><br />
<charinsert><nowiki>{{</nowiki>TextTerm|+|}} <nowiki>{{</nowiki>RefNumber|+||}} <nowiki>{{</nowiki>Note|+|}} <nowiki>{{</nowiki>NoteTerm|}}</charinsert><br />
<nowiki>{{}}</nowiki> &nbsp; <nowiki>{{{}}}</nowiki> &nbsp; | &nbsp; <nowiki>[]</nowiki> &nbsp; <nowiki>[[]]</nowiki> &nbsp; <nowiki>[[Category:]]</nowiki> &nbsp; <nowiki>#REDIRECT [[]]</nowiki> &nbsp; &amp;nbsp; &nbsp; &lt;s>&lt;/s> &nbsp; &lt;sup>&lt;/sup> &nbsp; &lt;sub>&lt;/sub> &nbsp; &lt;code>&lt;/code> &nbsp; &lt;pre>&lt;/pre> &nbsp; &lt;blockquote>&lt;/blockquote> &nbsp; &lt;ref>&lt;/ref> &nbsp; <nowiki><br />
{{Reflist}}</nowiki> &nbsp; &lt;references/> &nbsp; &lt;includeonly>&lt;/includeonly> &nbsp; &lt;noinclude>&lt;/noinclude> &nbsp; <nowiki>{{DEFAULTSORT:}}</nowiki> &nbsp; &lt;nowiki>&lt;/nowiki> &nbsp; &lt;!-- --> &nbsp; &lt;span class="plainlinks">&lt;/span><br />
</small><br />
----<br />
<small><br />
'''Symbols:''' ~ | ¡ ¿ † ‡ ↔ ↑ ↓ • ¶ &nbsp; # ½ ⅓ ⅔ ¼ ¾ ⅛ ⅜ ⅝ ⅞ ∞ &nbsp; ‘ ’ “ ” «» &nbsp; ¤ ₳ ฿ ₵ ¢ ₡ ₢ $ ₫ ₯ € ₠ ₣ ƒ ₴ ₭ ₤ ℳ ₥ ₦ № ₧ ₰ £ ៛ ₨ ₪ ৳ ₮ ₩ ¥ &nbsp; ♠ ♣ ♥ ♦ &nbsp; m² m³ &nbsp; ♭ ♯ ♮ &nbsp; © ® ™<br /><br />
'''Latin:''' A a Á á À à  â Ä ä Ǎ ǎ Ă ă Ā ā à ã Å å Ą ą Æ æ Ǣ ǣ &nbsp; B b &nbsp; C c Ć ć Ċ ċ Ĉ ĉ Č č Ç ç &nbsp; D d Ď ď Đ đ Ḍ ḍ Ð ð &nbsp; E e É é È è Ė ė Ê ê Ë ë Ě ě Ĕ ĕ Ē ē Ẽ ẽ Ę ę Ə ə &nbsp; F f &nbsp; G g Ġ ġ Ĝ ĝ Ğ ğ Ģ ģ &nbsp; H h Ĥ ĥ Ħ ħ Ḥ ḥ &nbsp; I i İ ı Í í Ì ì Î î Ï ï Ǐ ǐ Ĭ ĭ Ī ī Ĩ ĩ Į į &nbsp; J j Ĵ ĵ &nbsp; K k Ķ ķ &nbsp; L l Ĺ ĺ Ŀ ŀ Ľ ľ Ļ ļ Ł ł Ḷ ḷ Ḹ ḹ &nbsp; M m Ṃ ṃ &nbsp; N n Ń ń Ň ň Ñ ñ Ņ ņ Ṇ ṇ &nbsp; O o Ó ó Ò ò Ô ô Ö ö Ǒ ǒ Ŏ ŏ Ō ō Õ õ Ǫ ǫ Ő ő Ø ø Œ œ &nbsp; P p &nbsp; Q q &nbsp; R r Ŕ ŕ Ř ř Ŗ ŗ Ṛ ṛ Ṝ ṝ &nbsp; S s Ś ś Ŝ ŝ Š š Ş ş Ș ș Ṣ ṣ ß &nbsp; T t Ť ť Ţ ţ Ț ț Ṭ ṭ Þ þ &nbsp; U u Ú ú Ù ù Û û Ü ü Ǔ ǔ Ŭ ŭ Ū ū Ũ ũ Ů ů Ų ų Ű ű Ǘ ǘ Ǜ ǜ Ǚ ǚ Ǖ ǖ &nbsp; V v &nbsp; W w Ŵ ŵ &nbsp; X x &nbsp; Y y Ý ý Ŷ ŷ Ÿ ÿ Ỹ ỹ Ȳ ȳ &nbsp; Z z Ź ź Ż ż Ž ž &nbsp; ß Ð ð Þ þ Ə ə &nbsp; <nowiki>{{Unicode|}}</nowiki> <br /><br />
'''Greek:''' Ά ά Έ έ Ή ή Ί ί Ό ό Ύ ύ Ώ ώ &nbsp; Α α Β β Γ γ Δ δ &nbsp; Ε ε Ζ ζ Η η Θ θ &nbsp; Ι ι Κ κ Λ λ Μ μ &nbsp; Ν ν Ξ ξ Ο ο Π π &nbsp; Ρ ρ Σ σ ς Τ τ Υ υ &nbsp; Φ φ Χ χ Ψ ψ Ω ω &nbsp; <nowiki>{{Polytonic|}}</nowiki> <br /><br />
'''Cyrillic:''' А а Б б В в Г г &nbsp; Ґ ґ Ѓ ѓ Д д Ђ ђ &nbsp; Е е Ё ё Є є Ж ж &nbsp; З з Ѕ ѕ И и І і &nbsp; Ї ї Й й Ј ј К к &nbsp; Ќ ќ Л л Љ љ М м &nbsp; Н н Њ њ О о П п &nbsp; Р р С с Т т Ћ ћ &nbsp; У у Ў ў Ф ф Х х &nbsp; Ц ц Ч ч Џ џ Ш ш &nbsp; Щ щ Ъ ъ Ы ы Ь ь &nbsp; Э э Ю ю Я я &nbsp; ́ <br /><br />
'''IPA:''' t̪ d̪ ʈ ɖ ɟ ɡ ɢ ʡ ʔ &nbsp; ɸ ʃ ʒ ɕ ʑ ʂ ʐ ʝ ɣ ʁ ʕ ʜ ʢ ɦ &nbsp; ɱ ɳ ɲ ŋ ɴ &nbsp; ʋ ɹ ɻ ɰ &nbsp; ʙ ʀ ɾ ɽ &nbsp; ɫ ɬ ɮ ɺ ɭ ʎ ʟ &nbsp; ɥ ʍ ɧ &nbsp; ɓ ɗ ʄ ɠ ʛ &nbsp; ʘ ǀ ǃ ǂ ǁ &nbsp; ɨ ʉ ɯ &nbsp; ɪ ʏ ʊ &nbsp; ɘ ɵ ɤ &nbsp; ə ɚ &nbsp; ɛ ɜ ɝ ɞ ʌ ɔ &nbsp; ɐ ɶ ɑ ɒ &nbsp; ʰ ʷ ʲ ˠ ˤ ⁿ ˡ &nbsp; ˈ ˌ ː ˑ ̪ &nbsp; <nowiki>{{IPA|}}</nowiki><br />
</small><br />
<!--<br />
Everything up to here gets automatically replaced with the JavaScript edit tools for users with JavaScript enabled.<br />
--><br />
</div><br />
<br />
<div style="margin-top: 1em;" id="editpage-copywarn2"><br />
<strong style="font-size: 130%;">Please note:</strong><br />
* When you click Save page, your changes will immediately become visible to everyone. If you wish to run a test, please edit the [[Wikipedia:Sandbox|Sandbox]] instead.<br />
*Please post only [[Wikipedia:Wikipedia is an encyclopedia|encyclopedic]] information that can be [[Wikipedia:Verifiability|verified]] by external sources. Please maintain a [[Wikipedia:Neutral point of view|neutral]], unbiased point of view.<br />
* Please [[Wikipedia:Copy-paste|do not copy and paste]] from copyrighted websites – only [[Wikipedia:public domain|public domain]] resources can be copied without permission.<br />
</div></div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=MediaWiki:RefToolbarTextTerm.js&diff=12955
MediaWiki:RefToolbarTextTerm.js
2017-06-25T20:18:53Z
<p>Nicolas Brouard: naimportována 1 revize</p>
<hr />
<div>/*jshint smarttabs:true, loopfunc:true,forin:false*/<br />
/*global mw, $, importScript */<br />
// TODO: make autodate an option in the CiteTemplate object, not a preference<br />
<br />
// Global object<br />
// TODO:<br />
// * Remove this once the page is moved to a module 'ext.gadget.refToolbarDialogs' depending on 'ext.gadget.refToolbarBase'<br />
if (typeof CiteTB === 'undefined') {<br />
var CiteTB = {<br />
"Templates" : {}, // All templates<br />
"Options" : {}, // Global options<br />
"UserOptions" : {}, // User options<br />
"DefaultOptions" : {}, // Script defaults<br />
"ErrorChecks" : {} // Error check functions<br />
};<br />
}<br />
<br />
// Only execute on edit, unless it is a user JS/CSS page<br />
// TODO: Remove tests already done by [[MediaWiki:Gadget-refToolbar.js]]<br />
if (<br />
( mw.config.get('wgAction') === 'edit' || mw.config.get('wgAction') === 'submit' ) &&<br />
( ( mw.config.get('wgNamespaceNumber') !== 2 && mw.config.get('wgNamespaceNumber') !== 4 ) ||<br />
( mw.config.get('wgPageName').indexOf('.js') === -1 && mw.config.get('wgPageName').indexOf('.css') === -1 ) )<br />
) {<br />
<br />
// TODO: Move this to [[MediaWiki:Gadget-refToolbarDialogs.css]] and add it to the definition of module 'ext.gadget.refToolbarDialogs'<br />
mw.util.addCSS(".cite-form-td {"+<br />
"height: 0 !important;"+<br />
"padding: 0.1em !important;"+<br />
"}"); <br />
<br />
// Default options, these mainly exist so the script won't break if a new option is added<br />
CiteTB.DefaultOptions = {<br />
"date format" : "<year>-<zmonth>-<zdate>",<br />
"autodate fields" : [],<br />
"months" : ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],<br />
"modal" : true,<br />
"autoparse" : false,<br />
"expandtemplates": false<br />
};<br />
<br />
// Get an option - user settings override global which override defaults<br />
CiteTB.getOption = function(opt) {<br />
if (CiteTB.UserOptions[opt] !== undefined) {<br />
return CiteTB.UserOptions[opt];<br />
} else if (CiteTB.Options[opt] !== undefined) {<br />
return CiteTB.Options[opt];<br />
}<br />
return CiteTB.DefaultOptions[opt];<br />
};<br />
<br />
CiteTB.init = function() {<br />
/* Main stuff, build the actual toolbar structure<br />
* 1. get the template list, make the dropdown list and set up the template dialog boxes<br />
* 2. actually build the toolbar:<br />
* * A section for cites<br />
* ** dropdown for the templates (previously defined)<br />
* ** button for named refs with a dialog box<br />
* ** button for errorcheck<br />
* 3. add the whole thing to the main toolbar<br />
*/<br />
<br />
if (typeof $('div[rel=cites]')[0] !== 'undefined') { // Mystery IE bug workaround<br />
return;<br />
}<br />
$('head').trigger('reftoolbarbase');<br />
var $target = $('#wpTextbox1');<br />
var temlist = {};<br />
for (var t in CiteTB.Templates) {<br />
var tem = CiteTB.Templates[t];<br />
var sform = CiteTB.escStr(tem.shortform);<br />
var actionobj = { <br />
type: 'dialog',<br />
module: 'cite-dialog-'+sform<br />
};<br />
var dialogobj = {};<br />
dialogobj['cite-dialog-'+sform] = {<br />
resizeme: false,<br />
titleMsg: 'cite-dialog-'+sform, <br />
id: 'citetoolbar-'+sform,<br />
init: function() {}, <br />
html: tem.getInitial(), <br />
dialog: {<br />
width:675,<br />
open: function() { <br />
$(this).html(CiteTB.getOpenTemplate().getForm());<br />
/** @param {jQuery.Event} e */<br />
$('.cite-prev-parse').bind( 'click', function ( e ) {<br />
e.preventDefault();<br />
CiteTB.prevParseClick();<br />
});<br />
},<br />
buttons: {<br />
'cite-form-submit': function() {<br />
var ref = CiteTB.getRef(false, true);<br />
$(this).dialog( 'close' );<br />
$.wikiEditor.modules.toolbar.fn.doAction( $(this).data( 'context' ), {<br />
type: 'encapsulate',<br />
options: {<br />
post: ref<br />
}<br />
}, $(this) );<br />
},<br />
'cite-form-showhide': CiteTB.showHideExtra,<br />
'cite-refpreview': function() { <br />
var ref = CiteTB.getRef(false, false);<br />
var template = CiteTB.getOpenTemplate();<br />
var div = $("#citetoolbar-"+CiteTB.escStr(template.shortform));<br />
div.find('.cite-preview-label').show();<br />
div.find('.cite-ref-preview').text(ref).show();<br />
if (CiteTB.getOption('autoparse')) {<br />
CiteTB.prevParseClick();<br />
} else {<br />
div.find('.cite-prev-parse').show();<br />
div.find('.cite-prev-parsed-label').hide();<br />
div.find('.cite-preview-parsed').html('');<br />
} <br />
},<br />
'wikieditor-toolbar-tool-link-cancel': function() {<br />
$(this).dialog( 'close' );<br />
},<br />
'cite-form-reset': function() {<br />
CiteTB.resetForm();<br />
}<br />
}<br />
} <br />
};<br />
$target.wikiEditor('addDialog', dialogobj);<br />
//if (!CiteTB.getOption('modal')) {<br />
//$('#citetoolbar-'+sform).dialog('option', 'modal', false);<br />
//}<br />
temlist[sform] = {label: tem.templatename, action: actionobj }; <br />
}<br />
<br />
var refsection = {<br />
'sections': {<br />
'cites': { <br />
type: 'toolbar', <br />
labelMsg: 'cite-section-label',<br />
groups: { <br />
'template': {<br />
tools: {<br />
'template': {<br />
type: 'select',<br />
labelMsg: 'cite-template-list',<br />
list: temlist<br />
} <br />
}<br />
},<br />
'namedrefs': {<br />
labelMsg: 'cite-named-refs-label',<br />
tools: {<br />
'nrefs': {<br />
type: 'button',<br />
action: {<br />
type: 'dialog',<br />
module: 'cite-toolbar-namedrefs'<br />
},<br />
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/b/be/Nuvola_clipboard_lined.svg/22px-Nuvola_clipboard_lined.svg.png',<br />
section: 'cites',<br />
group: 'namedrefs',<br />
labelMsg: 'cite-named-refs-button'<br />
}<br />
}<br />
},<br />
'errorcheck': {<br />
labelMsg: 'cite-errorcheck-label',<br />
tools: {<br />
'echeck': {<br />
type: 'button',<br />
action: {<br />
type: 'dialog',<br />
module: 'cite-toolbar-errorcheck' <br />
},<br />
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/a/a3/Nuvola_apps_korganizer-NO.png/22px-Nuvola_apps_korganizer-NO.png',<br />
section: 'cites',<br />
group: 'errorcheck',<br />
labelMsg: 'cite-errorcheck-button'<br />
}<br />
}<br />
}<br />
} <br />
} <br />
} <br />
};<br />
<br />
var defaultdialogs = { <br />
'cite-toolbar-errorcheck': {<br />
titleMsg: 'cite-errorcheck-label',<br />
id: 'citetoolbar-errorcheck',<br />
resizeme: false,<br />
init: function() {},<br />
html: '<div id="cite-namedref-loading">'+<br />
'<img src="//upload.wikimedia.org/wikipedia/commons/4/42/Loading.gif" />'+<br />
'&nbsp;'+mw.usability.getMsg('cite-loading')+'</div>',<br />
dialog: {<br />
width:550,<br />
open: function() { <br />
CiteTB.loadRefs();<br />
},<br />
buttons: {<br />
'cite-errorcheck-submit': function() {<br />
var errorchecks = $("input[name='cite-err-test']:checked");<br />
var errors = [];<br />
for (var i=0; i<errorchecks.length; i++) {<br />
errors = errors.concat(CiteTB.ErrorChecks[$(errorchecks[i]).val()].run());<br />
}<br />
CiteTB.displayErrors(errors);<br />
$(this).dialog( 'close' ); <br />
},<br />
'wikieditor-toolbar-tool-link-cancel': function() {<br />
$(this).dialog( 'close' );<br />
}<br />
}<br />
}<br />
},<br />
'cite-toolbar-namedrefs': {<br />
titleMsg: 'cite-named-refs-title',<br />
resizeme: false,<br />
id: 'citetoolbar-namedrefs',<br />
html: '<div id="cite-namedref-loading">'+<br />
'<img src="//upload.wikimedia.org/wikipedia/commons/4/42/Loading.gif" />'+<br />
'&nbsp;'+mw.usability.getMsg('cite-loading')+'</div>',<br />
init: function() {},<br />
dialog: {<br />
width: 550,<br />
open: function() { <br />
CiteTB.loadRefs();<br />
},<br />
buttons: {<br />
'cite-form-submit': function() {<br />
var refname = $("#cite-namedref-select").val();<br />
if (refname === '') {<br />
return;<br />
}<br />
$(this).dialog( 'close' );<br />
$.wikiEditor.modules.toolbar.fn.doAction( $(this).data( 'context' ), {<br />
type: 'encapsulate',<br />
options: {<br />
post: CiteTB.getNamedRef(refname, true)<br />
}<br />
}, $(this) );<br />
},<br />
'wikieditor-toolbar-tool-link-cancel': function() {<br />
$(this).dialog( 'close' );<br />
} <br />
}<br />
} <br />
}<br />
};<br />
<br />
$target.wikiEditor('addDialog', defaultdialogs);<br />
$('#citetoolbar-namedrefs').unbind('dialogopen');<br />
if (!CiteTB.getOption('modal')) {<br />
//$('#citetoolbar-namedrefs').dialog('option', 'modal', false);<br />
//$('#citetoolbar-errorcheck').dialog('option', 'modal', false);<br />
mw.util.addCSS(".ui-widget-overlay {"+<br />
"display:none !important;"+<br />
"}"); <br />
}<br />
$target.wikiEditor('addToToolbar', refsection);<br />
};<br />
<br />
// Load local data - messages, cite templates, etc.<br />
$(document).ready( function() {<br />
switch( mw.config.get('wgUserLanguage') ) {<br />
case 'de': // German<br />
importScript('MediaWiki:RefToolbarMessages-de.js');<br />
break;<br />
default: // English<br />
importScript('MediaWiki:RefToolbarMessages-en.js');<br />
}<br />
});<br />
<br />
// Setup the main object<br />
CiteTB.mainRefList = [];<br />
CiteTB.refsLoaded = false;<br />
<br />
// REF FUNCTIONS<br />
// Actually assemble a ref from user input<br />
CiteTB.getRef = function(inneronly, forinsert) {<br />
var i;<br />
var template = CiteTB.getOpenTemplate();<br />
var templatename = template.templatename;<br />
var res = '';<br />
var refobj = {'shorttag':false};<br />
if (!inneronly) {<br />
var group = $('#cite-'+CiteTB.escStr(template.shortform)+'-group').val();<br />
var refname = $('#cite-'+CiteTB.escStr(template.shortform)+'-name').val();<br />
res += '<ref';<br />
if (refname) {<br />
refname = $.trim(refname);<br />
res+=' name='+CiteTB.getQuotedString(refname);<br />
refobj.refname = refname;<br />
}<br />
if (group) {<br />
group = $.trim(group);<br />
res+=' group='+CiteTB.getQuotedString(group);<br />
refobj.refgroup = group;<br />
}<br />
res+='>';<br />
}<br />
var content ='{{'+templatename;<br />
for( g in template.incrementables ) {<br />
group = template.incrementables[g];<br />
for (i=1; i<=group.val; i++) {<br />
for (j=0; j<group.fields.length; j++) {<br />
var fieldname = group.fields[j].field;<br />
var fieldid = fieldname.replace('<N>', i.toString());<br />
var field = $('#cite-'+CiteTB.escStr(template.shortform)+'-'+fieldid).val();<br />
if (field) {<br />
content+='|'+fieldid+'=';<br />
content+= $.trim(field);<br />
}<br />
}<br />
}<br />
}<br />
for( i=0; i<template.basic.length; i++ ) {<br />
if (template.basic[i].increment_group) {<br />
continue;<br />
}<br />
var fieldname = template.basic[i].field;<br />
var field = $('#cite-'+CiteTB.escStr(template.shortform)+'-'+fieldname).val();<br />
if (field) {<br />
content+='|'+fieldname+'=';<br />
content+= $.trim(field);<br />
}<br />
}<br />
if ($('#cite-form-status').val() !== 'closed') {<br />
for( i=0; i<template.extra.length; i++ ) {<br />
if (template.extra[i].increment_group) {<br />
continue;<br />
}<br />
var fieldname = template.extra[i].field;<br />
var field = $('#cite-'+CiteTB.escStr(template.shortform)+'-'+fieldname).val();<br />
if (field) {<br />
content+='|'+fieldname+'=';<br />
content+= $.trim(field);<br />
}<br />
}<br />
}<br />
content+= '}}';<br />
res+=content;<br />
refobj.content = content;<br />
if (!inneronly) {<br />
res+= '</ref>';<br />
}<br />
if (forinsert) {<br />
CiteTB.mainRefList.push(refobj);<br />
}<br />
return res;<br />
};<br />
<br />
// Make a reference to a named ref<br />
CiteTB.getNamedRef = function(refname, forinsert) {<br />
if (forinsert) {<br />
CiteTB.mainRefList.push( {'shorttag':true, 'refname':refname} );<br />
}<br />
return '<ref name='+CiteTB.getQuotedString(refname)+' />'; <br />
};<br />
<br />
// Function to load the ref list<br />
CiteTB.loadRefs = function() {<br />
if (CiteTB.refsLoaded) {<br />
return;<br />
}<br />
CiteTB.getPageText(CiteTB.loadRefsInternal);<br />
};<br />
<br />
// Function that actually loads the list from the page text<br />
CiteTB.loadRefsInternal = function(text) { <br />
// What this does: extract first name/group extract second name/group shorttag inner content<br />
var refsregex = /< *ref(?: +(name|group) *= *(?:"([^"]*?)"|'([^']*?)'|([^ '"\/\>]*?)) *)? *(?: +(name|group) *= *(?:"([^"]*?)"|'([^']*?)'|([^ '"\/\>]*?)) *)? *(?:\/ *>|>((?:.|\n)*?)< *\/ *ref *>)/gim;<br />
// This should work regardless of the quoting used for names/groups and for linebreaks in the inner content <br />
while (true) {<br />
var ref = refsregex.exec(text);<br />
if (ref === null) {<br />
break;<br />
}<br />
var refobj = {};<br />
if (ref[9]) { // Content + short tag check<br />
//alert('"'+ref[9]+'"');<br />
refobj.content = ref[9]; <br />
refobj.shorttag = false;<br />
} else {<br />
refobj.shorttag = true;<br />
}<br />
if (ref[1] !== '') { // First name/group<br />
if (ref[2]) {<br />
refobj['ref'+ref[1]] = ref[2];<br />
} else if (ref[3]) {<br />
refobj['ref'+ref[1]] = ref[3];<br />
} else {<br />
refobj['ref'+ref[1]] = ref[4];<br />
}<br />
}<br />
if (ref[5] !== '') { // Second name/group<br />
if (ref[6]) {<br />
refobj['ref'+ref[5]] = ref[6];<br />
} else if (ref[7]) {<br />
refobj['ref'+ref[5]] = ref[7];<br />
} else {<br />
refobj['ref'+ref[5]] = ref[8];<br />
}<br />
}<br />
CiteTB.mainRefList.push(refobj);<br />
}<br />
CiteTB.refsLoaded = true;<br />
CiteTB.setupErrorCheck();<br />
CiteTB.setupNamedRefs();<br />
};<br />
<br />
// AJAX FUNCTIONS<br />
// Parse some wikitext and hand it off to a callback function<br />
CiteTB.parse = function(text, callback) {<br />
$.post( mw.util.wikiScript( 'api' ),<br />
{action:'parse', title:mw.config.get('wgPageName'), text:text, prop:'text', format:'json'},<br />
function(data) {<br />
var html = data.parse.text['*'];<br />
callback(html);<br />
},<br />
'json'<br />
); <br />
};<br />
<br />
// Use the API to expand templates on some text<br />
CiteTB.expandtemplates = function(text, callback) {<br />
$.post( mw.util.wikiScript( 'api' ),<br />
{action:'expandtemplates', title:mw.config.get('wgPageName'), text:text, format:'json'},<br />
function(data) {<br />
var restext = data.expandtemplates['*'];<br />
callback(restext);<br />
},<br />
'json'<br />
);<br />
};<br />
<br />
// Function to get the page text<br />
CiteTB.getPageText = function(callback) {<br />
var section = $("input[name='wpSection']").val();<br />
if ( section !== '' ) {<br />
var postdata = {action:'query', prop:'revisions', rvprop:'content', pageids:mw.config.get('wgArticleId'), format:'json'};<br />
if (CiteTB.getOption('expandtemplates')) {<br />
postdata.rvexpandtemplates = '1';<br />
}<br />
$.get( mw.util.wikiScript( 'api' ),<br />
postdata,<br />
function(data) {<br />
var pagetext = data.query.pages[mw.config.get('wgArticleId').toString()].revisions[0]['*'];<br />
callback(pagetext);<br />
},<br />
'json'<br />
);<br />
} else {<br />
if (CiteTB.getOption('expandtemplates')) {<br />
CiteTB.expandtemplates($('#wpTextbox1').wikiEditor('getContents').text(), callback);<br />
} else {<br />
callback($('#wpTextbox1').wikiEditor('getContents').text());<br />
}<br />
}<br />
};<br />
<br />
// Autofill a template from an ID (ISBN, DOI, PMID, URL)<br />
CiteTB.initAutofill = function() {<br />
var elemid = $(this).attr('id');<br />
var res = /^cite\-auto\-(.*?)\-(.*)\-(.*)$/.exec(elemid);<br />
var tem = res[1];<br />
var field = res[2];<br />
var autotype = res[3];<br />
var id = $('#cite-'+tem+'-'+field).val();<br />
if (!id) {<br />
return false;<br />
}<br />
var url = '//tools.wmflabs.org/reftoolbar/lookup.php?';<br />
url+=autotype+'='+encodeURIComponent(id);<br />
url+='&template='+encodeURIComponent(tem);<br />
var s = document.createElement('script');<br />
s.setAttribute('src', url);<br />
s.setAttribute('type', 'text/javascript');<br />
document.getElementsByTagName('head')[0].appendChild(s);<br />
return false;<br />
};<br />
<br />
// Callback for autofill<br />
//TODO: Autofill the URL, at least for DOI<br />
CiteTB.autoFill = function(data, template, type) {<br />
var cl = 'cite-'+template+'-';<br />
var i,j, coauthors;<br />
$('.'+cl+'title').val(data.title);<br />
// Fill in authors<br />
if (data.authors && data.authors.length > 0) {<br />
if ($('.'+cl+'last-incr-1').length != 0) {<br />
var classes = $('.'+cl+'last-incr-1').eq(0).attr('class').split(/\s+/);<br />
var group = false;<br />
var patt = /cite-[^-]*?-incr-(.*)/<br />
for (var c=0; c<classes.length; c++) {<br />
if (patt.exec(classes[c])) {<br />
group = patt.exec(classes[c])[1];<br />
break;<br />
}<br />
}<br />
$('.'+cl+'last-incr-1').val(data.authors[0][0])<br />
$('.'+cl+'first-incr-1').val(data.authors[0][1])<br />
elemid = '#cite-incr-'+template+'-'+group;<br />
for (var i=2; i<data.authors.length+1; i++) {<br />
$(elemid).click();<br />
$('.'+cl+'last-incr-'+i.toString()).val(data.authors[i-1][0])<br />
$('.'+cl+'first-incr-'+i.toString()).val(data.authors[i-1][1])<br />
}<br />
} else if ($('.'+cl+'author-incr-1').length != 0) {<br />
var classes = $('.'+cl+'author-incr-1').eq(0).attr('class').split(/\s+/);<br />
var group = false;<br />
var patt = /cite-[^-]*?-incr-(.*)/<br />
for (var c=0; c<classes.length; c++) {<br />
if (patt.exec(classes[c])) {<br />
group = patt.exec(classes[c])[1];<br />
break;<br />
}<br />
}<br />
$('.'+cl+'author-incr-1').val(data.authors[0].join(', '))<br />
elemid = '#cite-incr-'+template+'-'+group;<br />
for (var i=2; i<data.authors.length+1; i++) {<br />
$(elemid).click();<br />
$('.'+cl+'author-incr-'+i.toString()).val(data.authors[i-1].join(', '))<br />
}<br />
} else if ($('.'+cl+'last1').length != 0) {<br />
for(i=0; data.authors && i<data.authors.length; i++) {<br />
if ($('.'+cl+'last'+(i+1)).length) {<br />
$('.'+cl+'last'+(i+1)).val(data.authors[i][0]);<br />
$('.'+cl+'first'+(i+1)).val(data.authors[i][1]);<br />
} else {<br />
coauthors = [];<br />
for(j=i; j<data.authors.length; j++) {<br />
coauthors.push(data.authors[j].join(', '));<br />
}<br />
$('.'+cl+'coauthors').val(coauthors.join('; '));<br />
break;<br />
}<br />
}<br />
} else if($('.'+cl+'author1').length !== 0) {<br />
for(i=0; data.authors && i<data.authors.length; i++) {<br />
if ($('.'+cl+'author'+(i+1)).length) {<br />
$('.'+cl+'author'+(i+1)).val(data.authors[i].join(', '));<br />
} else {<br />
coauthors = [];<br />
for(j=i; j<data.authors.length; j++) {<br />
coauthors.push(data.authors[j].join(', '));<br />
}<br />
$('.'+cl+'coauthors').val(coauthors.join('; '));<br />
break;<br />
}<br />
}<br />
} else {<br />
var authors = [];<br />
for(i=0; data.authors && i<data.authors.length; i++) {<br />
authors.push(data.authors[i].join(', '));<br />
}<br />
$('.'+cl+'authors').val(authors.join('; '));<br />
}<br />
}<br />
<br />
if (type === 'pmid' || type === 'doi') {<br />
if (data.date && (data.fulldate || !$('.'+cl+'month').length)) {<br />
var DT = new Date(data.date);<br />
var useday = /\d{4}-\d{2}-\d{2}/.test(data.date);<br />
var usemonth = /\d{4}-\d{2}/.test(data.date);<br />
$('.'+cl+'date').val(CiteTB.formatDate(DT, useday, usemonth));<br />
} else if (!data.fulldate && $('.'+cl+'month').length && $('.'+cl+'year').length) {<br />
if (data.month) { // lookup.php sets month to false if it isn't provided<br />
$('.'+cl+'month').val( CiteTB.getOption('months')[parseInt(data.month)-1] );<br />
}<br />
$('.'+cl+'year').val(data.year);<br />
} else {<br />
$('.'+cl+'date').val(data.date);<br />
}<br />
$('.'+cl+'journal').val(data.journal);<br />
$('.'+cl+'volume').val(data.volume);<br />
$('.'+cl+'issue').val(data.issue);<br />
$('.'+cl+'pages').val(data.pages);<br />
} else if (type === 'isbn') {<br />
$('.'+cl+'publisher').val(data.publisher);<br />
$('.'+cl+'location').val(data.location);<br />
$('.'+cl+'year').val(data.year);<br />
$('.'+cl+'edition').val(data.edition);<br />
} else if (type === 'url') {<br />
if (data.date) {<br />
var DT = new Date(data.date);<br />
var useday = /\d{4}-\d{2}-\d{2}/.test(data.date) && template !== 'book';<br />
var usemonth = /\d{4}-\d{2}/.test(data.date) && template !== 'book';<br />
var yearOrDate = (template === 'book') ? 'year' : 'date';<br />
$('.'+cl+yearOrDate).val(CiteTB.formatDate(DT, useday, usemonth));<br />
}<br />
$('.'+cl+'journal').val(data.journal);<br />
$('.'+cl+'volume').val(data.volume);<br />
$('.'+cl+'issue').val(data.issue);<br />
$('.'+cl+'pages').val(data.pages);<br />
$('.'+cl+'publisher').val(data.publisher);<br />
$('.'+cl+'edition').val(data.edition);<br />
$('.'+cl+'isbn').val(data.isbn);<br />
$('.'+cl+'issn').val(data.issn);<br />
$('.'+cl+'doi').val(data.doi);<br />
// "en-US" isn't a valid value for the language parameter<br />
if (data.language && data.language !== 'en-US' && data.language !== 'en-GB') {<br />
$('.'+cl+'language').val(data.language);<br />
}<br />
$('.'+cl+'chapter').val(data.chapter);<br />
}<br />
};<br />
<br />
// FORM DIALOG FUNCTIONS<br />
// Add new incrementable fields<br />
CiteTB.incrementFields = function() {<br />
template = CiteTB.getOpenTemplate();<br />
var currentrow = $(this).parents('tr')[0];<br />
$(this).prev().css('width', '100%')<br />
$(this).detach();<br />
var elemid = $(this).attr('id');<br />
var res = /^cite\-incr\-(.*?)\-(.*)$/.exec(elemid);<br />
group = res[2];<br />
increments = template.incrementables[group];<br />
fields = increments.fields;<br />
incrval = increments.val+1;<br />
template.incrementables[group].val += 1;<br />
trs = template.makeFormInner(fields, false);<br />
trs.reverse();<br />
for (var i=0; i<trs.length; i++) {<br />
$(currentrow).after(trs[i]);<br />
}<br />
};<br />
<br />
// fill the accessdate param with the current date<br />
CiteTB.fillAccessdate = function() {<br />
var elemid = $(this).attr('id');<br />
var res = /^cite\-date\-(.*?)\-(.*)$/.exec(elemid);<br />
var id = res[1];<br />
var field = res[2];<br />
var DT = new Date();<br />
var datestr = CiteTB.formatDate(DT);<br />
$('#cite-'+id+'-'+field).val(datestr);<br />
return false;<br />
};<br />
<br />
CiteTB.formatDate = function(DT, useday, usemonth) {<br />
if (typeof useday == "undefined") {<br />
useday = true; <br />
}<br />
if (typeof usemonth == "undefined") {<br />
usemonth = true; <br />
}<br />
var datestr = CiteTB.getOption('date format');<br />
var zmonth = '';<br />
var month = DT.getUTCMonth()+1;<br />
if (month < 10) {<br />
zmonth = "0"+month.toString();<br />
} else {<br />
zmonth = month.toString();<br />
}<br />
month = month.toString();<br />
var zdate = '';<br />
var date = DT.getUTCDate();<br />
if (date < 10) {<br />
zdate = "0"+date.toString();<br />
} else {<br />
zdate = date.toString();<br />
}<br />
date = date.toString();<br />
if (useday) {<br />
datestr = datestr.replace('<date>', date);<br />
datestr = datestr.replace('<zdate>', zdate);<br />
} else {<br />
datestr = datestr.replace('<date>', '');<br />
datestr = datestr.replace('<zdate>', '');<br />
}<br />
if (usemonth) {<br />
datestr = datestr.replace('<month>', month);<br />
datestr = datestr.replace('<zmonth>', zmonth);<br />
datestr = datestr.replace('<monthname>', CiteTB.getOption('months')[DT.getUTCMonth()]);<br />
} else {<br />
datestr = datestr.replace('<month>', '');<br />
datestr = datestr.replace('<zmonth>', '');<br />
datestr = datestr.replace('<monthname>', '');<br />
} <br />
datestr = datestr.replace('<year>', DT.getUTCFullYear().toString());<br />
return datestr.replace(/^[ \/\-\,\.]*(.*?)[ \/\-\,\.]*$/g, "$1"); // Cleanup any dangling spaces or connectors that might result from omitting date/month<br />
};<br />
<br />
// Function called after the ref list is loaded, to actually set the contents of the named ref dialog<br />
// Until the list is loaded, its just a "Loading" placeholder<br />
CiteTB.setupNamedRefs = function() {<br />
var names = [], i;<br />
for( i=0; i<CiteTB.mainRefList.length; i++) {<br />
if (!CiteTB.mainRefList[i].shorttag && CiteTB.mainRefList[i].refname) {<br />
names.push(CiteTB.mainRefList[i]);<br />
}<br />
}<br />
var stuff = $('<div>');<br />
$('#citetoolbar-namedrefs').html( stuff );<br />
if (names.length === 0) {<br />
stuff.html(mw.usability.getMsg('cite-no-namedrefs'));<br />
} else {<br />
stuff.html(mw.usability.getMsg('cite-namedrefs-intro'));<br />
var select = $('<select id="cite-namedref-select">');<br />
select.append($('<option value="" />').text(mw.usability.getMsg('cite-named-refs-dropdown')));<br />
for(i=0; i<names.length; i++) {<br />
select.append($('<option />').text(names[i].refname));<br />
}<br />
stuff.after(select);<br />
select.before('<br />'); <br />
var prevlabel = $('<div id="cite-nref-preview-label" style="display:none;" />').html(mw.usability.getMsg('cite-raw-preview'));<br />
select.after(prevlabel);<br />
prevlabel.before("<br /><br />");<br />
prevlabel.after('<div id="cite-namedref-preview" style="padding:0.5em; font-size:110%" />');<br />
var parselabel = $('<span id="cite-parsed-label" style="display:none;" />').html(mw.usability.getMsg('cite-parsed-label'));<br />
$('#cite-namedref-preview').after(parselabel);<br />
parselabel.after('<div id="cite-namedref-parsed" style="padding-bottom:0.5em; font-size:110%" />');<br />
var link = $('<a href="#" id="cite-nref-parse" style="margin:0 1em 0 1em; display:none; color:darkblue" />');<br />
link.html(mw.usability.getMsg('cite-form-parse'));<br />
$('#cite-namedref-parsed').after(link);<br />
<br />
$("#cite-namedref-select").bind( 'change', CiteTB.namedRefSelectClick);<br />
$('#cite-nref-parse').bind( 'click', CiteTB.nrefParseClick);<br />
} <br />
};<br />
<br />
// Function to get the errorcheck form HTML<br />
CiteTB.setupErrorCheck = function() {<br />
var form = $('<div id="cite-errorcheck-heading" />').html(mw.usability.getMsg('cite-errorcheck-heading'));<br />
var ul = $("<ul id='cite-errcheck-list' />");<br />
var test;<br />
for (var t in CiteTB.ErrorChecks) {<br />
test = CiteTB.ErrorChecks[t];<br />
ul.append(test.getRow());<br />
}<br />
form.append(ul);<br />
$('#citetoolbar-errorcheck').html(form);<br />
};<br />
<br />
// Callback function for parsed preview<br />
CiteTB.fillNrefPreview = function(parsed) {<br />
$('#cite-parsed-label').show();<br />
$('#cite-namedref-parsed').html(parsed);<br />
};<br />
<br />
// Click handler for the named-ref parsed preview<br />
CiteTB.nrefParseClick = function() {<br />
var choice = $("#cite-namedref-select").val();<br />
if (choice === '') {<br />
$('#cite-parsed-label').hide();<br />
$('#cite-namedref-parsed').text('');<br />
return false;<br />
}<br />
$('#cite-nref-parse').hide();<br />
for( var i=0; i<CiteTB.mainRefList.length; i++) {<br />
if (!CiteTB.mainRefList[i].shorttag && CiteTB.mainRefList[i].refname == choice) {<br />
CiteTB.parse(CiteTB.mainRefList[i].content, CiteTB.fillNrefPreview);<br />
return false;<br />
}<br />
} <br />
};<br />
<br />
// Click handler for the named-ref dropdown<br />
CiteTB.lastnamedrefchoice = '';<br />
CiteTB.namedRefSelectClick = function() {<br />
var choice = $("#cite-namedref-select").val();<br />
if (CiteTB.lastnamedrefchoice == choice) {<br />
return;<br />
}<br />
CiteTB.lastnamedrefchoice = choice;<br />
$('#cite-parsed-label').hide();<br />
$('#cite-namedref-parsed').text('');<br />
if (choice === '') {<br />
$('#cite-nref-preview-label').hide();<br />
$('#cite-namedref-preview').text('');<br />
$('#cite-nref-parse').hide();<br />
return;<br />
}<br />
for( var i=0; i<CiteTB.mainRefList.length; i++) {<br />
if (!CiteTB.mainRefList[i].shorttag && CiteTB.mainRefList[i].refname == choice) {<br />
$('#cite-nref-preview-label').show();<br />
$('#cite-namedref-preview').text(CiteTB.mainRefList[i].content);<br />
if (CiteTB.getOption('autoparse')) {<br />
CiteTB.nrefParseClick();<br />
} else {<br />
$('#cite-nref-parse').show();<br />
}<br />
}<br />
}<br />
};<br />
<br />
// callback function for parsed preview<br />
CiteTB.fillTemplatePreview = function(text) {<br />
var template = CiteTB.getOpenTemplate();<br />
var div = $("#citetoolbar-"+CiteTB.escStr(template.shortform));<br />
div.find('.cite-prev-parsed-label').show();<br />
div.find('.cite-preview-parsed').html(text);<br />
};<br />
<br />
// Click handler for template parsed preview<br />
CiteTB.prevParseClick = function() {<br />
var ref = CiteTB.getRef(true, false);<br />
var template = CiteTB.getOpenTemplate();<br />
var div = $("#citetoolbar-"+CiteTB.escStr(template.shortform));<br />
div.find('.cite-prev-parse').hide();<br />
CiteTB.parse(ref, CiteTB.fillTemplatePreview);<br />
};<br />
<br />
// Show/hide the extra fields in the dialog box<br />
CiteTB.showHideExtra = function() {<br />
var template = CiteTB.getOpenTemplate();<br />
var div = $("#citetoolbar-"+CiteTB.escStr(template.shortform));<br />
var setting = div.find(".cite-form-status").val();<br />
if ( setting === 'closed' ) {<br />
div.find(".cite-form-status").val('open');<br />
div.find('.cite-extra-fields').show(1, function() {<br />
// jQuery adds "display:block", which screws things up<br />
div.find('.cite-extra-fields').attr('style', 'width:100%; background-color:transparent;'); <br />
});<br />
} else {<br />
div.find(".cite-form-status").val('closed');<br />
div.find('.cite-extra-fields').hide();<br />
} <br />
};<br />
<br />
// Resets form fields and previews<br />
// Resets form fields and previews<br />
CiteTB.resetForm = function() {<br />
var template = CiteTB.getOpenTemplate();<br />
var div = $("#citetoolbar-"+CiteTB.escStr(template.shortform));<br />
div.html(template.getForm());<br />
};<br />
<br />
// STRING UTILITY FUNCTIONS<br />
// Returns a string quoted as necessary for name/group attributes<br />
CiteTB.getQuotedString = function(s) {<br />
var sq = /\'/.test(s); // single quotes<br />
var dq = /\"/.test(s); // double quotes<br />
if (!sq && !dq) { // Always quotes for non-latin alphabet<br />
return '"'+s+'"';<br />
} else if (!dq) { // Can use double quotes<br />
return '"'+s+'"';<br />
} else if (!sq) { // Can use single quotes<br />
return "'"+s+"'";<br />
} else { // Has double and single quotes<br />
s = s.replace(/\"/g, '\'');<br />
return '"'+s+'"';<br />
}<br />
};<br />
<br />
// Fix up strings for output - capitalize first char, replace underscores with spaces<br />
CiteTB.fixStr = function(s) {<br />
s = s.slice(0,1).toUpperCase() + s.slice(1);<br />
s = s.replace('_',' ');<br />
return s;<br />
};<br />
<br />
// Escape spaces and quotes for use in HTML classes/ids<br />
CiteTB.escStr = function(s) {<br />
return s.replace(' ', '-').replace("'", "\'").replace('"', '\"');<br />
};<br />
<br />
// MISC FUNCTIONS<br />
// Determine which template form is open, and get the template object for it<br />
CiteTB.getOpenTemplate = function() {<br />
var dialogs = $(".ui-dialog-content.ui-widget-content:visible");<br />
var templatename = $(dialogs[0]).find(".cite-template").val();<br />
return CiteTB.Templates[templatename];<br />
};<br />
<br />
// Display the report for the error checks<br />
CiteTB.displayErrors = function(errors) {<br />
$('#cite-err-report').remove();<br />
var table = $('<table id="cite-err-report" style="width:100%; border:1px solid #A9A9A9; background-color:#FFEFD5; padding:0.25em; margin-top:0.5em" />');<br />
$('#editpage-copywarn').before(table);<br />
var tr;<br />
var tr1 = $('<tr style="width:100%" />');<br />
var th1 = $('<th style="width:60%; font-size:110%" />').html(mw.usability.getMsg('cite-err-report-heading'));<br />
var th2 = $('<th style="text-align:right; width:40%" />');<br />
var im = $('<img />').attr('src', '//upload.wikimedia.org/wikipedia/commons/thumb/5/55/Gtk-stop.svg/20px-Gtk-stop.svg.png');<br />
im.attr('alt', mw.usability.getMsg('cite-err-report-close')).attr('title', mw.usability.getMsg('cite-err-report-close'));<br />
var ad = $('<a id="cite-err-check-close" />').attr('href', '#');<br />
ad.append(im);<br />
th2.append(ad);<br />
tr1.append(th1).append(th2);<br />
table.append(tr1);<br />
$('#cite-err-check-close').bind('click', function() { $('#cite-err-report').remove(); });<br />
if (errors.length === 0) {<br />
tr = $('<tr style="width:100%;" />');<br />
var td = $('<td style="text-align:center; margin:1.5px;" />').html(mw.usability.getMsg('cite-err-report-empty'));<br />
tr.append(td);<br />
table.append(tr);<br />
<br />
return;<br />
}<br />
for(var e in errors) {<br />
var err = errors[e];<br />
tr = $('<tr style="width:100%;" />');<br />
var td1 = $('<td style="border: 1px solid black; margin:1.5px; width:60%" />').html(err.err);<br />
var td2 = $('<td style="border: 1px solid black; margin:1.5px; width:40%" />').html(mw.usability.getMsg(err.msg));<br />
tr.append(td1).append(td2);<br />
table.append(tr);<br />
}<br />
};<br />
<br />
} // End of code loaded only on edit</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=%C5%A0ablona:NonRefTerm&diff=12957
Šablona:NonRefTerm
2017-06-25T20:18:53Z
<p>Nicolas Brouard: naimportována 1 revize</p>
<hr />
<div><i>{{{1}}}</i><noinclude><!--'''Template:NonRefTerm'''--><br />
[[Category:NonRefTerm]] {{PAGENAME}}<br />
</noinclude></div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=%C5%A0ablona:Note&diff=12959
Šablona:Note
2017-06-25T20:18:53Z
<p>Nicolas Brouard: naimportována 1 revize</p>
<hr />
<div><!--'''Template:Note'''-->* <font size="-1">{{{1}}}. {{{2}}}</font></div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=%C5%A0ablona:NoteTerm&diff=12961
Šablona:NoteTerm
2017-06-25T20:18:53Z
<p>Nicolas Brouard: naimportována 1 revize</p>
<hr />
<div><!--'''Template:NoteTerm'''--><b>{{{1}}}</b>{{<br />
#if: {{{2|}}} |({{{2}}})|}}<noinclude><br />
[[Category:Index]] {{PAGENAME}}<br />
</noinclude></div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=%C5%A0ablona:TextTerm&diff=12963
Šablona:TextTerm
2017-06-25T20:18:53Z
<p>Nicolas Brouard: naimportována 1 revize</p>
<hr />
<div><!--'''Template:TextTerm'''-->{{<br />
#if: {{{IndexEntry|}}} |<br />
<b>[[{{{IndexEntry}}}|{{{1}}}]]</b>|<br />
<b>[[{{{1}}}]]</b>}}<sup>{{{2}}}</sup>{{<br />
#if: {{{EnglishEntry|}}} |({{{EnglishEntry}}})|}}<noinclude><br />
[[Category:Dictionary]] {{PAGENAME}}<br />
</noinclude></div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=%C5%A0ablona:RefNumber&diff=12965
Šablona:RefNumber
2017-06-25T20:18:53Z
<p>Nicolas Brouard: naimportována 1 revize</p>
<hr />
<div><!--'''Template:RefNumber'''-->{{<br />
#if: {{{Page|}}} |<br />
[[{{{Page}}}#{{{1}}}{{{2}}}|{{{1}}}{{{2}}}-{{{3}}}]]|<br />
[[{{{1}}}#{{{1}}}{{{2}}}|{{{1}}}{{{2}}}-{{{3}}}]]}}</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=MediaWiki:Common.js&diff=12949
MediaWiki:Common.js
2017-06-25T20:18:52Z
<p>Nicolas Brouard: naimportována 1 revize</p>
<hr />
<div>/**<br />
* Keep code in MediaWiki:Common.js to a minimum as it is unconditionally<br />
* loaded for all users on every wiki page. If possible create a gadget that is<br />
* enabled by default instead of adding it here (since gadgets are fully<br />
* optimized ResourceLoader modules with possibility to add dependencies etc.)<br />
*<br />
* Since Common.js isn't a gadget, there is no place to declare its<br />
* dependencies, so we have to lazy load them with mw.loader.using on demand and<br />
* then execute the rest in the callback. In most cases these dependencies will<br />
* be loaded (or loading) already and the callback will not be delayed. In case a<br />
* dependency hasn't arrived yet it'll make sure those are loaded before this.<br />
*/</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=MediaWiki:Edittools.js&diff=12951
MediaWiki:Edittools.js
2017-06-25T20:18:52Z
<p>Nicolas Brouard: naimportována 1 revize</p>
<hr />
<div>// copied from [[mw:User:Alex Smotrov/edittools.js]], modified for use on the English Wikipedia.<br />
// enableForAllFields() feature from [[commons:MediaWiki:Edittools.js]]<br />
// combined and modified by [[User:Ilmari Karonen]]<br />
// after making changes to this page and testing them, update the number after "edittools-version-" in [[MediaWiki:Edittools]] to purge the cache for everyone<br />
<br />
if (typeof (EditTools_set_focus) == 'undefined')<br />
var EditTools_set_focus = true;<br />
<br />
if (typeof (EditTools_set_focus_initially) == 'undefined')<br />
var EditTools_set_focus_initially = EditTools_set_focus;<br />
<br />
var EditTools =<br />
{<br />
charinsert : {<br />
'Insert': ' – — ‘+’ “+” ° ″ ′ ≈ ≠ ≤ ≥ ± − × ÷ √ ← → · § Sign_your_posts_on_talk_pages: ~~\~~ Cite_your_sources: <ref>+</ref>',<br />
'Wiki markup': 'Insert: – — ‘+’ “+” ° ″ ′ ≈ ≠ ≤ ≥ ± − × ÷ √ ← → · § ~~\~~ <ref>+</ref> Wiki_markup: {\{+}} {\{\{+}}} | {\{TextTerm|demography|1+}} {\{RefNumber|+13|0|1}} {\{NonRefTerm|+}} {\{Note|+|}} {\{NoteTerm|+}} [+] [\[+]] [\[Category:+]] #REDIRECT.[\[+]] &nbsp; <s>+</s> <sup>+</sup> <sub>+</sub> <code>+</code> <pre>+</pre> <blockquote>+</blockquote> <ref.name="+"/> {\{#tag:ref|+|group="nb"}} {\{Reflist}} <references/> <includeonly>+</includeonly> <noinclude>+</noinclude> {\{DEFAULTSORT:+}} <nowiki>+</nowiki> <!--.+_--> <span.class="plainlinks">+</span>',<br />
'Symbols': '~ | ¡¿†‡↔↑↓•¶ # ½⅓⅔¼¾⅛⅜⅝⅞∞ ‘+’ “+” ‹+› «+» ⟨+⟩ ¤₳฿₵¢₡₢$₫₯€₠₣ƒ₴₭₤ℳ₥₦№₧₰£៛₨₪৳₮₩¥ ♠♣♥♦ m² m³ ♭♯♮ ©®™ ◌ {\{Unicode|+}}', <br />
'Latin': 'A a Á á À à  â Ä ä Ǎ ǎ Ă ă Ā ā à ã Å å Ą ą Æ æ Ǣ ǣ B b C c Ć ć Ċ ċ Ĉ ĉ Č č Ç ç D d Ď ď Đ đ Ḍ ḍ Ð ð E e É é È è Ė ė Ê ê Ë ë Ě ě Ĕ ĕ Ē ē Ẽ ẽ Ę ę Ɛ ɛ Ə ə F f G g Ġ ġ Ĝ ĝ Ğ ğ Ģ ģ H h Ĥ ĥ Ħ ħ Ḥ ḥ I i İ ı Í í Ì ì Î î Ï ï Ǐ ǐ Ĭ ĭ Ī ī Ĩ ĩ Į į J j Ĵ ĵ K k Ķ ķ L l Ĺ ĺ Ŀ ŀ Ľ ľ Ļ ļ Ł ł Ḷ ḷ Ḹ ḹ M m Ṃ ṃ N n Ń ń Ň ň Ñ ñ Ņ ņ Ṇ ṇ Ŋ ŋ O o Ó ó Ò ò Ô ô Ö ö Ǒ ǒ Ŏ ŏ Ō ō Õ õ Ǫ ǫ Ő ő Ø ø Œ œ Ɔ ɔ P p Q q R r Ŕ ŕ Ř ř Ŗ ŗ Ṛ ṛ Ṝ ṝ S s Ś ś Ŝ ŝ Š š Ş ş Ṣ ṣ ß T t Ť ť Ţ ţ Ṭ ṭ Þ þ U u Ú ú Ù ù Û û Ü ü Ǔ ǔ Ŭ ŭ Ū ū Ũ ũ Ů ů Ų ų Ű ű Ǘ ǘ Ǜ ǜ Ǚ ǚ Ǖ ǖ V v W w Ŵ ŵ X x Y y Ý ý Ŷ ŷ Ÿ ÿ Ỹ ỹ Ȳ ȳ Z z Ź ź Ż ż Ž ž ß Ð ð Þ þ Ŋ ŋ Ə ə {\{Unicode|+}}',<br />
'Greek': 'ΆάΈέΉήΊίΌόΎύΏώ ΑαΒβΓγΔδ ΕεΖζΗηΘθ ΙιΚκΛλΜμ ΝνΞξΟοΠπ ΡρΣσςΤτΥυ ΦφΧχΨψΩω ᾼᾳᾴᾺὰᾲᾶᾷἈἀᾈᾀἉἁᾉᾁἌἄᾌᾄἊἂᾊᾂἎἆᾎᾆἍἅᾍᾅἋἃᾋᾃἏἇᾏᾇ ῈὲἘἐἙἑἜἔἚἒἝἕἛἓ ῌῃῄῊὴῂῆῇἨἠᾘᾐἩἡᾙᾑἬἤᾜᾔἪἢᾚᾒἮἦᾞᾖἭἥᾝᾕἫἣᾛᾓἯἧᾟᾗ ῚὶῖἸἰἹἱἼἴἺἲἾἶἽἵἻἳἿἷ ῸὸὈὀὉὁὌὄὊὂὍὅὋὃ ῤῬῥ ῪὺῦὐὙὑὔὒὖὝὕὛὓὟὗ ῼῳῴῺὼῲῶῷὨὠᾨᾠὩὡᾩᾡὬὤᾬᾤὪὢᾪᾢὮὦᾮᾦὭὥᾭᾥὫὣᾫᾣὯὧᾯᾧ {\{Polytonic|+}}',<br />
'Cyrillic': 'АаБбВвГг ҐґЃѓДдЂђ ЕеЁёЄєЖж ЗзЅѕИиІі ЇїЙйЈјКк ЌќЛлЉљМм НнЊњОоПп РрСсТтЋћ УуЎўФфХх ЦцЧчЏџШш ЩщЪъЫыЬь ЭэЮюЯя ӘәӨөҒғҖҗ ҚқҜҝҢңҮү ҰұҲҳҸҹҺһ ҔҕӢӣӮӯҘҙ ҠҡҤҥҪҫӐӑ ӒӓӔӕӖӗӰӱ ӲӳӸӹӀ ҞҟҦҧҨҩҬҭ ҴҵҶҷҼҽҾҿ ӁӂӃӄӇӈӋӌ ӚӛӜӝӞӟӠӡ ӤӥӦӧӪӫӴӵ ́',<br />
'Hebrew': 'אבגדהוזחטיךכלםמןנסעףפץצקרשת ׳ ״ װױײ',<br />
'Arabic': ' Transcription: ʾ ṯ ḥ ḫ ẖ ḏ š ṣ ḍ ṭ ẓ ʿ ġ ẗ ا ﺁ ب ت ث ج ح خ د ذ ر ز س ش ص ض ط ظ ع غ ف ق ك ل م ن ه ة و ي ى ء أ إ ؤ ئ',<br />
'IPA (English)': 'ˈ ˌ ŋ ɡ tʃ dʒ ʃ ʒ θ ð ʔ iː ɪ uː ʊ ʌ ɜr eɪ ɛ æ oʊ ɒ ɔː ɔɪ ɔr ɑː ɑr aɪ aʊ ə ər ɨ ɵ ʉ {\{IPA-en|+}} {\{IPA|/+/}} ‹+›',<br />
'IPA': 'ʈɖɟɡɢʡʔ ɸβθðʃʒɕʑʂʐçʝɣχʁħʕʜʢɦ ɱɳɲŋɴ ʋɹɻɰ ʙⱱʀɾɽ ɬ ɮ ɺ ɭʎʟ ʍɥɧ ʼ ɓɗʄɠʛ ʘǀǃǂǁ ɨʉɯ ɪʏʊ øɘɵɤ ə ɛœɜɞʌɔ æ ɐ ɶɑɒ ʰʱʷʲˠˤˀ ᵊ k̚ ⁿˡ ˈˌːˑ t̪ d̪ s̺ s̻ θ̼ s̬ n̥ ŋ̊ a̤ a̰ β̞ ˕ r̝ ˔ o˞ ɚ ɝ e̘ e̙ u̟ i̠ ɪ̈ e̽ ɔ̹ ɔ̜ n̩ ə̆ ə̯ ə̃ ȷ̃ ɫ z̴ ə̋ ə́ ə̄ ə̀ ə̏ ə̌ ə̂ ə᷄ ə᷅ ə᷇ ə᷆ ə᷈ ə᷉ t͡ʃ d͡ʒ t͜ɬ ‿ ˥ ˦ ˧ ˨ ˩ ꜛ ꜜ | ‖ ↗ ↘ k͈ s͎ {\{IPA|+}}',<br />
'Math and logic': '− × ÷ ⋅ ° ∗ ∘ ± ∓ ≤ ≥ ≠ ≡ ≅ ≜ ≝ ≐ ≃ ≈ ⊕ ⊗ ⇐ ⇔ ⇒ ∞ ← ↔ → ≪ ≫ ∝ √ ∤ ≀ ◅ ▻ ⋉ ⋊ ⋈ ∴ ∵ ↦ ¬ ∧ ∨ ⊻ ∀ ∃ ∈ ∉ ∋ ⊆ ⊈ ⊊ ⊂ ⊄ ⊇ ⊉ ⊋ ⊃ ⊅ ∪ ∩ ∑ ∏ ∐ ′ ∫ ∬ ∭ ∮ ∇ ∂ ∆ ∅ ℂ ℍ ℕ ℙ ℚ ℝ ℤ ℵ ⌊ ⌋ ⌈ ⌉ ⊤ ⊥ ⊢ ⊣ ⊧ □ ∠ ⟨ ⟩ {\{frac|+|}} &nbsp; &minus; <math>+</math> {\{math|+}}'<br />
},<br />
<br />
charinsertDivider : "\240",<br />
<br />
extraCSS : '\<br />
#editpage-specialchars {\<br />
margin-top: 15px;\<br />
border-width: 1px;\<br />
border-style: solid;\<br />
border-color: #aaaaaa;\<br />
padding: 2px;\<br />
}\<br />
#editpage-specialchars a {\<br />
}\<br />
#editpage-specialchars a:hover {\<br />
}\<br />
',<br />
<br />
appendExtraCSS : function ()<br />
{<br />
appendCSS(EditTools.extraCSS);<br />
},<br />
<br />
<br />
cookieName : 'edittoolscharsubset',<br />
<br />
createEditTools : function (placeholder)<br />
{<br />
var box = document.createElement("div");<br />
box.id = "editpage-specialchars";<br />
box.title = 'Click on the character or tag to insert it into the edit window';<br />
<br />
//append user-defined sets<br />
if (window.charinsertCustom)<br />
for (id in charinsertCustom)<br />
if (EditTools.charinsert[id]) EditTools.charinsert[id] += ' ' + charinsertCustom[id];<br />
else EditTools.charinsert[id] = charinsertCustom[id];<br />
<br />
//create drop-down select<br />
var prevSubset = 0, curSubset = 0;<br />
var sel = document.createElement('select'), id;<br />
for (id in EditTools.charinsert)<br />
sel.options[sel.options.length] = new Option(id, id);<br />
sel.selectedIndex = 0;<br />
sel.style.cssFloat = sel.style.styleFloat = 'left';<br />
sel.style.marginRight = '5px';<br />
sel.title = 'Choose character subset';<br />
sel.onchange = sel.onkeyup = selectSubset;<br />
box.appendChild(sel);<br />
<br />
//create "recall" switch<br />
if (window.editToolsRecall) {<br />
var recall = document.createElement('span');<br />
recall.appendChild(document.createTextNode('↕')); // ↔<br />
recall.onclick = function () {<br />
sel.selectedIndex = prevSubset;<br />
selectSubset();<br />
}<br />
with (recall.style) { cssFloat = styleFloat = 'left'; marginRight = '5px'; cursor = 'pointer'; }<br />
box.appendChild(recall);<br />
}<br />
<br />
// load latest selection from cookies<br />
try {<br />
var cookieRe = new RegExp ("(?:^|;)\\s*" + EditTools.cookieName + "=(\\d+)\\s*(?:;|$)");<br />
var m = cookieRe.exec(document.cookie);<br />
if (m && m.length > 1 && parseInt(m[1]) < sel.options.length)<br />
sel.selectedIndex = parseInt(m[1]);<br />
} catch (err) { /* ignore */ }<br />
<br />
placeholder.parentNode.replaceChild(box, placeholder);<br />
selectSubset();<br />
return;<br />
<br />
function selectSubset ()<br />
{<br />
//remember previous (for "recall" button)<br />
prevSubset = curSubset;<br />
curSubset = sel.selectedIndex;<br />
//save into cookies for persistence<br />
try {<br />
var expires = new Date ();<br />
expires.setTime( expires.getTime() + 30 * 24 * 60 * 60 * 1000 ); // + 30 days<br />
document.cookie = EditTools.cookieName + "=" + curSubset + ";path=/;expires=" + expires.toUTCString();<br />
} catch (err) { /* ignore */ }<br />
//hide other subsets<br />
var pp = box.getElementsByTagName('p') ;<br />
for (var i=0; i<pp.length; i++)<br />
pp[i].style.display = 'none';<br />
//show/create current subset<br />
var id = sel.options[curSubset].value;<br />
var p = document.getElementById(id);<br />
if (!p){<br />
p = document.createElement('p');<br />
p.id = id;<br />
if (id == 'Arabic' || id == 'Hebrew'){ p.style.fontSize = '120%'; p.dir = 'rtl'; }<br />
EditTools.createTokens(p, EditTools.charinsert[id]);<br />
box.appendChild(p);<br />
}<br />
p.style.display = 'inline';<br />
} <br />
},<br />
createTokens : function (paragraph, str)<br />
{<br />
var tokens = str.split(' '), token, i, n;<br />
for (i = 0; i < tokens.length; i++) {<br />
token = tokens[i];<br />
n = token.indexOf('+');<br />
if (token == '' || token == '_')<br />
addText(EditTools.charinsertDivider + ' ');<br />
else if (token == '\n')<br />
paragraph.appendChild(document.createElement('br'));<br />
else if (token == '___')<br />
paragraph.appendChild(document.createElement('hr'));<br />
else if (token.charAt(token.length-1) == ':') // : at the end means just text<br />
addBold(token);<br />
else if (n == 0) // +<tag> -> <tag>+</tag><br />
addLink(token.substring(1), '</' + token.substring(2), token.substring(1));<br />
else if (n > 0) // <tag>+</tag><br />
addLink(token.substring(0,n), token.substring(n+1));<br />
else if (token.length > 2 && token.charCodeAt(0) > 127) //a string of insertable characters<br />
for (var j=0; j < token.length; j++) addLink(token.charAt(j), '');<br />
else<br />
addLink(token, '');<br />
}<br />
return;<br />
<br />
function addLink (tagOpen, tagClose, name)<br />
{<br />
var a = document.createElement('a');<br />
tagOpen = tagOpen.replace(/\./g,' ');<br />
tagClose = tagClose ? tagClose.replace(/_/g,' ') : '';<br />
name = name || tagOpen + tagClose;<br />
name = name.replace(/\\n/g,'');<br />
a.appendChild(document.createTextNode(name));<br />
a.href = "#";<br />
addHandler( a, 'click', new Function( "evt", "insertTags('" + tagOpen + "', '" + tagClose + "', ''); return killEvt( evt );" ) );<br />
paragraph.appendChild(a);<br />
addText(' ');<br />
}<br />
function addBold (text)<br />
{<br />
var b = document.createElement('b');<br />
b.appendChild(document.createTextNode(text.replace(/_/g,' ')));<br />
paragraph.appendChild(b);<br />
addText(' ');<br />
} <br />
function addText (txt)<br />
{<br />
paragraph.appendChild(document.createTextNode(txt));<br />
}<br />
},<br />
<br />
<br />
enableForAllFields : function ()<br />
{<br />
if (typeof (insertTags) != 'function' || window.WikEdInsertTags) return;<br />
// insertTags from the site-wide /skins-1.5/common/edit.js just inserts in the first<br />
// textarea in the document. Evidently, that's not good if we have multiple textareas.<br />
// My first idea was to simply add a hidden textarea as the first one, and redefine<br />
// insertTags such that it copied first the last active textareas contents over to that hidden<br />
// field, set the cursor or selection there, let the standard insertTags do its thing, and<br />
// then copy the hidden field's text, cursor position and selection back to the currently<br />
// active field. Unfortunately, that is just as complex as simply copying the whole code<br />
// from wikibits to here and let it work on the right text field in the first place.<br />
var texts = document.getElementsByTagName ('textarea'); <br />
for (var i = 0; i < texts.length; i++) {<br />
addHandler (texts[i], 'focus', EditTools.registerTextField);<br />
}<br />
// While we're at it, also enable it for input fields<br />
texts = document.getElementsByTagName ('input');<br />
for (var i = 0; i < texts.length; i++) {<br />
if (texts[i].type == 'text') addHandler (texts[i], 'focus', EditTools.registerTextField);<br />
}<br />
insertTags = EditTools.insertTags; // Redefine the global insertTags<br />
},<br />
<br />
last_active_textfield : null,<br />
<br />
registerTextField : function (evt)<br />
{<br />
var e = evt || window.event;<br />
var node = e.target || e.srcElement;<br />
if (!node) return;<br />
EditTools.last_active_textfield = node.id;<br />
return true;<br />
},<br />
<br />
getTextArea : function ()<br />
{<br />
var txtarea = null;<br />
if (EditTools.last_active_textfield && EditTools.last_active_textfield != "")<br />
txtarea = document.getElementById (EditTools.last_active_textfield);<br />
if (!txtarea) {<br />
// Fallback option: old behaviour<br />
if (document.editform) {<br />
txtarea = document.editform.wpTextbox1;<br />
} else {<br />
// Some alternate form? Take the first one we can find<br />
txtarea = document.getElementsByTagName ('textarea');<br />
if (txtarea.length > 0) txtarea = txtarea[0]; else txtarea = null;<br />
}<br />
}<br />
return txtarea;<br />
},<br />
<br />
insertTags : function (tagOpen, tagClose, sampleText)<br />
{<br />
var txtarea = EditTools.getTextArea ();<br />
if (!txtarea) return;<br />
<br />
<br />
/* Usability initiative compatibility */<br />
if ( typeof $j != 'undefined' && typeof $j.fn.textSelection != 'undefined' ) {<br />
$j( txtarea ).textSelection(<br />
'encapsulateSelection', { 'pre': tagOpen, 'peri': sampleText, 'post': tagClose }<br />
);<br />
return;<br />
}<br />
<br />
<br />
var selText, isSample = false;<br />
<br />
function checkSelectedText ()<br />
{<br />
if (!selText) {<br />
selText = sampleText; isSample = true;<br />
} else if (selText.charAt (selText.length - 1) == ' ') { // Exclude ending space char<br />
selText = selText.substring (0, selText.length - 1);<br />
tagClose += ' ';<br />
} <br />
}<br />
<br />
if (document.selection && document.selection.createRange) { // IE/Opera<br />
// Save window scroll position<br />
var winScroll = 0;<br />
if (document.documentElement && document.documentElement.scrollTop)<br />
winScroll = document.documentElement.scrollTop;<br />
else if (document.body)<br />
winScroll = document.body.scrollTop;<br />
// Get current selection <br />
txtarea.focus();<br />
var range = document.selection.createRange();<br />
selText = range.text;<br />
// Insert tags<br />
checkSelectedText ();<br />
range.text = tagOpen + selText + tagClose;<br />
// Mark sample text as selected<br />
if (isSample && range.moveStart) {<br />
if (window.opera) tagClose = tagClose.replace (/\n/g, "");<br />
range.moveStart( 'character', - tagClose.length - selText.length); <br />
range.moveEnd ('character', - tagClose.length); <br />
}<br />
range.select (); <br />
// Restore window scroll position<br />
if (document.documentElement && document.documentElement.scrollTop)<br />
document.documentElement.scrollTop = winScroll;<br />
else if (document.body)<br />
document.body.scrollTop = winScroll;<br />
} else if (txtarea.selectionStart || txtarea.selectionStart == '0') { // Mozilla<br />
// Save textarea scroll position<br />
var textScroll = txtarea.scrollTop;<br />
// Get current selection<br />
txtarea.focus();<br />
var startPos = txtarea.selectionStart;<br />
var endPos = txtarea.selectionEnd;<br />
selText = txtarea.value.substring (startPos, endPos);<br />
// Insert tags<br />
checkSelectedText ();<br />
txtarea.value = txtarea.value.substring (0, startPos)<br />
+ tagOpen + selText + tagClose<br />
+ txtarea.value.substring (endPos);<br />
// Set new selection<br />
if (isSample) {<br />
txtarea.selectionStart = startPos + tagOpen.length;<br />
txtarea.selectionEnd = startPos + tagOpen.length + selText.length;<br />
} else {<br />
txtarea.selectionStart = startPos + tagOpen.length + selText.length + tagClose.length;<br />
txtarea.selectionEnd = txtarea.selectionStart;<br />
}<br />
// Restore textarea scroll position<br />
txtarea.scrollTop = textScroll;<br />
}<br />
}, // end insertTags<br />
<br />
setup : function ()<br />
{<br />
var placeholder = document.getElementById("editpage-specialchars");<br />
if (!placeholder) return; // has this already been run once?<br />
EditTools.appendExtraCSS ();<br />
EditTools.createEditTools (placeholder);<br />
EditTools.enableForAllFields ();<br />
}<br />
<br />
}; // end EditTools<br />
<br />
// No need to hook this, as the loading of this page is itself hooked.<br />
EditTools.setup();</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=MediaWiki:RefToolbarLegacy.js&diff=12945
MediaWiki:RefToolbarLegacy.js
2017-06-25T20:18:52Z
<p>Nicolas Brouard: naimportována 1 revize</p>
<hr />
<div>var numforms = 0;<br />
var wikEdAutoUpdateUrl;<br />
var citeUserDateFormat;<br />
var refTagURL;<br />
var defaultRefTagURL = '//reftag.appspot.com/';<br />
var refToolDebug;<br />
<br />
String.prototype.trim = function() {<br />
return this.replace(/^\s+|\s+$/g,"");<br />
};<br />
<br />
function refbuttons() {<br />
if (mw.toolbar && document.getElementById('toolbar') ) {<br />
var button = document.createElement('a');<br />
button.href = "javascript:easyCiteMain()";<br />
button.title = "Insert Citation";<br />
var buttonimage = document.createElement('img');<br />
buttonimage.src = "//upload.wikimedia.org/wikipedia/commons/e/ea/Button_easy_cite.png";<br />
buttonimage.alt = "Insert Citation";<br />
button.appendChild(buttonimage);<br />
var toolbar = document.getElementById('toolbar');<br />
if (navigator.userAgent.indexOf('MSIE') == -1) {<br />
toolbar.appendChild(button);<br />
var citemain = document.createElement('div');<br />
citemain.style.display = 'none';<br />
citemain.style.margin = '0 0 6px';<br />
citemain.style.clear = 'both';<br />
citemain.style.height = 'auto';<br />
citemain.setAttribute('Id', 'citeselect');<br />
citemain.appendChild( addOption("citeWeb()", "Web") );<br />
citemain.appendChild( addOption("citeNews()", "News") );<br />
citemain.appendChild( addOption("citeBook()", "Book") );<br />
citemain.appendChild( addOption("citeJournal()", "Journal") );<br />
citemain.appendChild( addOption("citeNamedRef()", "Named references") );<br />
citemain.appendChild( addOption("dispErrors()", "Error check") );<br />
citemain.appendChild( addOption("showMore()", "More") );<br />
citemain.appendChild( addOption("hideInitial()", "Cancel") );<br />
<br />
var citemore = document.createElement('div');<br />
citemore.style.display = 'none';<br />
citemore.setAttribute('Id', 'citemore');<br />
citemore.appendChild( addOption("citeEncyclopedia()", "Encyclopedia") );<br />
citemore.appendChild( addOption("citePressRelease()", "Press release") );<br />
citemore.appendChild( addOption("citeMap()", "Map") );<br />
citemore.appendChild( addOption("showRefSectionOptions()", "Ref Section") );<br />
citemain.appendChild(citemore);<br />
<br />
$( citemain ).insertAfter( $( toolbar ) );<br />
}<br />
else {<br />
toolbar.appendChild(button);<br />
var citeselect = document.createElement('div');<br />
citeselect.id = 'citeselect';<br />
citeselect.style.display = "none";<br />
citeselect.innerHTML = '<input type="button" value="Web" onclick="citeWeb()" />'+<br />
'<input type="button" value="News" onclick="citeNews()" />'+<br />
'<input type="button" value="Book" onclick="citeBook()" />'+<br />
'<input type="button" value="Journal" onclick="citeJournal()" />'+<br />
'<input type="button" value="Named references" onclick="citeNamedRef()" />'+<br />
'<input type="button" value="Error check" onclick="dispErrors()" />'+<br />
'<input type="button" value="More" onclick="showMore()" />'+<br />
'<input type="button" value="Cancel" onclick="hideInitial()" />'+<br />
'<div id="citemore" style="display:none">\<br />
<input type="button" value="Encyclopedia" onclick="citeEncyclopedia()" />\<br />
<input type="button" value="Press release" onclick="citePressRelease()" />\<br />
<input type="button" value="Map" onclick="citeMap()" />\<br />
<input type="button" value="Ref Section" onclick="showRefSectionOptions()" />\<br />
</div>';<br />
document.getElementById('editform').insertBefore(citeselect, document.getElementById('editform').firstChild ) ;<br />
}<br />
var reftoolformarea = document.createElement( 'span' );<br />
reftoolformarea.id = 'refToolFormArea';<br />
document.getElementById('citeselect').appendChild( reftoolformarea );<br />
}<br />
if (typeof EditTools == "object") {<br />
var placeholder = document.getElementById("editpage-specialchars");<br />
EditTools.createEditTools (placeholder);<br />
}<br />
}<br />
<br />
function addOption(script, text) {<br />
var option = document.createElement('input');<br />
option.setAttribute('type', 'button');<br />
option.setAttribute('onclick', script);<br />
option.setAttribute("value", text);<br />
return option;<br />
}<br />
<br />
function hideInitial() {<br />
document.getElementById('citeselect').style.display = 'none';<br />
oldFormHide();<br />
}<br />
<br />
function oldFormHide() {<br />
//if (numforms != 0) {<br />
// document.getElementById('citediv'+numforms).style.display = 'none';<br />
//}<br />
document.getElementById('refToolFormArea').innerHTML = '';<br />
if (document.getElementById('errorform') !== null) {<br />
document.getElementById('citeselect').removeChild(document.getElementById('errorform'));<br />
}<br />
}<br />
<br />
function easyCiteMain() {<br />
document.getElementById('citeselect').style.display = '';<br />
document.getElementById('citemore').style.display = 'none';<br />
}<br />
<br />
function showMore() {<br />
document.getElementById('citemore').style.display = '';<br />
}<br />
<br />
var months = ['January', 'February', 'March', 'April', 'May', 'June',<br />
'July', 'August', 'September', 'October', 'November', 'December'];<br />
var citeGlobalDateFormat = "<date> <monthname> <year>";<br />
function getTime() {<br />
var datestr = '';<br />
if (citeUserDateFormat) {<br />
datestr = citeUserDateFormat;<br />
} else {<br />
datestr = citeGlobalDateFormat;<br />
}<br />
var DT = new Date();<br />
var zmonth = '';<br />
var month = DT.getUTCMonth()+1;<br />
if (month < 10) {<br />
zmonth = "0"+month.toString();<br />
} else {<br />
zmonth = month.toString();<br />
}<br />
month = month.toString();<br />
var zdate = '';<br />
var date = DT.getUTCDate();<br />
if (date < 10) {<br />
zdate = "0"+date.toString();<br />
} else {<br />
zdate = date.toString();<br />
}<br />
date = date.toString();<br />
datestr = datestr.replace('<date>', date);<br />
datestr = datestr.replace('<month>', month);<br />
datestr = datestr.replace('<zdate>', zdate);<br />
datestr = datestr.replace('<zmonth>', zmonth);<br />
datestr = datestr.replace('<monthname>', months[DT.getUTCMonth()]);<br />
datestr = datestr.replace('<year>', DT.getUTCFullYear().toString());<br />
return (datestr);<br />
}<br />
<br />
function lastNameToRefname() {<br />
//Note: This only works if field 'refname' comes after field 'last', but it always does<br />
var lastName;<br />
var fields = document.getElementById('citediv'+numforms).getElementsByTagName('input');<br />
for (var i=0; i<fields.length; i++) {<br />
if(fields[i].id == 'last') {<br />
lastName = fields[i].value;<br />
}<br />
else if(fields[i].id == 'refname') {<br />
fields[i].value = lastName.replace(/^\s*(.*?)\s*$/, "$1");<br />
return;<br />
}<br />
}<br />
}<br />
<br />
function setAccessDateToday() {<br />
document.getElementById('accessdate').value = getTime();<br />
/* var fields = document.getElementById('citediv'+numforms).getElementsByTagName('input');<br />
for (var i=0; i<fields.length; i++) {<br />
if(fields[i].id == 'accessdate') {<br />
fields[i].value = getTime();<br />
return;<br />
}<br />
}<br />
*/<br />
}<br />
<br />
function getLastName(authornum) {<br />
if (/\S/.test(document.getElementById('last'+authornum).value)) {<br />
return document.getElementById('last'+authornum).value;<br />
}<br />
else {<br />
var author = document.getElementById('author'+authornum).value;<br />
var match = /(\S+)\s*$/.exec(author);<br />
if (match) {<br />
return match[1];<br />
}<br />
else {<br />
return '';<br />
}<br />
}<br />
}<br />
<br />
function makeRefname() {<br />
var refname;<br />
if (document.getElementById('last1')) {<br />
refname = document.getElementById('last1').value + document.getElementById('last2').value;<br />
}<br />
else{<br />
refname = document.getElementById('last').value;<br />
}<br />
if (/\S/.test(refname)) {<br />
var date = document.getElementById('date').value;<br />
var match = /[0-9]{4}/.exec(date);<br />
if (match) {<br />
refname += match[0];<br />
}<br />
}<br />
else {<br />
refname = document.getElementById('title').value;<br />
}<br />
document.getElementById('refname').value = refname;<br />
}<br />
<br />
function citeWeb() {<br />
citeNewsWeb("cite web");<br />
}<br />
function citeNews() {<br />
citeNewsWeb("cite news");<br />
}<br />
<br />
function citeNewsWeb(templatename) {<br />
oldFormHide();<br />
var template = templatename;<br />
var legend;<br />
if (template == "cite web") {<br />
legend = "Cite web source";<br />
} else {<br />
legend = "Cite news source";<br />
}<br />
var newtime = getTime();<br />
numforms++;<br />
var form = '<div id="citediv'+numforms+'">'+<br />
'<fieldset><legend>'+legend+'</legend>'+<br />
'<table cellspacing="5">'+<br />
'<input type="hidden" value="'+template+'" id="template">'+<br />
'<tr><td width="120"><label for="url">&nbsp;URL: </label></td>'+<br />
'<td width="400"><input type="image" src="//upload.wikimedia.org/wikipedia/commons/6/62/Arrow_out_condensed.png" tabindex=1 alt="Fetch" title="' + ((template == 'cite news') ? 'For a New York Times article URL, fetch article data and fill in the fields. For other URLs, fetch the page title.' : 'Fetch the page title. Irrelevant parts often have to be removed manually afterwards.') + '" onClick="pullURL(); return false;" style="float:right"><span style="display: block;overflow: hidden;"><input type="text" tabindex=1 style="width:97%" id="url"></span></td>'+<br />
'<td width="120"><label for="title">&nbsp;Title: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="title"></td></tr>'+<br />
'<tr><td width="120"><label for="last">&nbsp;Last name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="last"></td>'+<br />
'<td width="120"><label for="first">&nbsp;First name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="first"></td></tr>'+<br />
'<tr><td width="120"><label for="coauthors">&nbsp;Coauthors: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="coauthors"></td>'+<br />
'<td width="120"><label for="date">&nbsp;Publication date: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="date"></td></tr>'+<br />
'<tr><td width="120"><label for="work">&nbsp;' + ((template == 'cite news') ? 'Newspaper' : 'Work') + ': </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="work"></td>'+<br />
'<td width="120"><label for="publisher">&nbsp;Publisher: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="publisher"></td></tr>'+<br />
'<tr><td width="120"><label for="pages">&nbsp;Pages: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="pages"></td>'+<br />
'<td width="120"><label for="language">&nbsp;Language: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="language"></td></tr>'+<br />
'<tr><td width="120"><label for="accessdate">&nbsp;Access date: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="accessdate" value="'+ newtime +'"></td>'+<br />
'<td width="120"><label for="location">&nbsp;Location: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="location"></td></tr>';<br />
if (template == 'cite web') {<br />
form += '<tr><td width="120"><label for="archiveurl">&nbsp;Archive URL: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="archiveurl"></td>'+<br />
'<td width="120"><label for="archivedate">&nbsp;Archive date: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="archivedate"></td></tr>';<br />
}<br />
form += '<tr><td width="120"><label for="refname">&nbsp;Reference name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:60%" id="refname"><input type="button" value="<Last name" onClick="lastNameToRefname()"></td></tr>'+<br />
'</table>'+<br />
' <input type="button" value="Add citation" onClick="addcites()">'+<br />
' <input type="button" value="Preview citation" onClick="previewCitationDefault()"> \<br />
<img id="progress" src="//upload.wikimedia.org/wikipedia/commons/5/59/RefToolbar_spinning_throbber.gif" style="visibility: hidden" />'+<br />
'<input type="checkbox" tabindex=1 name="verbose" id="verbose" value="verbose"><label for="verbose">Vertical form</label>'+<br />
'<span style="float:right"><a href="//en.wikipedia.org/wiki/Template:'+template.replace(/ /g, '_')+'" target="_blank">[Template documentation]</a></span>'+<br />
'</fieldset><span id="previewSpan"></span></div>';<br />
document.getElementById('refToolFormArea').innerHTML = form;<br />
}<br />
<br />
function citeBook() {<br />
oldFormHide();<br />
var template = "cite book";<br />
numforms++;<br />
var form = '<div id="citediv'+numforms+'">'+<br />
'<fieldset><legend>Cite book source</legend>';<br />
<br />
form += '<table cellspacing="5" width="100%"> \<br />
<tr><td><label for="title">Title: </label></td> \<br />
<td colspan=5><input type="text" tabindex=1 style="width:100%" id="title"></td></tr>';<br />
for (var i=1;i<=3;i++) {<br />
var i_str = i == 1 ? '': ' '+i;<br />
form += '<tr> \<br />
<td width="130"><label for="last'+i+'">Author'+i_str+' last&nbsp;name: </label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="last'+i+'"></td> \<br />
<td><label for="first'+i+'">&nbsp;first&nbsp;name: </label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="first'+i+'"></td> \<br />
<td><label for="authorlink'+i+'">&nbsp;Authorlink: </label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="authorlink'+i+'"> \<br />
<!--<a id="authorLinkAnchor'+i+'"><img id="authorLinkButton'+i+'" src="static/progress.gif" border="0" style="visibility: hidden" /></a> \<br />
<a href="//en.wikipedia.org/wiki/%s" target="_blank"><img id="authorTryLink'+i+'" src="static/external.png" border="0" style="visibility: hidden" /></a> --> \<br />
</td> \<br />
</tr>';<br />
}<br />
form += '<tr><td><label for="coauthors">Coauthors: </label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="coauthors"></td> \<br />
<td><label for="editor">&nbsp;Editor: </label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="editor"></td> \<br />
<td><label for="others">&nbsp;Others: </label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="others"></td></tr> \<br />
</table> \<br />
<table cellspacing="5" width="100%"> \<br />
<tr><td width="130"><label for="publisher">Publisher: </label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="publisher"></td> \<br />
<td><label for="location">&nbsp;Location: </label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="location"></td></tr> \<br />
\<br />
<tr><td><label for="date">Publication&nbsp;date or&nbsp;year: </label></td> \<br />
<td><input type="text" tabindex=1 style="width:140px" id="date"> \<br />
<input id="dmy" name="dateformat" value="dmy" type="radio" tabindex=1 onclick="reformatDates()"><label for="dmy">dmy</label> \<br />
<input id="mdy" name="dateformat" value="mdy" type="radio" tabindex=1 onclick="reformatDates()"><label for="mdy">md, y</label> \<br />
<input id="ymd" name="dateformat" value="ymd" type="radio" tabindex=1 onclick="reformatDates()"><label for="ymd">y-m-d</label> \<br />
</td> \<br />
<td><label for="edition">&nbsp;Edition: </label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="edition"></td></tr> \<br />
\<br />
<tr><td><label for="series">Series: </label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="series"></td> \<br />
<td><label for="volume">&nbsp;Volume: </label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="volume"></td></tr> \<br />
\<br />
<tr><td><label for="pages">Page number(s):</label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="pages" name="pages" onFocus="this.style.backgroundColor=\'\';"></td> \<br />
<td><label for="chapter">&nbsp;Chapter: </label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="chapter"></td></tr> \<br />
\<br />
<tr><td><label for="isbn">ISBN: </label></td> \<br />
<td><input type="image" src="//upload.wikimedia.org/wikipedia/commons/6/62/Arrow_out_condensed.png" tabindex=1 alt="Fetch" title="Fill in citation data based on ISBN from Diberri\'s tool." onClick="pullISBN(); return false;" style="float:right"><span style="display: block;overflow: hidden;"><input type="text" tabindex=1 style="width:97%" id="isbn"></span></td> \<br />
<td><label for="language">&nbsp;Language: </label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="language"></td></tr> \<br />
\<br />
<tr><td><label for="url">URL: </label></td> \<br />
<td><input type="image" src="//upload.wikimedia.org/wikipedia/commons/6/62/Arrow_out_condensed.png" tabindex=1 alt="Fetch" title="Fill in citation data based on a Google Books URL." onClick="pullJs(); return false;" style="float:right"><span style="display: block;overflow: hidden;"><input type="text" tabindex=1 style="width:97%" id="url"></span></td> \<br />
<td><label for="accessdate">&nbsp;Access&nbsp;date:</label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="accessdate"></td></tr> \<br />
\<br />
<tr><td><label for="otherfields">Other&nbsp;fields:</label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="otherfields"></td> \<br />
<td><label for="refname">&nbsp;Ref&nbsp;name: </label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="refname"></td> \<br />
</tr> \<br />
</table> \<br />
\<br />
<input type="radio" tabindex=1 name="template" id="cite_book" value="cite_book" checked="1"><label for="cite_book">\{\{cite book}}</label> <sup><a href="//en.wikipedia.org/wiki/Template:Cite_book" target="_blank">[doc]</a></sup> \<br />
<input type="radio" tabindex=1 name="template" id="citation" value="citation"><label for="citation">\{\{citation}}</label> <sup><a href="//en.wikipedia.org/wiki/Template:Citation" target="_blank">[doc]</a></sup> \<br />
<input type="radio" tabindex=1 name="template" id="plain" value="plain"><label for="plain">plain wikicode (experimental)</label> \<br />
<input type="checkbox" tabindex=1 name="verbose" id="verbose" value="verbose"><label for="verbose">Vertical form</label> \<br />
<input type="checkbox" tabindex=1 name="extraparams" id="extraparams" value="extraparams"><label for="extraparams">Extra parameters</label> \<br />
<br /><input type="button" value="Add citation" onClick="makeCiteBook()"> \<br />
<input type="button" value="Preview citation" onClick="previewCitationBook()"> \<br />
<img id="progress" src="//upload.wikimedia.org/wikipedia/commons/5/59/RefToolbar_spinning_throbber.gif" style="visibility: hidden" /> \<br />
\<br />
</fieldset><span id="previewSpan"></span></div>';<br />
document.getElementById('refToolFormArea').innerHTML = form;<br />
}<br />
<br />
function citeJournal() {<br />
oldFormHide();<br />
var template = "cite journal";<br />
numforms++;<br />
var form = '<div id="citediv'+numforms+'">'+<br />
'<fieldset><legend>Cite journal</legend>'+<br />
'<table cellspacing="5">'+<br />
'<input type="hidden" value="'+template+'" id="template">'+<br />
'<tr><td width="120"><label for="last">&nbsp;Last name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="last"></td>'+<br />
'<td width="120"><label for="first">&nbsp;First name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="first"></td></tr>'+<br />
'<tr><td width="120"><label for="coauthors">&nbsp;Coauthors: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="coauthors"></td>'+<br />
'<td width="120"><label for="date">&nbsp;Publication date: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="date"></td></tr>'+<br />
'<tr><td width="120"><label for="title">&nbsp;Title: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="title"></td>'+<br />
'<td width="120"><label for="journal">&nbsp;Journal: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="journal"></td></tr>'+<br />
'<tr><td width="120"><label for="publisher">&nbsp;Publisher: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="publisher"></td>'+<br />
'<td width="120"><label for="location">&nbsp;Location: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="location"></td></tr>'+<br />
'<tr><td width="120"><label for="volume">&nbsp;Volume: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="volume"></td>'+<br />
'<td width="120"><label for="issue">&nbsp;Issue: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="issue"></td></tr>'+<br />
'<tr><td width="120"><label for="pages">&nbsp;Pages: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="pages"></td>'+<br />
'<td width="120"><label for="issn">&nbsp;ISSN: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="issn"></td></tr>'+<br />
'<tr><td width="120"><label for="oclc">&nbsp;OCLC: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="oclc"></td>'+<br />
'<td width="120"><label for="doi">&nbsp;DOI: </label></td>'+<br />
'<td width="400"><input type="image" src="//upload.wikimedia.org/wikipedia/commons/6/62/Arrow_out_condensed.png" tabindex=1 alt="Fetch" title="Fetch citation data for a DOI from crossref.org and fill in the other fields." onClick="pullDOI(); return false;" style="float:right"><span style="display: block;overflow: hidden;"><input type="text" tabindex=1 style="width:97%" id="doi"></span></td></tr>'+<br />
'<tr><td width="120"><label for="pmid">&nbsp;PMID: </label></td>'+<br />
'<td width="400"><input type="image" src="//upload.wikimedia.org/wikipedia/commons/6/62/Arrow_out_condensed.png" tabindex=1 alt="Fetch" title="Fetch citation data for a PMID" onClick="pullPMID(); return false;" style="float:right;visibility:hidden"><span style="display: block;overflow: hidden;"><input type="text" tabindex=1 style="width:97%" id="pmid"></span></td>'+<br />
'<td width="120"><label for="quote">&nbsp;Quote: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="quote"></td></tr>'+<br />
'<tr><td width="120"><label for="url">&nbsp;URL: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="url"></td>'+<br />
'<td width="120"><label for="accessdate">&nbsp;Access date: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="accessdate"></td></tr>'+<br />
'<tr><td width="120"><label for="language">&nbsp;Language: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="language"></td>'+<br />
'<td width="120"><label for="refname">&nbsp;Reference name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:60%" id="refname"><input type="button" value="<Last name" onClick="lastNameToRefname()"></td></tr>'+<br />
'</table>'+<br />
'<input type="button" value="Add citation" onClick="addcites()">'+<br />
' <input type="button" value="Preview citation" onClick="previewCitationDefault()"> \<br />
<img id="progress" src="//upload.wikimedia.org/wikipedia/commons/5/59/RefToolbar_spinning_throbber.gif" style="visibility: hidden" />'+<br />
'<input type="checkbox" tabindex=1 name="verbose" id="verbose" value="verbose"><label for="verbose">Vertical form</label>'+<br />
'<span style="float:right"><a href="//en.wikipedia.org/wiki/Template:'+template.replace(/ /g, '_')+'" target="_blank">[Template documentation]</a></span>'+<br />
'</fieldset><span id="previewSpan"></span></div>';<br />
document.getElementById('refToolFormArea').innerHTML = form;<br />
}<br />
<br />
function citeEncyclopedia() {<br />
oldFormHide();<br />
var template = "cite encyclopedia";<br />
numforms++;<br />
var form = '<div id="citediv'+numforms+'">'+<br />
'<fieldset><legend>Cite encyclopedia source</legend>'+<br />
'<table cellspacing="5">'+<br />
'<input type="hidden" value="'+template+'" id="template">'+<br />
'<tr><td width="120"><label for="last">&nbsp;Last name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="last"></td>'+<br />
'<td width="120"><label for="first">&nbsp;First name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="first"></td></tr>'+<br />
'<tr><td width="120"><label for="coauthors">&nbsp;Coauthors: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="coauthors"></td>'+<br />
'<td width="120"><label for="editors">&nbsp;Editors: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="editors"></td></tr>'+<br />
'<tr><td width="120"><label for="title">&nbsp;Entry title: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="title"></td>'+<br />
'<td width="120"><label for="encyclopedia">&nbsp;Encyclopedia: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="encyclopedia"></td></tr>'+<br />
'<tr><td width="120"><label for="publisher">&nbsp;Publisher: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="publisher"></td>'+<br />
'<td width="120"><label for="location">&nbsp;Location: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="location"></td></tr>'+<br />
'<tr><td width="120"><label for="year">&nbsp;Year: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="year"></td>'+<br />
'<td width="120"><label for="volume">&nbsp;Volume: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="volume"></td></tr>'+<br />
'<tr><td width="120"><label for="pages">&nbsp;Pages: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="pages"></td>'+<br />
'<td width="120"><label for="isbn">&nbsp;ISBN: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="isbn"></td></tr>'+<br />
'<tr><td width="120"><label for="url">&nbsp;URL: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="url"></td>'+<br />
'<td width="120"><label for="accessdate">&nbsp;Access date: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="accessdate"></td></tr>'+<br />
'<tr><td width="120"><label for="language">&nbsp;Language: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="language"></td>'+<br />
'<td width="120"><label for="refname">&nbsp;Reference name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="refname"></td></tr>'+<br />
'</table>'+<br />
'<input type="button" value="Add citation" onClick="addcites()">'+<br />
' <input type="button" value="Preview citation" onClick="previewCitationDefault()"> \<br />
<img id="progress" src="//upload.wikimedia.org/wikipedia/commons/5/59/RefToolbar_spinning_throbber.gif" style="visibility: hidden" />'+<br />
'<input type="checkbox" tabindex=1 name="verbose" id="verbose" value="verbose"><label for="verbose">Vertical form</label>'+<br />
'<span style="float:right"><a href="//en.wikipedia.org/wiki/Template:'+template.replace(/ /g, '_')+'" target="_blank">[Template documentation]</a></span>'+<br />
'</fieldset><span id="previewSpan"></span></div>';<br />
document.getElementById('refToolFormArea').innerHTML = form;<br />
}<br />
<br />
function citePressRelease() {<br />
oldFormHide();<br />
var template = "cite press release";<br />
numforms++;<br />
var form = '<div id="citediv'+numforms+'">'+<br />
'<fieldset><legend>Cite press release</legend>'+<br />
'<table cellspacing="5">'+<br />
'<input type="hidden" value="'+template+'" id="template">'+<br />
'<tr><td width="120"><label for="title">&nbsp;Title: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="title"></td>'+<br />
'<td width="120"><label for="publisher">&nbsp;Publisher: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="publisher"></td></tr>'+<br />
'<tr><td width="120"><label for="date">&nbsp;Date: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="date"></td>'+<br />
'<td width="120"><label for="language">&nbsp;Language: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="language"></td></tr>'+<br />
'<tr><td width="120"><label for="url">&nbsp;URL: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="url"></td>'+<br />
'<td width="120"><label for="accessdate">&nbsp;Access date: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="accessdate" value="'+ getTime() +'"></td></tr>'+<br />
'<tr><td width="120"><label for="refname">&nbsp;Reference name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="refname"></td></tr>'+<br />
'</table>'+<br />
'<input type="button" value="Add citation" onClick="addcites()">'+<br />
' <input type="button" value="Preview citation" onClick="previewCitationDefault()"> \<br />
<img id="progress" src="//upload.wikimedia.org/wikipedia/commons/5/59/RefToolbar_spinning_throbber.gif" style="visibility: hidden" />'+<br />
'<input type="checkbox" tabindex=1 name="verbose" id="verbose" value="verbose"><label for="verbose">Vertical form</label>'+<br />
'<span style="float:right"><a href="//en.wikipedia.org/wiki/Template:'+template.replace(/ /g, '_')+'" target="_blank">[Template documentation]</a></span>'+<br />
'</fieldset><span id="previewSpan"></span></div>';<br />
document.getElementById('refToolFormArea').innerHTML = form;<br />
}<br />
<br />
function citeMap() {<br />
oldFormHide();<br />
var template = "cite map";<br />
numforms++;<br />
var form = '<div id="citediv'+numforms+'">'+<br />
'<fieldset><legend>Cite map</legend>'+<br />
'<table cellspacing="5">'+<br />
'<input type="hidden" value="'+template+'" id="template">'+<br />
'<tr><td width="120"><label for="publisher">&nbsp;Publisher: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="publisher"></td>'+<br />
'<td width="120"><label for="title">&nbsp;Title: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="title"></td></tr>'+<br />
'<tr><td width="120"><label for="url">&nbsp;URL: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="url"></td>'+<br />
'<td width="120"><label for="accessdate">&nbsp;Access date: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="accessdate"></td></tr>'+<br />
'<tr><td width="120"><label for="edition">&nbsp;Edition: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="edition"></td>'+<br />
'<td width="120"><label for="date">&nbsp;Date or year: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="date"></td></tr>'+<br />
'<tr><td width="120"><label for="cartography">&nbsp;Cartography: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="cartography"></td>'+<br />
'<td width="120"><label for="scale">&nbsp;Scale: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="scale"></td></tr>'+<br />
'<tr><td width="120"><label for="series">&nbsp;Series: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="series"></td>'+<br />
'<td width="120"><label for="page">&nbsp;Page: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="page"></td></tr>'+<br />
'<tr><td width="120"><label for="section">&nbsp;Section: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="section"></td>'+<br />
'<td width="120"><label for="inset">&nbsp;Inset: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="inset"></td></tr>'+<br />
'<tr><td width="120"><label for="isbn">&nbsp;ISBN: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="isbn"></td>'+<br />
'<td width="120"><label for="refname">&nbsp;Reference name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="refname"></td></tr>'+<br />
'</table>'+<br />
'<input type="button" value="Add citation" onClick="addcites()">'+<br />
' <input type="button" value="Preview citation" onClick="previewCitationDefault()"> \<br />
<img id="progress" src="//upload.wikimedia.org/wikipedia/commons/5/59/RefToolbar_spinning_throbber.gif" style="visibility: hidden" />'+<br />
'<input type="checkbox" tabindex=1 name="verbose" id="verbose" value="verbose"><label for="verbose">Vertical form</label>'+<br />
'<span style="float:right"><a href="//en.wikipedia.org/wiki/Template:'+template.replace(/ /g, '_')+'" target="_blank">[Template documentation]</a></span>'+<br />
'</fieldset><span id="previewSpan"></span></div>';<br />
document.getElementById('refToolFormArea').innerHTML = form;<br />
}<br />
<br />
function showRefSectionOptions() {<br />
oldFormHide();<br />
var template = "cite encyclopedia";<br />
numforms++;<br />
var form = '<div id="citediv'+numforms+'">'+<br />
'<fieldset><legend>Add references section</legend>\<br />
Headline:<br />\<br />
<input id="references" name="headline" type="radio" tabindex=1 checked="checked"><label for="references">== References ==</label><br /> \<br />
<input id="notes" name="headline" type="radio" tabindex=1><label for="notes">== Notes ==</label><br /> \<br />
Type:<br /> \<br />
<input id="type-references" name="type" type="radio" tabindex=1><label for="type-references">&lt;references/&gt;</label><br /> \<br />
<input id="type-reflist" name="type" type="radio" tabindex=1 checked="checked"><label for="type-reflist">\{\{Reflist}}</label><br /> \<br />
<input id="type-reflist2" name="type" type="radio" tabindex=1><label for="type-reflist2">\{\{Reflist|2}}</label><br /> \<br />
<input type="checkbox" tabindex=1 id="ldr"><label for="ldr">List-defined references</label> (<a href="//en.wikipedia.org/wiki/Wikipedia:Footnotes#List-defined_references" target="_blank">Info 1</a>, <a href="//en.wikipedia.org/wiki/Help:Footnotes#List-defined_references" target="_blank">Info 2</a>)<br />\<br />
<input type="button" value="Add references section" onClick="addRefSection()">'+<br />
'</fieldset></div>';<br />
document.getElementById('citeselect').innerHTML += form;<br />
}<br />
<br />
function makeCiteCode() {<br />
cites = document.getElementById('citediv'+numforms).getElementsByTagName('input');<br />
var template = '';<br />
var citebegin = '<ref';<br />
var citename = '';<br />
var citeinner = '';<br />
for (var i=0; i<cites.length; i++) {<br />
var citeid = cites[i].id;<br />
var citevalue = cites[i].value;<br />
citevalue = citevalue.trim(); //Trim leading and trailing whitespace<br />
if (citeid == "verbose") {<br />
if (cites[i].checked) {<br />
citeinner = citeinner.replace(/\|/g, "\n|");<br />
}<br />
}<br />
else if (citevalue !== '' && cites[i].type !== 'button' && cites[i].type !== 'image') {<br />
if (citeid === "refname") {<br />
citebegin += ' name="' + citevalue + '"';<br />
}<br />
else if (citeid == "template") {<br />
citename = '>\{\{' + citevalue;<br />
template = citevalue;<br />
}<br />
else {<br />
if (citeid === "pages") {<br />
if (citevalue.match(/^\w+$/) && template != 'cite encyclopedia') {<br />
citeid = "page"; //Use page= instead of pages= if only one page. Makes p. 5 instead of pp. 5.<br />
}<br />
else {<br />
citevalue = citevalue.replace(/-/g, "–"); //Replace hyphens with en dashes [[WP:ENDASH]]<br />
}<br />
}<br />
else if (citeid == "date" && citevalue.match(/^\d\d\d\d$/)) {<br />
citeid = "year"; // Use year= instead of date= if only the year is specified<br />
}<br />
citeinner += "|" + citeid + "=" + citevalue;<br />
}<br />
}<br />
}<br />
cite = citebegin + citename + citeinner + "}}</ref>";<br />
return cite;<br />
}<br />
<br />
function addcites(template) {<br />
var cite = makeCiteCode();<br />
$("#wpTextbox1").focus();<br />
insertTags(cite, '', '');<br />
//document.getElementById('citediv'+numforms).style.display = 'none';<br />
oldFormHide();<br />
}<br />
<br />
function addRefSection() {<br />
var wikicode = "\n";<br />
if (document.getElementById('references').checked) {<br />
wikicode += "== References ==\n";<br />
}<br />
else if (document.getElementById('notes').checked) {<br />
wikicode += "== Notes ==\n";<br />
}<br />
else {alert('No headline selected!');}<br />
<br />
if (document.getElementById('type-references').checked) {<br />
if (document.getElementById('ldr').checked) {<br />
wikicode += "<references>\n\n</references>\n";<br />
}<br />
else {<br />
wikicode += "<references/>\n";<br />
}<br />
}<br />
else if (document.getElementById('type-reflist').checked || document.getElementById('type-reflist2').checked) {<br />
var col2 = document.getElementById('type-reflist2').checked ? '|2' : '' ;<br />
if (document.getElementById('ldr').checked) {<br />
wikicode += "\{\{Reflist" + col2 + "|refs=\n\n}}\n";<br />
}<br />
else {<br />
wikicode += "\{\{Reflist" + col2 + "}}\n";<br />
}<br />
}<br />
else {alert('No type selected!');}<br />
$("#wpTextbox1").focus();<br />
insertTags(wikicode, '', '');<br />
document.getElementById('citediv'+numforms).innerHTML = '';<br />
}<br />
<br />
function getNamedRefs(calls) {<br />
if (typeof(wikEdUseWikEd) != 'undefined') {<br />
if (wikEdUseWikEd == true) {<br />
WikEdUpdateTextarea();<br />
}<br />
}<br />
text = document.getElementById('wpTextbox1').value;<br />
var regex;<br />
if (calls) {<br />
regex = /< *?ref +?name *?= *?(('([^']*?)')|("([^"]*?)")|([^'"\s]*?[^\/]\b)) *?\/ *?>/gi //'<br />
} else {<br />
regex = /< *?ref +?name *?= *?(('([^']*?)')|("([^"]*?)")|([^'"\s]*?[^\/]\b)) *?>/gi //'<br />
}<br />
var namedrefs = new Array();<br />
var i=0;<br />
var nr=true;<br />
do {<br />
ref = regex.exec(text);<br />
if(ref != null){<br />
if (ref[5]) {<br />
namedrefs[i] = ref[5];<br />
} else if (ref[3]) {<br />
namedrefs[i] = ref[3];<br />
} else {<br />
namedrefs[i] = ref[6];<br />
}<br />
i++;<br />
} else {<br />
nr=false;<br />
}<br />
} while (nr==true);<br />
return namedrefs;<br />
}<br />
<br />
function citeNamedRef() {<br />
var namedrefs = getNamedRefs(false);<br />
if (namedrefs == '') {<br />
oldFormHide();<br />
numforms++;<br />
var out = '<div id="citediv'+numforms+'"><fieldset>'+<br />
'<legend>References in text</legend>There are no named refs (<tt>&lt;ref name="Name"&gt;</tt>) in the text</fieldset></div>';<br />
document.getElementById('citeselect').innerHTML += out;<br />
}<br />
else {<br />
oldFormHide();<br />
numforms++;<br />
var form = '<div id="citediv'+numforms+'">'+<br />
'<fieldset><legend>References in article</legend>'+<br />
'<table cellspacing="5">'+<br />
'<tr><td><label for="namedrefs">&nbsp;Named references in text</label></td>'+<br />
'<td><select name="namedrefs" id="namedrefs">';<br />
for (var i=0;i<namedrefs.length;i++) {<br />
form+= '<option value="'+namedrefs[i]+'">'+namedrefs[i]+'</option>';<br />
}<br />
form+= '</select>'+<br />
'</td></tr></table>'+<br />
'<input type="button" value="Add citation" onClick="addnamedcite()">'+<br />
'</fieldset></div>';<br />
document.getElementById('citeselect').innerHTML += form;<br />
}<br />
}<br />
<br />
function addnamedcite() {<br />
var name = document.getElementById('citediv'+numforms).getElementsByTagName('select')[0].value;<br />
var ref = '<ref name="'+name+'" />';<br />
$("#wpTextbox1").focus();<br />
insertTags(ref, '', '');<br />
document.getElementById('citediv'+numforms).style.display = 'none';<br />
}<br />
<br />
function getAllRefs() {<br />
if (typeof(wikEdUseWikEd) != 'undefined') {<br />
if (wikEdUseWikEd == true) {<br />
WikEdUpdateTextarea();<br />
}<br />
}<br />
var text = document.getElementById('wpTextbox1').value;<br />
var regex = /< *?ref( +?name *?= *?(('([^']*?)')|("([^"]*?)")|([^'"\s]*?[^\/]\b)))? *?>((.|\n)*?)< *?\/? *?ref *?>/gim //"<br />
var allrefs = new Array();<br />
var i=0;<br />
var nr=true;<br />
do {<br />
ref = regex.exec(text);<br />
if(ref != null){<br />
if (ref[0].search(/[^\s]{150}/) != -1) {<br />
ref[0] = ref[0].replace(/\|([^\s])/g, "| $1");<br />
}<br />
ref[0] = ref[0].replace(/</g, "&lt;");<br />
ref[0] = ref[0].replace(/>/g, "&gt;");<br />
allrefs[i] = ref[0];<br />
i++;<br />
} else {<br />
nr=false;<br />
}<br />
} while (nr==true);<br />
return allrefs;<br />
}<br />
<br />
function NRcallError(namedrefs, refname) {<br />
for (var i=0; i<namedrefs.length; i++) {<br />
if (namedrefs[i] == refname) {<br />
return true;<br />
}<br />
}<br />
return false;<br />
}<br />
<br />
function errorCheck() {<br />
var allrefs = getAllRefs();<br />
var allrefscontent = new Array();<br />
var samecontentexclude = new Array();<br />
var sx=0;<br />
var templateexclude = new Array();<br />
var tx=0;<br />
var skipcheck = false;<br />
var namedrefcalls = getNamedRefs(true);<br />
for (var i=0; i<allrefs.length; i++) {<br />
allrefscontent[i] = allrefs[i].replace(/&lt; *?ref( +?name *?= *?(('([^']*?)')|("([^"]*?)")|([^'"\s]*?[^\/]\b)))? *?&gt;((.|\n)*?)&lt; *?\/? *?ref *?&gt;/gim, "$8"); //"<br />
}<br />
var namedrefs = getNamedRefs(false);<br />
var errorlist = new Array();<br />
var q=0;<br />
var unclosed = document.getElementById('unclosed').checked;<br />
var samecontent = document.getElementById('samecontent').checked;<br />
var templates = document.getElementById('templates').checked;<br />
var repeated = document.getElementById('repeated').checked;<br />
var undef = document.getElementById('undef').checked;<br />
for (var i=0; i<allrefs.length; i++) {<br />
if (allrefs[i].search(/&lt; *?\/ *?ref *?&gt;/) == -1 && unclosed) {<br />
errorlist[q] = '<tr><td width="75%"><tt>'+allrefs[i]+'</tt></td>';<br />
errorlist[q] += '<td width="25%">Unclosed <tt>&lt;ref&gt;</tt> tag</td></tr>';<br />
q++;<br />
}<br />
if (samecontent) {<br />
for (var d=0; d<samecontentexclude.length; d++) {<br />
if (allrefscontent[i] == samecontentexclude[d]) {<br />
skipcheck = true;<br />
}<br />
}<br />
var p=0;<br />
while (p<allrefs.length && !skipcheck) {<br />
if (allrefscontent[i] == allrefscontent[p] && i != p) {<br />
errorlist[q] = '<tr><td width="75%"><tt>'+allrefscontent[i]+'</tt></td>';<br />
errorlist[q] += '<td width="25%">Multiple refs contain this content, a <a href="//en.wikipedia.org/wiki/Wikipedia:Footnotes#Naming_a_ref_tag_so_it_can_be_used_more_than_once">named reference</a> should be used instead</td></tr>';<br />
q++;<br />
samecontentexclude[sx] = allrefscontent[i]<br />
sx++;<br />
break;<br />
}<br />
p++;<br />
}<br />
skipcheck=false;<br />
}<br />
if (templates) {<br />
if (allrefscontent[i].search(/\{\{cite/i) == -1 && allrefscontent[i].search(/\{\{citation/i) == -1 && allrefscontent[i].search(/\{\{Comic (book|strip) reference/i) == -1 && allrefscontent[i].search(/\{\{Editorial cartoon reference/i) == -1 && allrefscontent[i].search(/\{\{harv/i) == -1) {<br />
for (var x=0; x<templateexclude.length; x++) {<br />
if (allrefscontent[i] == templateexclude[x]) {<br />
skipcheck = true;<br />
}<br />
}<br />
if (!skipcheck) {<br />
errorlist[q] = '<tr><td width="75%"><tt>'+allrefs[i]+'</tt></td>';<br />
errorlist[q] += '<td width="25%">Does not use a <a href="//en.wikipedia.org/wiki/Wikipedia:Citation_templates">citation template</a></td></tr>';<br />
q++;<br />
templateexclude[tx] = allrefscontent[i];<br />
tx++;<br />
}<br />
skipcheck = false;<br />
}<br />
}<br />
}<br />
if (repeated) {<br />
var repeatnameexclude = new Array();<br />
var rx=0;<br />
for (var k=0; k<namedrefs.length; k++) {<br />
for (var d=0; d<repeatnameexclude.length; d++) {<br />
if (namedrefs[k] == repeatnameexclude[d]) {<br />
skipcheck = true;<br />
}<br />
}<br />
var z=0;<br />
while (z<namedrefs.length && !skipcheck) {<br />
if (namedrefs[k] == namedrefs[z] && k != z) {<br />
errorlist[q] = '<tr><td width="75%"><tt>'+namedrefs[k]+'</tt></td>';<br />
errorlist[q] += '<td width="25%">Multiple references are given the same <a href="//en.wikipedia.org/wiki/Wikipedia:Footnotes#Naming_a_ref_tag_so_it_can_be_used_more_than_once">name</a></td></tr>';<br />
q++;<br />
repeatnameexclude[rx] = namedrefs[z];<br />
rx++;<br />
break;<br />
}<br />
z++;<br />
}<br />
skipcheck = false;<br />
}<br />
}<br />
if (undef) {<br />
var undefexclude = new Array();<br />
var ux=0;<br />
for (var p=0; p<namedrefcalls.length; p++) {<br />
for (var d=0; d<undefexclude.length; d++) {<br />
if (allrefscontent[i] == undefexclude[d]) {<br />
skipcheck = true;<br />
}<br />
}<br />
if (!skipcheck) {<br />
if (!NRcallError(namedrefs, namedrefcalls[p])) {<br />
errorlist[q] = '<tr><td width="75%"><tt>'+namedrefcalls[p]+'</tt></td>';<br />
errorlist[q] += '<td width="25%">A <a href="//en.wikipedia.org/wiki/Wikipedia:Footnotes#Naming_a_ref_tag_so_it_can_be_used_more_than_once">named reference</a> is used but not defined</td></tr>';<br />
q++;<br />
undefexclude[ux] = namedrefs[p];<br />
ux++;<br />
}<br />
}<br />
skipcheck = false;<br />
}<br />
}<br />
if (q > 0) {<br />
return errorlist;<br />
} else {<br />
return 0;<br />
}<br />
}<br />
<br />
function dispErrors() {<br />
oldFormHide();<br />
var form = '<div id="errorform"><fieldset>'+<br />
'<legend>Error checking</legend>'+<br />
'<b>Check for:</b><br/>'+<br />
'<input type="checkbox" id="unclosed" /> Unclosed <tt>&lt;ref&gt;</tt> tags<br/>'+<br />
'<input type="checkbox" id="samecontent" /> References with the same content<br/>'+<br />
'<input type="checkbox" id="templates" /> References not using a <a href="//en.wikipedia.org/wiki/Wikipedia:Citation_templates">citation template</a><br/>'+<br />
'<input type="checkbox" id="repeated" /> Multiple references with the same name<br/>'+<br />
'<input type="checkbox" id="undef" /> Usage of undefined named references<br/>'+<br />
'<input type="button" id="errorchecksubmit" value="Check for selected errors" onclick="doErrorCheck()"/>'+<br />
'</fieldset></div>';<br />
document.getElementById('citeselect').innerHTML += form;<br />
}<br />
<br />
function doErrorCheck() {<br />
var errors = errorCheck();<br />
document.getElementById('citeselect').removeChild(document.getElementById('errorform'));<br />
if (errors == 0) {<br />
if (numforms != 0) {<br />
document.getElementById('citediv'+numforms).style.display = 'none';<br />
}<br />
numforms++;<br />
out = '<div id="citediv'+numforms+'"><fieldset>'+<br />
'<legend>Error checking</legend>No errors found.</fieldset></div>';<br />
document.getElementById('citeselect').innerHTML += out;<br />
}<br />
else {<br />
if (numforms != 0) {<br />
document.getElementById('citediv'+numforms).style.display = 'none';<br />
}<br />
numforms++;<br />
form = '<div id="citediv'+numforms+'">'+<br />
'<fieldset><legend>Error checking</legend>'+<br />
'<table border="1px">';<br />
for (var i=0; i<errors.length; i++) {<br />
form+=errors[i];<br />
}<br />
form+= '</table>'+<br />
'</fieldset></div>';<br />
document.getElementById('citeselect').innerHTML += form;<br />
}<br />
}<br />
<br />
function makeBookCitationCode(callback) {<br />
var cite = '<ref';<br />
var refname = document.getElementById('refname').value;<br />
if (/\S/.test(refname)) {<br />
cite += ' name="' + refname + '"';<br />
}<br />
cite += '>\{\{';<br />
<br />
if (document.getElementById('cite_book').checked || document.getElementById('plain').checked) {<br />
cite += 'cite book';<br />
}<br />
else if (document.getElementById('citation').checked) {<br />
cite += 'citation';<br />
}<br />
else {alert('No template selected.');}<br />
<br />
var authorcite = '';<br />
var prevauthor = 0;<br />
for (var i=3;i>=1;i--) {<br />
//var author = document.getElementById('author' + i).value;<br />
var last = document.getElementById('last' + i).value;<br />
var first = document.getElementById('first' + i).value;<br />
var authorlink = document.getElementById('authorlink' + i).value;<br />
if (i==1 && !prevauthor) { i = ''; }<br />
if (/\S/.test(authorlink)) {<br />
authorcite = '|authorlink' + i + '=' + authorlink + authorcite;<br />
}<br />
if (/\S/.test(last)) {<br />
authorcite = '|last' + i + '=' + last + '|first' + i + '=' + first + authorcite;<br />
prevauthor = 1;<br />
}<br />
/*else if (/\S/.test(author)) {<br />
authorcite = '|author' + i + '=' + author + authorcite;<br />
prevauthor = 1;<br />
}*/<br />
}<br />
cite += authorcite;<br />
<br />
var simplefields = ["coauthors", "editor", "others", "title", "url", "accessdate","edition","series","volume","date","publisher","location","language","isbn","pages","chapter"];<br />
for (var i=0;i<simplefields.length;i++) {<br />
var fieldname = simplefields[i];<br />
var value = document.getElementById(fieldname).value;<br />
if (/\S/.test(value) || fieldname == "title") {<br />
if (fieldname == "pages") {<br />
if (/^\w+$/.test(value)) {<br />
fieldname = "page"; //Use page= instead of pages= if only one page. Makes p. 5 instead of pp. 5.<br />
}<br />
else {<br />
value = value.replace(/-/g, "–"); //Replace hyphens with en dashes [[WP:ENDASH]]<br />
value = value.replace(/,\s*\s?/g, ", "); //One space after each comma<br />
}<br />
}<br />
else if (fieldname == "date" && /^\d\d\d\d$/.test(value)) {<br />
fieldname = "year"; // Use year= instead of date= if only the year is specified<br />
}<br />
cite += '|' + fieldname + '=' + value;<br />
}<br />
}<br />
<br />
<br />
var otherfields = document.getElementById('otherfields').value;<br />
if (/\S/.test(otherfields)) {<br />
cite += '|' + otherfields;<br />
}<br />
<br />
if (document.getElementById('extraparams').checked) {<br />
cite += '|authormask=';<br />
if (!document.getElementById('citation').checked) {<br />
cite += '|trans_title=';<br />
}<br />
cite += '|format=';<br />
cite += '|origyear=';<br />
cite += '|oclc=';<br />
cite += '|doi=';<br />
cite += '|bibcode=';<br />
cite += '|id=';<br />
if (/\S/.test(document.getElementById('chapter').value)) {<br />
if (!document.getElementById('citation').checked) {<br />
cite += '|trans_chapter=';<br />
} <br />
cite += '|chapterurl=';<br />
}<br />
cite += '|quote=';<br />
cite += '|laysummary=';<br />
cite += '|laydate=';<br />
}<br />
<br />
cite += "}}</ref>";<br />
<br />
<br />
if (document.getElementById('plain').checked) {<br />
var match = /^(.*?)(\{\{.*}})(.*?)$/.exec(cite);<br />
if (match) {<br />
var citebeg = match[1];<br />
var citemid = match[2];<br />
var citeend = match[3];<br />
citemid = citemid.replace(/cite book/, "Vancite book");<br />
//alert(citebeg + ':::' + citemid + ':::' + citeend);<br />
//document.getElementById('fullcite').value = 'Updating...';<br />
var url = 'api.php?action=expandtemplates&format=xml&text=' + encodeURIComponent(citemid);<br />
document.getElementById('progress').style.visibility = "visible";<br />
var xmlhttpExpand = new XMLHttpRequest();<br />
xmlhttpExpand.onreadystatechange=function() {<br />
if(xmlhttpExpand.readyState==4) { <br />
if(xmlhttpExpand.status==200) {<br />
document.getElementById('progress').style.visibility = "hidden";<br />
var xmlDoc=xmlhttpExpand.responseXML.documentElement;<br />
var expanded = xmlDoc.getElementsByTagName("expandtemplates")[0].textContent;<br />
if (expanded == undefined) {<br />
expanded = xmlDoc.getElementsByTagName("expandtemplates")[0].childNodes[0].nodeValue;<br />
}<br />
expanded = expanded.replace(/<span.*?>/ig, '');<br />
expanded = expanded.replace(/<\/span>/ig, '');<br />
expanded = expanded.replace(/<nowiki\/?>/ig, '');<br />
expanded = expanded.replace(/\&\#32\;/ig, ' ');<br />
expanded = expanded.replace(/\&\#59\;/ig, ';');<br />
expanded = expanded.replace(/\&\#91\;/ig, '[');<br />
expanded = expanded.replace(/\&\#93\;/ig, ']');<br />
<br />
plaincite = citebeg + expanded + citeend;<br />
//alert(plaincite);<br />
callback(plaincite);<br />
}<br />
else<br />
alert('The query returned an error.');<br />
}<br />
}<br />
xmlhttpExpand.open("GET",url,true);<br />
xmlhttpExpand.send(null);<br />
}<br />
else {alert('Error A1');}<br />
}<br />
else {<br />
if (document.getElementById('verbose').checked) {<br />
cite = cite.replace(/\|/g, "\n|");<br />
}<br />
callback(cite);<br />
}<br />
}<br />
<br />
function makeCiteBook() {<br />
makeBookCitationCode(function(cite) { <br />
$("#wpTextbox1").focus();<br />
insertTags(cite, '', ''); <br />
if (!refToolDebug) { oldFormHide(); }<br />
});<br />
}<br />
<br />
function formatDate(datein, dateformat) {<br />
if (dateformat == '') {return (datein);}<br />
datein = datein.replace(/^\s*(.*?)\s*$/, "$1"); //Trim whitespace<br />
var year = -1;<br />
var month = -1;<br />
var date = -1;<br />
var match = /^(\d\d\d\d)-(\d\d?)(-(\d\d?))?$/.exec(datein);<br />
if(match) {<br />
//alert(' match[1]=' + match[1] + ' match[2]=#' + match[2] + '# match[3]=' + match[3] + ' match[4]=' + match[4] );<br />
year = parseInt(match[1], 10); //10 forces decimal conversion<br />
month = parseInt(match[2], 10);<br />
if (match[4]) {<br />
date = parseInt(match[4], 10);<br />
}<br />
}<br />
else if (/^\d\d? \w+ \d\d\d\d$/.test(datein) || /^\w+ \d\d?, \d\d\d\d$/.test(datein)) {<br />
var DT = new Date(datein);<br />
year = DT.getUTCFullYear();<br />
month = DT.getUTCMonth()+1;<br />
date = DT.getUTCDate()+1;<br />
}<br />
else if (datein == 'today') {<br />
var DT = new Date();<br />
year = DT.getUTCFullYear();<br />
month = DT.getUTCMonth()+1;<br />
date = DT.getUTCDate();<br />
}<br />
else {return (datein);}<br />
//alert('datein=' + datein + ', y=' + year + ', m=' + month + ', d=' + date);<br />
<br />
var zmonth = '';<br />
if (month < 10) {<br />
zmonth = "0"+month.toString();<br />
} else {<br />
zmonth = month.toString();<br />
}<br />
month = month.toString();<br />
var zdate = '';<br />
if (date > -1) {<br />
if (date < 10) {<br />
zdate = "0"+date.toString();<br />
} else {<br />
zdate = date.toString();<br />
}<br />
date = date.toString()<br />
}<br />
else { date = ''; }<br />
<br />
var datestr = dateformat;<br />
datestr = datestr.replace('<date>', date);<br />
datestr = datestr.replace('<month>', month);<br />
datestr = datestr.replace('<zdate>', zdate);<br />
datestr = datestr.replace('<zmonth>', zmonth);<br />
datestr = datestr.replace('<monthname>', months[month-1]);<br />
datestr = datestr.replace('<year>', year.toString());<br />
datestr = datestr.replace(/\s+/, ' ').replace(/^\s+/, '').replace(/(\D),/, '$1').replace(/-$/, '');<br />
return (datestr);<br />
}<br />
<br />
<br />
function getDateFormat() {<br />
var dateformat = '';<br />
if (document.getElementById('dmy')){<br />
if (document.getElementById('dmy').checked) {dateformat = '<date> <monthname> <year>'}<br />
else if (document.getElementById('mdy').checked) {dateformat = '<monthname> <date>, <year>'}<br />
else if (document.getElementById('ymd').checked) {dateformat = '<year>-<zmonth>-<zdate>'}<br />
}<br />
else if (citeUserDateFormat) {<br />
dateformat = citeUserDateFormat;<br />
} else {<br />
dateformat = citeGlobalDateFormat;<br />
}<br />
return (dateformat);<br />
}<br />
<br />
function reformatDates() {<br />
var dateformat = getDateFormat();<br />
//alert(':' + dateformat + ':');<br />
document.getElementById('accessdate').value = formatDate(document.getElementById('accessdate').value, dateformat);<br />
document.getElementById('date').value = formatDate(document.getElementById('date').value, dateformat);<br />
//document.getElementById('dateformat_hidden').value = getDateFormatShort();<br />
}<br />
<br />
/*function updateGetButton() {<br />
document.getElementById('urlget').disabled = document.getElementById('url').value == '';<br />
}*/<br />
<br />
function preview(wikitext) {<br />
document.getElementById('progress').style.visibility = "visible";<br />
wikitext += '<references />';<br />
var url = "api.php?action=parse&format=xml&prop=text&text=" + encodeURIComponent(wikitext);<br />
var xmlhttp = new XMLHttpRequest();<br />
xmlhttp.onreadystatechange = function () {<br />
if (xmlhttp.readyState==4) {<br />
if(xmlhttp.status==200) {<br />
document.getElementById('progress').style.visibility = "hidden";<br />
var xmlDoc=xmlhttp.responseXML.documentElement;<br />
var previewHTML = xmlDoc.getElementsByTagName("text")[0].textContent;<br />
if (previewHTML == undefined) {<br />
previewHTML = xmlDoc.getElementsByTagName("text")[0].childNodes[0].nodeValue;<br />
}<br />
//alert(previewHTML);<br />
previewHTML = previewHTML.replace(/href="\//gi, 'href="//en.wikipedia.org/');<br />
document.getElementById('previewSpan').innerHTML = '<fieldset><legend>Citation preview</legend>' + previewHTML + '</fieldset>';<br />
}<br />
else<br />
alert('The query returned an error.');<br />
}<br />
};<br />
xmlhttp.open("GET", url, true);<br />
xmlhttp.send(null)<br />
}<br />
<br />
function previewCitationBook() {<br />
makeBookCitationCode(preview);<br />
}<br />
<br />
function previewCitationDefault() {<br />
var wikitext = makeCiteCode();<br />
preview(wikitext);<br />
}<br />
<br />
function pullJs() {<br />
var book_url = document.getElementById('url').value;<br />
if (book_url) {<br />
document.getElementById('progress').style.visibility = "visible";<br />
var book_url_enc = encodeURIComponent(book_url);<br />
if(!refTagURL) {refTagURL = defaultRefTagURL;}<br />
var baseurl = refTagURL + 'googlebooksjs.py';<br />
var url = baseurl + '?book_url=' + book_url_enc + '&callback=setFormValues';<br />
/*var script = document.createElement("script"); <br />
script.setAttribute("src",url);<br />
script.setAttribute("type","text/javascript"); <br />
document.body.appendChild(script);*/<br />
JsonRequest(url);<br />
}else{<br />
alert('No URL.');<br />
}<br />
}<br />
<br />
function pullISBN() {<br />
var isbn = document.getElementById('isbn').value;<br />
isbn = isbn.replace(/[^0-9]/g,""); //Digits only<br />
if (isbn) {<br />
document.getElementById('progress').style.visibility = "visible";<br />
if(!refTagURL) {refTagURL = defaultRefTagURL;}<br />
var baseurl = refTagURL + 'getdiberri.py';<br />
var url = baseurl + '?isbn=' + isbn + '&callback=useDiberriData';<br />
/*var script = document.createElement("script");<br />
script.setAttribute("src",url);<br />
script.setAttribute("type","text/javascript");<br />
document.body.appendChild(script);*/<br />
JsonRequest(url);<br />
}else{<br />
alert('No ISBN.');<br />
}<br />
}<br />
<br />
function pullDOI() {<br />
var doi = document.getElementById('doi').value;<br />
if (doi) {<br />
document.getElementById('progress').style.visibility = "visible";<br />
if(!refTagURL) {refTagURL = defaultRefTagURL;}<br />
var baseurl = refTagURL + 'doifetchjs.py';<br />
var url = baseurl + '?doi=' + encodeURIComponent(doi) + '&callback=useDoiData';<br />
JsonRequest(url);<br />
}else{<br />
alert('No DOI.');<br />
}<br />
}<br />
<br />
function pullPMID() {<br />
alert('Not implemented yet...');<br />
/*var doi = document.getElementById('doi').value;<br />
if (doi) {<br />
document.getElementById('progress').style.visibility = "visible";<br />
if(!refTagURL) {refTagURL = defaultRefTagURL;}<br />
var baseurl = refTagURL + 'doifetchjs.py';<br />
var url = baseurl + '?doi=' + encodeURIComponent(doi) + '&callback=useDoiData';<br />
JsonRequest(url);<br />
}else{<br />
alert('No DOI.');<br />
}*/<br />
}<br />
<br />
function pullURL() {<br />
var url = document.getElementById('url').value;<br />
if (url) {<br />
document.getElementById('progress').style.visibility = "visible";<br />
if(!refTagURL) {refTagURL = defaultRefTagURL;}<br />
var baseurl = refTagURL + 'urlfetchjs.py';<br />
var url = baseurl + '?url=' + encodeURIComponent(url) + '&callback=useUrlData';<br />
JsonRequest(url);<br />
}else{<br />
alert('No URl.');<br />
}<br />
}<br />
<br />
function JsonRequest(url) {<br />
//importScriptURI(url) //Bad: does not import the same script more than once<br />
var script = document.createElement("script"); <br />
script.setAttribute("src",url);<br />
script.setAttribute("type","text/javascript"); <br />
//document.body.appendChild(script);<br />
document.getElementsByTagName('head')[0].appendChild(script);<br />
}<br />
<br />
function setFormValues(bookdata) {<br />
document.getElementById('progress').style.visibility = "hidden";<br />
//alert(bookdata);<br />
//alert(bookdata.page);<br />
if (bookdata.title.length != 0) { document.getElementById('title').value = bookdata.title; }<br />
if (bookdata.isbn.length != 0) { document.getElementById('isbn').value = bookdata.isbn; }<br />
if (bookdata.publisher.length != 0) { document.getElementById('publisher').value = bookdata.publisher; }<br />
if (bookdata.pages.length != 0) { <br />
document.getElementById('pages').value = bookdata.pages; <br />
document.getElementById('pages').style.backgroundColor = '#FFFF99';<br />
}<br />
if (bookdata.url.length != 0) { document.getElementById('url').value = bookdata.url; }<br />
if (bookdata.date.length != 0) { document.getElementById('date').value = bookdata.date; }<br />
<br />
for (var i=0;i<bookdata.authors.length && i<=2;i++) {<br />
authorn = i+1;<br />
var author = bookdata.authors[i];<br />
var match = /(.+)\s+(.+)/.exec(author);<br />
if (match) {<br />
document.getElementById('first' + authorn).value = match[1];<br />
document.getElementById('last' + authorn).value = match[2];<br />
}<br />
else {<br />
document.getElementById('last' + authorn).value = author;<br />
}<br />
}<br />
document.getElementById('coauthors').value = bookdata.authors.splice(3).join(', ')<br />
setAccessDateToday()<br />
makeRefname()<br />
}<br />
<br />
function useDiberriData(bookdata) {<br />
document.getElementById('progress').style.visibility = "hidden";<br />
if (bookdata.title.length != 0) { document.getElementById('title').value = bookdata.title; }<br />
if (bookdata.isbn.length != 0) { document.getElementById('isbn').value = bookdata.isbn; }<br />
if (bookdata.publisher.length != 0) { document.getElementById('publisher').value = bookdata.publisher; }<br />
if (bookdata.location.length != 0) { document.getElementById('location').value = bookdata.location; }<br />
if (bookdata.year.length != 0) { document.getElementById('date').value = bookdata.year; }<br />
if (bookdata.authors.length != 0) {<br />
authors = bookdata.authors.split(';', 4);<br />
for (var i=0;i<authors.length && i<=2;i++) {<br />
authorn = i+1;<br />
nameparts = authors[i].split(',', 2);<br />
document.getElementById('last' + authorn).value = nameparts[0].trim();<br />
if (nameparts.length == 2) {<br />
document.getElementById('first' + authorn).value = nameparts[1].trim();<br />
}<br />
}<br />
if (authors[3]) { document.getElementById('coauthors').value = authors[3].trim(); }<br />
}<br />
makeRefname() <br />
}<br />
<br />
function useDoiData(bookdata) {<br />
document.getElementById('progress').style.visibility = "hidden";<br />
if (bookdata.title) { document.getElementById('title').value = bookdata.title; }<br />
//if (bookdata.isbn.length != 0) { document.getElementById('isbn').value = bookdata.isbn; }<br />
//if (bookdata.publisher.length != 0) { document.getElementById('publisher').value = bookdata.publisher; }<br />
//if (bookdata.location.length != 0) { document.getElementById('location').value = bookdata.location; }<br />
if (bookdata.year) { document.getElementById('date').value = bookdata.year; }<br />
if (bookdata.issn) { document.getElementById('issn').value = bookdata.issn; }<br />
if (bookdata.journal) { document.getElementById('journal').value = bookdata.journal; }<br />
if (bookdata.volume) { document.getElementById('volume').value = bookdata.volume; }<br />
if (bookdata.issue) { document.getElementById('issue').value = bookdata.issue; }<br />
if (bookdata.pages) { document.getElementById('pages').value = bookdata.pages; }<br />
<br />
if (bookdata.authors) {<br />
var coauthors = [];<br />
for (var i=0;i<bookdata.authors.length;i++) {<br />
var authorn = i+1;<br />
var author = bookdata.authors[i];<br />
if (authorn == 1) {<br />
if (author.last) { document.getElementById('last').value = author.last.trim(); }<br />
if (author.first) { document.getElementById('first').value = author.first.trim(); }<br />
}<br />
else {<br />
var authorparts = [];<br />
if (author.first) { authorparts.push( author.first.trim() ); }<br />
if (author.last) { authorparts.push( author.last.trim() ); }<br />
coauthors.push(authorparts.join(' '));<br />
}<br />
}<br />
if (coauthors[0]) { document.getElementById('coauthors').value = coauthors.join(', '); }<br />
}<br />
makeRefname();<br />
}<br />
<br />
function useUrlData(data) {<br />
document.getElementById('progress').style.visibility = "hidden";<br />
if (data.title) { document.getElementById('title').value = data.title; }<br />
if (data.work) { document.getElementById('work').value = data.work; }<br />
if (data.page) { document.getElementById('pages').value = data.page; }<br />
if (data.date) {<br />
document.getElementById('date').value = formatDate(data.date, getDateFormat());<br />
}<br />
/*if (data.author) {<br />
var authors = data.author.replace(/ [Aa]nd /, ', ');<br />
var match = /(.+),\s*(.+)/.exec(authors);<br />
var firstauthor = '';<br />
if (match) {<br />
firstauthor = match[1];<br />
var coauthors = match[2];<br />
document.getElementById('coauthors').value = coauthors;<br />
}<br />
else {<br />
firstauthor = data.author;<br />
}<br />
var match = /(.+)\s+(.+)/.exec(firstauthor);<br />
if (match) {<br />
document.getElementById('first').value = match[1];<br />
document.getElementById('last').value = match[2];<br />
}<br />
else {<br />
document.getElementById('last').value = author;<br />
}<br />
}*/<br />
if (data.authors) {<br />
var coauthors = [];<br />
for (var i=0;i<data.authors.length;i++) {<br />
var authorn = i+1;<br />
var author = data.authors[i];<br />
if (authorn == 1) {<br />
var match = /(.+)\s+(.+)/.exec(author);<br />
if (match) {<br />
document.getElementById('first').value = match[1].trim();<br />
document.getElementById('last').value = match[2].trim();<br />
}<br />
else {<br />
document.getElementById('last').value = author.trim();<br />
}<br />
}<br />
else {<br />
coauthors.push(author);<br />
}<br />
}<br />
if (coauthors[0]) { document.getElementById('coauthors').value = coauthors.join(', '); }<br />
}<br />
}<br />
<br />
$( refbuttons );</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=MediaWiki:Gadgets-definition&diff=12947
MediaWiki:Gadgets-definition
2017-06-25T20:18:52Z
<p>Nicolas Brouard: naimportována 1 revize</p>
<hr />
<div>#Editing<br />
* wikEd[ResourceLoader]|wikEd.js<br />
* refToolbar[ResourceLoader|default|dependencies=user.options,mediawiki.legacy.wikibits]|refToolbar.js<br />
* refToolbarBase[ResourceLoader|hidden]|refToolbarBase.js<br />
* DotsSyntaxHighlighter[ResourceLoader|default|dependencies=jquery.client]|DotsSyntaxHighlighter.js<br />
<br />
#Interface<br />
* exlinks[ResourceLoader]|exlinks.js<br />
* purgeTab[ResourceLoader]|purgeTab.js<br />
* citations[ResourceLoader]|citations.js</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=MediaWiki:Gadget-DotsSyntaxHighlighter.js&diff=12937
MediaWiki:Gadget-DotsSyntaxHighlighter.js
2017-06-25T20:18:51Z
<p>Nicolas Brouard: naimportována 1 revize</p>
<hr />
<div>//Syntax highlighter with various advantages See [[User:Remember the<br />
//dot/Syntax highlighter]] for more information<br />
/*<br />
MediaWiki:Gadget-DotsSyntaxHighlighter<br />
[https://www.mediawiki.org/wiki/User:Remember_the_dot/Syntax_highlighter Adapted from Syntax highlighter]: Make syntax stand out colourfully in the edit box and especially with Demopaedia TextTerm etc.<br />
<br />
MediaWiki:Gadget-DotsSyntaxHighlighter.js<br />
<br />
*/<br />
//in the edit box and especially with Demopaedia TextTerm etc.<br />
/* This file may be used under the terms of any of the following<br />
licenses, as well as any later version of the same licenses:<br />
<br />
GNU General Public License 2.0<br />
<https://www.gnu.org/licenses/old-licenses/gpl-2.0.html><br />
<br />
Creative Commons Attribution-ShareAlike 3.0 Unported License<br />
<https://creativecommons.org/licenses/by-sa/3.0/><br />
<br />
GNU Free Documentation License 1.2<br />
<https://www.gnu.org/licenses/old-licenses/fdl-1.2.html><br />
Modified by Nicolas Brouard for Demopaedia.org 12 June 2017<br />
*/<br />
<br />
(function () {<br />
"use strict";<br />
<br />
//variables that are preserved between function calls<br />
var wpTextbox0;<br />
var wpTextbox1;<br />
var syntaxStyleTextNode;<br />
var lastText;<br />
var maxSpanNumber = -1; //the number of the last span available, used to tell if creating additional spans is necessary<br />
var highlightSyntaxIfNeededIntervalID;<br />
var attributeObserver;<br />
var parentObserver;<br />
<br />
/* Define context-specific regexes, one for every common token that ends the<br />
current context.<br />
<br />
An attempt has been made to search for the most common syntaxes first,<br />
thus maximizing performance. Syntaxes that begin with the same character<br />
are searched for at the same time.<br />
<br />
Supported wiki syntaxes from most common to least common:<br />
[[internal link]] [http:// named external link]<br />
{{template}} {{{template parameter}}} {| table |}<br />
<tag> <!-- comment --><br />
http:// bare external link<br />
=Heading= * unordered list # ordered list : indent ; small heading ---- horizontal line<br />
''italic'' '''bold'''<br />
three tildes username four tildes signature five tildes timestamp<br />
&entity;<br />
<br />
The tag-matching regex follows the XML standard closely so that users<br />
won't feel like they have to escape sequences that MediaWiki will never<br />
consider to be tags.<br />
<br />
Only entities for characters which need to be escaped or cannot be<br />
unambiguously represented in a monospace font are highlighted, such as<br />
Greek letters that strongly resemble Latin letters. Use of other entities<br />
is discouraged as a matter of style. For the same reasons, numeric<br />
entities should be in hexadecimal (giving character codes in decimal only<br />
adds confusion).<br />
<br />
Newlines are sucked up into ending tokens (including comments, bare<br />
external links, lists, horizontal lines, signatures, entities, etc.) to<br />
avoid creating spans with nothing but newlines in them.<br />
<br />
Flags: g for global search, m for make ^ match the beginning of each line<br />
and $ the end of each line<br />
*/<br />
var wgUrlProtocols = mw.config.get("wgUrlProtocols");<br />
var entityRegexBase = "&(?:(?:n(?:bsp|dash)|m(?:dash|inus)|lt|e[mn]sp|thinsp|amp|quot|gt|shy|zwn?j|lrm|rlm|Alpha|Beta|Epsilon|Zeta|Eta|Iota|Kappa|[Mm]u|micro|Nu|[Oo]micron|[Rr]ho|Tau|Upsilon|Chi)|#x[0-9a-fA-F]+);\n*";<br />
var breakerRegexBase = "\\[(?:\\[|(?:" + wgUrlProtocols + "))|\\{(?:\\{\\{?|\\|)|<(?:[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:\\w\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD-\\.\u00B7\u0300-\u036F\u203F-\u203F-\u2040]*(?=/?>| |\n)|!--[^]*?-->\n*)|(?:" + wgUrlProtocols.replace("|\\/\\/", "") + ")[^\\s\"<>[\\]{-}]*[^\\s\",\\.:;<>[\\]{-}]\n*|^(?:=|[*#:;]+\n*|-{4,}\n*)|\\\\'\\\\'(?:\\\\')?|~{3,5}\n*|" + entityRegexBase;<br />
function breakerRegexWithPrefix(prefix)<br />
{<br />
//the stop token has to be at the beginning of the regex so that it takes precedence over substrings of itself.<br />
return new RegExp("(" + prefix + ")\n*|" + breakerRegexBase, "gm");<br />
}<br />
function nowikiTagBreakerRegex(tagName)<br />
{<br />
return new RegExp("(</" + tagName + ">)\n*|" + entityRegexBase, "gm");<br />
}<br />
var defaultBreakerRegex = new RegExp(breakerRegexBase, "gm");<br />
var wikilinkBreakerRegex = breakerRegexWithPrefix("]][a-zA-Z]*");<br />
var namedExternalLinkBreakerRegex = breakerRegexWithPrefix("]");<br />
var parameterBreakerRegex = breakerRegexWithPrefix("}}}");<br />
var templateBreakerRegex = breakerRegexWithPrefix("}}");<br />
var templateArgBreakerRegex = breakerRegexWithPrefix("[\\|}]");<br />
var tableBreakerRegex = breakerRegexWithPrefix("\\|}");<br />
var headingBreakerRegex = breakerRegexWithPrefix("\n");<br />
var tagBreakerRegexCache = {};<br />
var nowikiTagBreakerRegexCache = {};<br />
<br />
function highlightSyntax()<br />
{<br />
lastText = wpTextbox1.value;<br />
/* Backslashes and apostrophes are CSS-escaped at the beginning and all<br />
parsing regexes and functions are designed to match. On the other hand,<br />
newlines are not escaped until written so that in the regexes ^ and $<br />
work for both newlines and the beginning or end of the string. */<br />
var text = lastText.replace(/['\\]/g, "\\$&") + "\n"; //add a newline to fix scrolling and parsing issues<br />
var i = 0; //the location of the parser as it goes through var text<br />
<br />
var css = "";<br />
var spanNumber = 0;<br />
var lastColor;<br />
var before = true;<br />
<br />
//writes text into to-be-created span elements of wpTextbox0 using :before and :after pseudo-elements<br />
//both :before and :after are used because using two pseudo-elements per span is significantly faster than doubling the number of spans required<br />
function writeText(text, color)<br />
{<br />
//no need to use another span if using the same color<br />
if (color != lastColor)<br />
{<br />
//whitespace is omitted in the hope of increasing performance<br />
css += "'}#s" + spanNumber; //spans will be created with IDs s0 through sN<br />
if (before)<br />
{<br />
css += ":before{";<br />
before = false;<br />
}<br />
else<br />
{<br />
css += ":after{";<br />
before = true;<br />
++spanNumber;<br />
}<br />
if (color)<br />
{<br />
//"background-color" is 6 characters longer than "background" but the browser processes it faster<br />
css += "background-color:" + color + ";";<br />
}<br />
css += "content:'";<br />
lastColor = color;<br />
}<br />
css += text;<br />
}<br />
<br />
/* About assumedBold and assumedItalic:<br />
<br />
Highlighting bold or italic markup presents a special challenge<br />
because the actual MediaWiki parser uses multiple passes to determine<br />
which ticks represent start tags and which represent end tags.<br />
Because that would be too slow for us here, we instead keep track of<br />
what kinds of unclosed opening ticks have been encountered and use<br />
that to make a good guess as to whether the next ticks encountered<br />
are an opening tag or a closing tag.<br />
<br />
The major downsides to this method are that '''apostrophe italic''<br />
and ''italic apostrophe''' are not highlighted correctly, and bold<br />
and italic are both highlighted in the same color.<br />
<br />
To permit ''The best<ref>''Reference Title''</ref> book ever'',<br />
assumedBold and assumedItalic are saved on the stack and reset to<br />
undefined (essentially, false) when recursing into a new block. */<br />
<br />
function highlightBlock(color, breakerRegex, assumedBold, assumedItalic)<br />
{<br />
var match;<br />
<br />
for (breakerRegex.lastIndex = i; match = breakerRegex.exec(text); breakerRegex.lastIndex = i)<br />
{<br />
// console.log(" breakerRegex.lastIndex="+breakerRegex.lastIndex);<br />
// console.log(" breakerRegex.source="+breakerRegex.source);<br />
//console.log(" match.input="+match.input);<br />
// if (match[1])<br />
// //console.log(" match1=" + match[1]+ " match0=" +match[0]);<br />
// else<br />
// //console.log(" unmatch1=" + match[1]+ " match0=" +match[0]);<br />
if (match[1])<br />
{<br />
//end token found, we are within a coloured zone <br />
writeText(text.substring(i, breakerRegex.lastIndex), color);<br />
//console.log(" breaker Regex i="+ i + " breakerRegex.lastIndex=" +breakerRegex.lastIndex + " t="+text.substring(i, breakerRegex.lastIndex) + " return highlight" );<br />
i = breakerRegex.lastIndex; /* end of zone */<br />
<br />
return; /* returns after the break ie for with a defautregex in order to search again */<br />
}<br />
<br />
var endIndexOfLastColor = breakerRegex.lastIndex - match[0].length; /* Not including the match? */<br />
if (i < endIndexOfLastColor) //avoid calling writeText with text == "" to improve performance<br />
{<br />
writeText(text.substring(i, endIndexOfLastColor), color); /* Includes i (from 0), excludes endIndexOfLastColor */<br />
//console.log(" substring i="+ i + " endIndexOfLastColor=" + endIndexOfLastColor );<br />
<br />
}<br />
<br />
i = breakerRegex.lastIndex; /* Out of coloured zone */ /* Dot is first position after the search "{{." */<br />
<br />
switch (match[0].charAt(0)) //cases in this switch should be arranged from most common to least common<br />
{<br />
case "[":<br />
if (match[0].charAt(1) == "[")<br />
{<br />
//wikilink<br />
writeText("[[", syntaxHighlighterConfig.wikilinkColor || color);<br />
highlightBlock(syntaxHighlighterConfig.wikilinkColor || color, wikilinkBreakerRegex);<br />
}<br />
else<br />
{<br />
//named external link<br />
writeText(match[0], syntaxHighlighterConfig.externalLinkColor || color);<br />
highlightBlock(syntaxHighlighterConfig.externalLinkColor || color, namedExternalLinkBreakerRegex);<br />
}<br />
break;<br />
case "{":<br />
if (match[0].charAt(1) == "{")<br />
{<br />
if (match[0].length == 3)<br />
{<br />
//parameter<br />
writeText("{{{", syntaxHighlighterConfig.parameterColor || color);<br />
highlightBlock(syntaxHighlighterConfig.parameterColor || color, parameterBreakerRegex);<br />
}<br />
else<br />
{<br />
//template<br />
//some other kind of template, search for its end<br />
//writeText("{{", syntaxHighlighterConfig.templateColor || color);<br />
//{{Note|6| {{NoteTerm|Biométrie}}, s.f. - {{NoteTerm|biométrique}}, adj. - {{NoteTerm|biométricien}}, s.m. : spécialiste de la biométrie.}}<br />
//var templEnd = text.indexOf("}", i) + 1; /* Just before first } +1*/<br />
var templTextTermEnd = text.indexOf("|", i); /* char from 0 to index "{{Note|" is position 6 (7th char); just after first | if any*/<br />
var iv=text.indexOf("|", i);//"{{Note|1|" termEnd is position 7 (starting at "1"), result is 8<br />
var ib=text.indexOf("}", i);//"{{RefTerm|Love}}" termEnd is position 9 (starting at "L"), result is 13<br />
var nbarg=0;<br />
var templTextTermEnd ;<br />
var templTextTermEndClose;<br />
if( (ib < iv) || (iv == -1) ){<br />
nbarg=0;<br />
templTextTermEndClose=templTextTermEnd = ib ;/* Just at } if any */ /* no argument */<br />
}else{<br />
nbarg=1;<br />
templTextTermEnd = iv ; /* Just at second | if any */<br />
}<br />
//{{Current status}}<br />
if(nbarg==1){<br />
iv=text.indexOf("|", templTextTermEnd+1);//"{{Note|1|" termEnd is position 7 (starting at "1"), result is 8<br />
ib=text.indexOf("}", templTextTermEnd+1);//"{{RefTerm|Love}}" termEnd is position 9 (starting at "L"), result is 13<br />
if( (ib < iv) || (iv == -1) ){<br />
templTextTermEndClose= ib ;/* Just at } if any */<br />
}else{<br />
nbarg=2;<br />
templTextTermEndClose = iv ; /* Just at second | if any {{Note|1| */<br />
}<br />
}<br />
//console.log("templ1 TextTermEndClose :" + templTextTermEndClose); // Ok before |<br />
// Be careful with scrolling and asynchronous generated by console.log see<br />
// https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Scroll-linked_effects<br />
//console.log("templ End :" + templEnd + " noarg=", noarg); // Ok before }}<br />
// console.log("templ TextTermEnd :" + templTextTermEnd); // Ok before |<br />
//console.log("templ TextTermEndClose :" + templTextTermEndClose); // Ok before |<br />
// La {{TextTerm|démographie historique|1|102|OtherIndexEntry=historique. démographie ...}} s’occupe<br />
//de la {{NonRefTerm|structure}} <br />
//{{Note|6| {{NoteTerm|Biométrie}}, s.f. - {{NoteTerm|biométrique}}, adj. - {{NoteTerm|biométricien}}, s.m. : spécialiste de la biométrie.}}<br />
//var templText = text.substring(i+2 - match[0].length, templEnd-1);<br />
//TextTerm|démographie historique|1|102|OtherIndexEntry=historique. démographie ..<br />
//NonRefTerm|structure<br />
var templTextType = text.substring(i+2 - match[0].length, templTextTermEnd); /* Excluding char at TermEnd | or } */<br />
//TextTerm<br />
//NonRefTerm<br />
//var templTextTermall = text.substring(templTextTermEnd, templEnd); /* Just after termination | or }*/<br />
//démographie historique|1|102|OtherIndexEntry=historique. démographie ...<br />
//NonRefTerm|structure<br />
var templTextTerm;<br />
if(nbarg >0)<br />
templTextTerm = text.substring(templTextTermEnd+1,templTextTermEndClose); //excluding terminaison | or }<br />
else<br />
templTextTerm="";<br />
//templTextTermall.substring(0, templTextTermall.indexOf("|"));<br />
//démographie historique<br />
//structure<br />
var TypeTemplateColor=syntaxHighlighterConfig.templateColor;<br />
var TemplateColor=syntaxHighlighterConfig.templateColor;<br />
var Text1TemplateColor=syntaxHighlighterConfig.templateColor;<br />
var Text2TemplateColor=syntaxHighlighterConfig.templateColor;<br />
if((templTextType=="TextTerm") ){<br />
TypeTemplateColor= syntaxHighlighterConfig.templTextTermColor;<br />
TemplateColor= syntaxHighlighterConfig.templTypeTextTermColor;<br />
Text1TemplateColor= syntaxHighlighterConfig.backgroundColor;<br />
Text2TemplateColor=TemplateColor ;<br />
}else if ( (templTextType=="Note") ){<br />
TypeTemplateColor= syntaxHighlighterConfig.templTypeNoteColor;<br />
TemplateColor= syntaxHighlighterConfig.templNoteColor;<br />
Text1TemplateColor= syntaxHighlighterConfig.backgroundColor;<br />
Text2TemplateColor= syntaxHighlighterConfig.templNoteColor;<br />
}else if ( (templTextType=="NoteTerm") ){<br />
TypeTemplateColor= syntaxHighlighterConfig.templNoteTermColor;<br />
TemplateColor= syntaxHighlighterConfig.templNoteTermColor;<br />
Text1TemplateColor= syntaxHighlighterConfig.backgroundColor;<br />
Text2TemplateColor= syntaxHighlighterConfig.templNoteTermColor;<br />
}else if (templTextType=="NewTextTerm" ){<br />
TypeTemplateColor= syntaxHighlighterConfig.templTextTermColor;<br />
TemplateColor= syntaxHighlighterConfig.templTypeNewTextTermColor;<br />
Text1TemplateColor= syntaxHighlighterConfig.backgroundColor;<br />
Text2TemplateColor= TemplateColor;<br />
}else if ( templTextType=="RefNumber" ){<br />
TypeTemplateColor= syntaxHighlighterConfig.templRefNumberColor;<br />
TemplateColor= syntaxHighlighterConfig.templRefNumberColor;<br />
Text1TemplateColor= syntaxHighlighterConfig.backgroundColor;<br />
Text2TemplateColor= TemplateColor;<br />
}else if ((templTextType=="NonRefTerm") ){<br />
TypeTemplateColor= syntaxHighlighterConfig.templNonRefTermColor;<br />
TemplateColor= syntaxHighlighterConfig.templNonRefTermColor;<br />
Text1TemplateColor= syntaxHighlighterConfig.backgroundColor;<br />
Text2TemplateColor= syntaxHighlighterConfig.backgroundColor;<br />
}<br />
//writeText("{{", TemplateColor || color);<br />
writeText("{{", TemplateColor || color); //NonRefTerm| or TextTerm|<br />
writeText(templTextType, TypeTemplateColor || color); //NonRefTerm| or TextTerm|<br />
i=templTextTermEnd;<br />
if(nbarg>=1){<br />
writeText( "|", TemplateColor || color); //NonRefTerm| or TextTerm|<br />
//writeText(templTextType+"|", syntaxHighlighterConfig.templateColor || color); //NonRefTerm| or TextTerm|<br />
i=templTextTermEnd+1;<br />
//writeText(templTextTerm, syntaxHighlighterConfig.tagColor || color); //struture<br />
writeText(templTextTerm, Text1TemplateColor || color); //struture<br />
i=templTextTermEndClose; //-noarg; démographie historique| or 1|, at the terminaison (| or }.<br />
}<br />
if(nbarg==2){<br />
writeText("|",Text2TemplateColor || color);<br />
i=templTextTermEndClose+1; //-noarg; démographie historique| or 1|, at the terminaison (| or }.<br />
}<br />
//console.log(" i="+ i );<br />
//highlightBlock(syntaxHighlighterConfig.templateColor || color, templateBreakerRegex);<br />
highlightBlock(TemplateColor || color, templateBreakerRegex);<br />
}<br />
}<br />
else //|<br />
{<br />
//table<br />
writeText("{|", syntaxHighlighterConfig.tableColor || color);<br />
highlightBlock(syntaxHighlighterConfig.tableColor || color, tableBreakerRegex);<br />
}<br />
break;<br />
case "<":<br />
if (match[0].charAt(1) == "!")<br />
{<br />
//comment tag<br />
writeText(match[0], syntaxHighlighterConfig.commentColor || color);<br />
break;<br />
}<br />
else<br />
{<br />
//some other kind of tag, search for its end<br />
//the search is made easier because XML attributes may not contain the character ">"<br />
var tagEnd = text.indexOf(">", i) + 1;<br />
if (tagEnd == 0)<br />
{<br />
//not a tag, just a "<" with some text after it<br />
writeText("<", color);<br />
i = i - match[0].length + 1;<br />
break;<br />
}<br />
<br />
if (text.charAt(tagEnd - 2) == "/")<br />
{<br />
//empty tag<br />
writeText(text.substring(i - match[0].length, tagEnd), syntaxHighlighterConfig.tagColor || color);<br />
i = tagEnd;<br />
}<br />
else<br />
{<br />
var tagName = match[0].substring(1);<br />
<br />
if (syntaxHighlighterConfig.sourceTags.indexOf(tagName) != -1)<br />
{<br />
//tag that contains text in a different programming language<br />
var stopAfter = "</" + tagName + ">";<br />
var endIndex = text.indexOf(stopAfter, i);<br />
if (endIndex == -1)<br />
{<br />
endIndex = text.length;<br />
}<br />
else<br />
{<br />
endIndex += stopAfter.length;<br />
}<br />
writeText(text.substring(i - match[0].length, endIndex), syntaxHighlighterConfig.tagColor || color);<br />
i = endIndex;<br />
}<br />
else if (syntaxHighlighterConfig.nowikiTags.indexOf(tagName) != -1)<br />
{<br />
//tag that can contain only HTML entities<br />
writeText(text.substring(i - match[0].length, tagEnd), syntaxHighlighterConfig.tagColor || color);<br />
i = tagEnd;<br />
highlightBlock(syntaxHighlighterConfig.tagColor || color, nowikiTagBreakerRegexCache[tagName]);<br />
}<br />
else<br />
{<br />
//ordinary tag<br />
writeText(text.substring(i - match[0].length, tagEnd), syntaxHighlighterConfig.tagColor || color);<br />
i = tagEnd;<br />
if (!tagBreakerRegexCache[tagName])<br />
{<br />
tagBreakerRegexCache[tagName] = breakerRegexWithPrefix("</" + tagName + ">");<br />
}<br />
highlightBlock(syntaxHighlighterConfig.tagColor || color, tagBreakerRegexCache[tagName]);<br />
}<br />
}<br />
}<br />
break;<br />
case "=":<br />
if (/[^=]=+$/.test(text.substring(i, text.indexOf("\n", i)))) //the line begins and ends with an equals sign and has something else in the middle<br />
{<br />
//heading<br />
writeText("=", syntaxHighlighterConfig.headingColor || color);<br />
highlightBlock(syntaxHighlighterConfig.headingColor || color, headingBreakerRegex);<br />
}<br />
else<br />
{<br />
writeText("=", color); //move on, process this line as regular wikitext<br />
}<br />
break;<br />
case "*":<br />
case "#":<br />
case ":":<br />
//unordered list, ordered list, indent, small heading<br />
//just highlight the marker<br />
writeText(match[0], syntaxHighlighterConfig.listOrIndentColor || color);<br />
break;<br />
case ";":<br />
//small heading<br />
writeText(";", syntaxHighlighterConfig.headingColor || color);<br />
highlightBlock(syntaxHighlighterConfig.headingColor || color, headingBreakerRegex);<br />
break;<br />
case "-":<br />
//horizontal line<br />
writeText(match[0], syntaxHighlighterConfig.hrColor || color);<br />
break;<br />
case "\\":<br />
writeText(match[0], syntaxHighlighterConfig.boldOrItalicColor || color);<br />
if (match[0].length == 6)<br />
{<br />
//bold<br />
if (assumedBold)<br />
{<br />
//end tag<br />
if (assumedItalic)<br />
{<br />
//end of bold part of bold-italic block<br />
//block is now italic-only<br />
assumedBold = false;<br />
}<br />
else<br />
{<br />
//end of bold block<br />
return;<br />
}<br />
}<br />
else<br />
{<br />
//start tag<br />
if (assumedItalic)<br />
{<br />
//start of bold part of previously italic-only block<br />
//block is now bold-italic<br />
assumedBold = true;<br />
}<br />
else<br />
{<br />
//start of bold block<br />
highlightBlock(syntaxHighlighterConfig.boldOrItalicColor || color, defaultBreakerRegex, true, false);<br />
}<br />
}<br />
}<br />
else<br />
{<br />
//italic<br />
if (assumedItalic)<br />
{<br />
//end tag<br />
if (assumedBold)<br />
{<br />
//end of italic part of bold-italic block<br />
//block is now bold-only<br />
assumedItalic = false;<br />
}<br />
else<br />
{<br />
//end of italic block<br />
return;<br />
}<br />
}<br />
else<br />
{<br />
//start tag<br />
if (assumedBold)<br />
{<br />
//start of italic part of previously bold-only block<br />
//block is now bold-italic<br />
assumedItalic = true;<br />
}<br />
else<br />
{<br />
//start of italic block<br />
highlightBlock(syntaxHighlighterConfig.boldOrItalicColor || color, defaultBreakerRegex, false, true);<br />
}<br />
}<br />
}<br />
break;<br />
case "&":<br />
//entity<br />
writeText(match[0], syntaxHighlighterConfig.entityColor || color);<br />
break;<br />
case "~":<br />
//username, signature, timestamp<br />
writeText(match[0], syntaxHighlighterConfig.signatureColor || color);<br />
break;<br />
default:<br />
//bare external link<br />
writeText(match[0], syntaxHighlighterConfig.externalLinkColor || color);<br />
}<br />
}<br />
}<br />
<br />
<br />
//start!<br />
var startTime = Date.now();<br />
highlightBlock("", defaultBreakerRegex);<br />
<br />
//output the leftovers (if any) to make sure whitespace etc. matches<br />
if (i < text.length)<br />
{<br />
writeText(text.substring(i), "");<br />
}<br />
<br />
//if highlighting took too long, disable it.<br />
var endTime = Date.now();<br />
/*if (typeof(bestTime) == "undefined")<br />
{<br />
window.bestTime = endTime - startTime;<br />
document.title = bestTime;<br />
highlightSyntaxIfNeededIntervalID = setInterval(highlightSyntax, 250);<br />
}<br />
else<br />
{<br />
if (endTime - startTime < bestTime)<br />
{<br />
bestTime = endTime - startTime;<br />
document.title = bestTime;<br />
}<br />
}//*/<br />
if (endTime - startTime > syntaxHighlighterConfig.timeout)<br />
{<br />
clearInterval(highlightSyntaxIfNeededIntervalID);<br />
wpTextbox1.removeEventListener("input", highlightSyntax);<br />
wpTextbox1.removeEventListener("scroll", syncScrollX);<br />
wpTextbox1.removeEventListener("scroll", syncScrollY);<br />
attributeObserver.disconnect();<br />
parentObserver.disconnect();<br />
syntaxStyleTextNode.nodeValue = "";<br />
<br />
var errorMessage = {<br />
ca: "S'ha desactivat el remarcar de sintaxi en aquesta pàgina perquè ha trigat massa temps. El temps màxim permès per a remarcar és $1ms, i el vostre ordinador ha trigat $2ms. Proveu tancar algunes pestanyes i programes i fer clic en \"Mostra la previsualització\" o \"Mostra els canvis\". Si no funciona això, proveu un altre navegador web, i si això no funciona, proveu un ordinador més ràpid.",<br />
de: "Die Syntaxhervorhebung wurde auf dieser Seite deaktiviert, da diese zu lange gedauert hat. Die maximal erlaubte Zeit zur Hervorhebung beträgt $1ms und dein Computer benötigte $2ms. Versuche einige Tabs und Programme zu schließen und klicke \"Vorschau zeigen\" oder \"Änderungen zeigen\". Wenn das nicht funktioniert, probiere einen anderen Webbrowser und wenn immer noch nicht, probiere einen schnelleren Computer.",<br />
el: "Η έμφαση σύνταξης έχει απενεργοποιηθεί σε αυτήν τη σελίδα γιατί αργούσε πολύ. Ο μέγιστος επιτρεπτός χρόνος για την έμφαση σύνταξης είναι $1ms και ο υπολογιστής σας έκανε $2ms. Δοκιμάστε να κλείσετε μερικές καρτέλες και προγράμματα και να κάνετε κλικ στην «Εμφάνιση προεπισκόπησης» ή στην «Εμφάνιση αλλαγών». Αν αυτό δεν δουλέψει, δοκιμάστε έναν διαφορετικό περιηγητή και αν ούτε αυτό δουλέψει, δοκιμάστε έναν ταχύτερο υπολογιστή.",<br />
en: "Syntax highlighting on this page was disabled because it took too long. The maximum allowed highlighting time is $1ms, and your computer took $2ms. Try closing some tabs and programs and clicking \"Show preview\" or \"Show changes\". If that doesn't work, try a different web browser, and if that doesn't work, try a faster computer.",<br />
es: "Se desactivó el resaltar de sintaxis en esta página porque tardó demasiado. El tiempo máximo permitido para resaltar es $1ms, y tu ordenador tardó $2ms. Prueba cerrar algunas pestañas y programas y hacer clic en \"Mostrar previsualización\" o \"Mostrar cambios\". Si no funciona esto, prueba otro navegador web, y si eso no funciona, prueba un ordenador más rápido.",<br />
fa: "از آنجایی که زمان زیادی صرف آن میشد، برجستهسازی نحو در این صفحه غیرفعال شده است. بیشینهٔ زمان برجستهسازی برای ابزار $1ms تعریف شده در حالی که رایانهٔ شما $2ms زمان نیاز داشت. میتوانید بستن برخی سربرگها و برنامهها و سپس کلیککردن دکمهٔ «پیشنمایش» یا «نمایش تغییرات» را بیازمایید. اگر جواب نداد مرورگر دیگری را امتحان کنید؛ و اگر باز هم جواب نداد، رایانهٔ سریعتری را بیازمایید.",<br />
fr: "La coloration syntaxique a été désactivée sur cette page en raison d'un temps de chargement trop important ($2ms). Le temps maximum autorisé est $1ms. Vous pouvez essayer de fermer certains onglets et programmes et cliquez sur \"Prévisualisation\" ou \"Voir mes modifications\". Si cela ne fonctionne pas, essayez un autre navigateur web, et si cela ne fonctionne toujours pas, essayez un ordinateur plus rapide.",<br />
hy: "Շարադասության ընդգծումը այս էջում անջատվել է, քանի որ այն չափից շատ է տևել։ Ընդգծման թույլատրելի առավելագույն ժամանակը $1 միլիվայրկյան է, բայց այս էջում տևել է $2 միլիվայրկյան։ Փորձեք անջատել որոշ ներդիրներ կամ ծրագրեր և սեղմել «Նախադիտել» կամ «Կատարված փոփոխությունները»։ Կրկին չաշխատելու դեպքում փորձեք այլ վեբ դիտարկիչ, եթե կրկին չաշխատի, փորձեք ավելի արագ համակարգիչ։",<br />
io: "Sintaxo-hailaitar en ca pagino esis nekapabligata pro ke konsumis tro multa tempo. La maxima permisata hailaitala tempo es $1ms, e tua ordinatro konsumis $2ms. Probez klozar kelka tabi e programi e kliktar \"Previdar\" o \"Montrez chanji\". Se to ne funcionas, probez altra brauzero, e se to ne funcionas, probez plu rapida ordinatro.",<br />
it: "L'evidenziazione delle sintassi su questa pagina è stata disabilitata perché ha richiesto troppo tempo. Il tempo massimo per l'evidenziazione è di $1ms e al tuo computer sono serviti $2ms. Prova a chiudere alcune schede e programmi e ricarica la pagina cliccando su \"Visualizza anteprima\" o \"Mostra modifiche\". Se non funziona ancora, prova con un web browser differente e, in ultima alternativa, prova ad utilizzare un computer più veloce.",<br />
ko: "이 문서에서의 문법 강조가 너무 오래 걸러서 해제되었습니다. 최대로 할당된 강조 시간은 $1ms인데, 당신의 컴퓨터는 $2ms이나 걸렸습니다. 탭과 프로그램을 일부 닫으신 후에 \"미리 보기\"나 \"차이 보기\"를 클릭하시기 바랍니다. 만약 작동하지 않으면 다른 웹 브라우저로 시도해보시고, 그래도 안되면 더 빠른 컴퓨터를 이용하십시오",<br />
pt: "O marcador de sintaxe foi desativado nesta página porque demorou demais. O tempo máximo permitido para marcar é de $1ms, e seu computador demorou $2ms. Tente fechar algumas abas e programas e clique em \"Mostrar previsão\" ou \"Mostrar alterações\". Se isso não funcionar, tente usar um outro navegador web, e se ainda não funcionar, tente em um computador mais rápido.",<br />
ru: "Подсветка синтаксиса на странице была отключена, так как заняла слишком долго. Максимальное допустимое время операции - $1мс, сейчас на вашем компьютере она заняла $2мс. Попробуйте закрыть несколько вкладок и программ, затем нажать «Предварительный просмотр» или «Внесённые изменения». Если это не поможет, попробуйте другой браузер; если и это не поможет, используйте более быстрый компьютер.",<br />
sr: "Истицање синтаксе на овој страници је онемогућено јер се одвија предуго. Максимално дозвољено време истицања је $1ms, а на Вашем рачунару траје $2ms. Покушајте затворити неке картице и програме или кликните на „Прикажи претпреглед” или „Прикажи измене”. Ако то не ради, покушајте са другим веб-прегледачем, а ако и тада не ради, покушајте са бржим рачунаром.",<br />
};<br />
var wgUserLanguage = mw.config.get("wgUserLanguage");<br />
<br />
errorMessage = errorMessage[wgUserLanguage] || errorMessage[wgUserLanguage.substring(0, wgUserLanguage.indexOf("-"))] || errorMessage.en;<br />
<br />
wpTextbox1.style.backgroundColor = "";<br />
wpTextbox1.style.marginTop = wpTextbox0.style.marginTop;<br />
wpTextbox0.removeAttribute("dir");<br />
wpTextbox0.removeAttribute("lang");<br />
wpTextbox0.setAttribute("style", "color:red; font-size:small");<br />
<br />
wpTextbox0.textContent = errorMessage.replace("$1", syntaxHighlighterConfig.timeout).replace("$2", endTime - startTime);<br />
return;<br />
}<br />
<br />
//do we have enough span elements to match the generated CSS?<br />
//this step isn't included in the above benchmark because it takes a highly variable amount of time<br />
if (maxSpanNumber < spanNumber)<br />
{<br />
var fragment = document.createDocumentFragment();<br />
do<br />
{<br />
fragment.appendChild(document.createElement("span")).id = "s" + ++maxSpanNumber;<br />
}<br />
while (maxSpanNumber < spanNumber);<br />
wpTextbox0.appendChild(fragment);<br />
}<br />
<br />
/* finish CSS: move the extra '} from the beginning to the end and CSS-<br />
escape newlines. CSS ignores the space after the hex code of the<br />
escaped character */<br />
syntaxStyleTextNode.nodeValue = css.substring(2).replace(/\n/g, "\\A ") + "'}";<br />
}<br />
<br />
function syncScrollX()<br />
{<br />
//console.log("syncScrollX");<br />
wpTextbox0.scrollLeft = wpTextbox1.scrollLeft;<br />
}<br />
<br />
function syncScrollY()<br />
{<br />
//console.log("syncScrollY");<br />
wpTextbox0.scrollTop = wpTextbox1.scrollTop;<br />
}<br />
<br />
function syncTextDirection()<br />
{<br />
wpTextbox0.dir = wpTextbox1.dir;<br />
}<br />
<br />
function syncParent()<br />
{<br />
if (wpTextbox1.previousSibling != wpTextbox0)<br />
{<br />
wpTextbox1.parentNode.insertBefore(wpTextbox0, wpTextbox1);<br />
parentObserver.disconnect();<br />
parentObserver.observe(wpTextbox1.parentNode, {childList: true});<br />
}<br />
}<br />
<br />
//this function runs once every 500ms to detect changes to wpTextbox1's text that the input event does not catch<br />
//this happens when another script changes the text without knowing that the syntax highlighter needs to be informed<br />
function highlightSyntaxIfNeeded()<br />
{<br />
if (wpTextbox1.value != lastText)<br />
{<br />
highlightSyntax();<br />
}<br />
if (wpTextbox1.scrollLeft != wpTextbox0.scrollLeft)<br />
{<br />
//console.log("Box1syncScrollX");<br />
syncScrollX();<br />
}<br />
if (wpTextbox1.scrollTop != wpTextbox0.scrollTop)<br />
{<br />
//console.log("Box1syncScrollY");<br />
syncScrollY();<br />
}<br />
if (wpTextbox1.offsetHeight != wpTextbox0.offsetHeight)<br />
{<br />
var height = wpTextbox1.offsetHeight + "px";<br />
wpTextbox0.style.height = height;<br />
wpTextbox1.style.marginTop = "-" + height;<br />
}<br />
}<br />
<br />
function setup()<br />
{<br />
function configureColor(parameterName, hardcodedFallback, defaultOk)<br />
{<br />
if (typeof(syntaxHighlighterConfig[parameterName]) == "undefined")<br />
{<br />
syntaxHighlighterConfig[parameterName] = syntaxHighlighterSiteConfig[parameterName];<br />
}<br />
<br />
if (syntaxHighlighterConfig[parameterName] == "normal")<br />
{<br />
syntaxHighlighterConfig[parameterName] = hardcodedFallback;<br />
}<br />
else if (typeof(syntaxHighlighterConfig[parameterName]) != "undefined")<br />
{<br />
return;<br />
}<br />
else if (typeof(syntaxHighlighterConfig.defaultColor) != "undefined" && defaultOk)<br />
{<br />
syntaxHighlighterConfig[parameterName] = syntaxHighlighterConfig.defaultColor;<br />
}<br />
else<br />
{<br />
syntaxHighlighterConfig[parameterName] = hardcodedFallback;<br />
}<br />
}<br />
<br />
window.syntaxHighlighterSiteConfig = window.syntaxHighlighterSiteConfig || {};<br />
window.syntaxHighlighterConfig = window.syntaxHighlighterConfig || {};<br />
<br />
//use 3-digit colors instead of 6-digit colors for performance<br />
// See for example http://maettig.com/?page=PHP/CSS_Color_Converter<br />
configureColor("backgroundColor", "#FFF", false); //white<br />
configureColor("foregroundColor", "#000", false); //black<br />
configureColor("boldOrItalicColor", "#EEE", true); //gray<br />
configureColor("commentColor", "#EFE", true); //green<br />
configureColor("entityColor", "#DFD", true); //green<br />
configureColor("externalLinkColor", "#EFF", true); //cyan<br />
configureColor("headingColor", "#EEE", true); //gray<br />
configureColor("hrColor", "#EEE", true); //gray<br />
configureColor("listOrIndentColor", "#EFE", true); //green<br />
configureColor("parameterColor", "#FC6", true); //orange<br />
configureColor("signatureColor", "#FC6", true); //orange<br />
configureColor("tagColor", "#FEF", true); //pink<br />
configureColor("tableColor", "#FFC", true); //yellow<br />
configureColor("templateColor", "#FFC", true); //gray <br />
configureColor("templTextTermColor", "#888", true); //gray<br />
configureColor("templTypeTextTermColor", "#888", true); //gray<br />
configureColor("templNewTextTermColor", "#BBB", true); //gray light<br />
configureColor("templTypeNewTextTermColor", "#BBB", true); //gray light<br />
configureColor("templNonRefTermColor", "#FEF", true); //pink<br />
configureColor("templRefNumberColor", "#E9E", true); //pink<br />
configureColor("templNoteColor", "#EFE", true); //green<br />
configureColor("templNoteTermColor", "#484", true); //green<br />
configureColor("templTypeNoteColor", "#7C7", true); //green<br />
configureColor("wikilinkColor", "#EEF", true); //blue<br />
<br />
//tag lists are ordered from most common to least common<br />
syntaxHighlighterConfig.nowikiTags = syntaxHighlighterConfig.nowikiTags || syntaxHighlighterSiteConfig.nowikiTags || ["nowiki", "pre"];<br />
syntaxHighlighterConfig.sourceTags = syntaxHighlighterConfig.sourceTags || syntaxHighlighterSiteConfig.sourceTags || ["math", "syntaxhighlight", "source", "timeline", "hiero"];<br />
syntaxHighlighterConfig.timeout = syntaxHighlighterConfig.timeout || syntaxHighlighterSiteConfig.timeout || 50;<br />
<br />
syntaxHighlighterConfig.nowikiTags.forEach(function(tagName) {<br />
nowikiTagBreakerRegexCache[tagName] = nowikiTagBreakerRegex(tagName);<br />
});<br />
<br />
wpTextbox0 = document.createElement("div");<br />
wpTextbox1 = document.getElementById("wpTextbox1");<br />
<br />
var syntaxStyleElement = document.createElement("style");<br />
syntaxStyleTextNode = syntaxStyleElement.appendChild(document.createTextNode(""));<br />
<br />
//the styling of the textbox and the background div must be kept very similar<br />
var wpTextbox1Style = window.getComputedStyle(wpTextbox1);<br />
<br />
//horizontal resize would look horribly choppy, better to make the user resize the browser window instead<br />
var resize = (wpTextbox1Style.resize == "vertical" || wpTextbox1Style.resize == "both" ? "vertical" : "none");<br />
<br />
wpTextbox0.dir = wpTextbox1.dir;<br />
wpTextbox0.id = "wpTextbox0";<br />
wpTextbox0.lang = wpTextbox1.lang; //lang determines which font "monospace" is<br />
wpTextbox0.style.backgroundColor = syntaxHighlighterConfig.backgroundColor;<br />
wpTextbox0.style.border = "1px solid transparent";<br />
wpTextbox0.style.boxSizing = "border-box";<br />
wpTextbox0.style.clear = wpTextbox1Style.clear;<br />
wpTextbox0.style.color = "transparent"; //makes it look just a little bit smoother<br />
wpTextbox0.style.fontFamily = wpTextbox1Style.fontFamily;<br />
wpTextbox0.style.fontSize = wpTextbox1Style.fontSize;<br />
wpTextbox0.style.lineHeight = "normal";<br />
wpTextbox0.style.marginBottom = "0";<br />
wpTextbox0.style.marginLeft = "0";<br />
wpTextbox0.style.marginRight = "0";<br />
wpTextbox0.style.marginTop = wpTextbox1Style.marginTop;<br />
wpTextbox0.style.overflowX = "auto";<br />
wpTextbox0.style.overflowY = "scroll";<br />
wpTextbox0.style.resize = resize;<br />
wpTextbox0.style.tabSize = wpTextbox1Style.tabSize;<br />
wpTextbox0.style.whiteSpace = "pre-wrap";<br />
wpTextbox0.style.width = "100%";<br />
wpTextbox0.style.wordWrap = "normal"; //see below<br />
<br />
wpTextbox1.style.backgroundColor = "transparent";<br />
wpTextbox1.style.border = "1px inset gray";<br />
wpTextbox1.style.boxSizing = "border-box";<br />
wpTextbox1.style.color = syntaxHighlighterConfig.foregroundColor;<br />
wpTextbox1.style.fontSize = wpTextbox1Style.fontSize; //resolves alignment problems on mobile chrome<br />
wpTextbox1.style.lineHeight = "normal";<br />
wpTextbox1.style.marginBottom = wpTextbox1Style.marginBottom; //lock to pixel value because the top margin was also locked to a pixel value when it was moved to wpTextbox0<br />
wpTextbox1.style.marginLeft = "0";<br />
wpTextbox1.style.marginRight = "0";<br />
wpTextbox1.style.overflowX = "auto";<br />
wpTextbox1.style.overflowY = "scroll";<br />
wpTextbox1.style.padding = "0";<br />
wpTextbox1.style.resize = resize;<br />
wpTextbox1.style.width = "100%";<br />
wpTextbox1.style.wordWrap = "normal"; //overall more visually appealing<br />
<br />
// https://bugzilla.mozilla.org/show_bug.cgi?id=1301290<br />
if (layoutEngine == "gecko")<br />
{<br />
wpTextbox0.style.isolation = "isolate";<br />
wpTextbox1.style.isolation = "isolate";<br />
}<br />
<br />
//lock both heights to pixel values so that the browser zoom feature works better<br />
wpTextbox1.style.height = wpTextbox0.style.height = wpTextbox1.offsetHeight + "px";<br />
<br />
//insert wpTextbox0 underneath wpTextbox1<br />
wpTextbox1.style.marginTop = -wpTextbox1.offsetHeight + "px";<br />
wpTextbox1.parentNode.insertBefore(wpTextbox0, wpTextbox1);<br />
<br />
document.head.appendChild(syntaxStyleElement);<br />
<br />
wpTextbox1.addEventListener("input", highlightSyntax);<br />
//console.log("Box1ListenersyncScroll");<br />
wpTextbox1.addEventListener("scroll", syncScrollX);<br />
wpTextbox1.addEventListener("scroll", syncScrollY);<br />
attributeObserver = new MutationObserver(syncTextDirection);<br />
attributeObserver.observe(wpTextbox1, {attributes: true});<br />
parentObserver = new MutationObserver(syncParent);<br />
parentObserver.observe(wpTextbox1.parentNode, {childList: true});<br />
highlightSyntaxIfNeededIntervalID = setInterval(highlightSyntaxIfNeeded, 500);<br />
highlightSyntax();<br />
}<br />
<br />
<br />
//enable the highlighter only when editing wikitext pages<br />
//in the future a separate parser could be added for CSS and JS pages<br />
//blacklist Internet Explorer and Edge, they're just too broken<br />
var wgAction = mw.config.get("wgAction");<br />
var layoutEngine = $.client.profile().layout;<br />
if ((wgAction == "edit" || wgAction == "submit") && mw.config.get("wgPageContentModel") == "wikitext" && layoutEngine != "trident" && layoutEngine != "edge")<br />
{<br />
//give other scripts an opportunity to set syntaxHighlighterConfig<br />
if (document.readyState == "complete")<br />
{<br />
setup();<br />
}<br />
else<br />
{<br />
$(window).load(setup);<br />
}<br />
}<br />
})();</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=MediaWiki:RefToolbarNoDialogsTextTerm.js&diff=12939
MediaWiki:RefToolbarNoDialogsTextTerm.js
2017-06-25T20:18:51Z
<p>Nicolas Brouard: naimportována 1 revize</p>
<hr />
<div>var numforms = 0;<br />
var wikEdAutoUpdateUrl;<br />
function refbuttons() {<br />
if (mw.toolbar && (document.getElementById('toolbar') || document.getElementById('wikiEditor-section-main'))/* && wikEdAutoUpdateUrl == null*/) {<br />
if (document.getElementById('toolbar')) {<br />
button = document.createElement('a');<br />
button.href = "javascript:easyCiteMain()";<br />
button.title = "Insert citation";<br />
buttonimage = document.createElement('img');<br />
buttonimage.src = "//upload.wikimedia.org/wikipedia/commons/0/00/Button_easy_cite_%281%29.png";<br />
buttonimage.alt = "Insert footnote";<br />
button.appendChild(buttonimage);<br />
document.getElementById('toolbar').appendChild(button);<br />
} else {<br />
button = document.createElement('a');<br />
button.href = "#";<br />
button.title = "Insert citation";<br />
button.id = 'reftoolbar-button';<br />
buttonimage = document.createElement('img');<br />
buttonimage.src = "//upload.wikimedia.org/wikipedia/commons/thumb/9/9a/Curly_Brackets.svg/22px-Curly_Brackets.svg.png";<br />
buttonimage.alt = "Insert citation";<br />
button.classname = "tool tool-button";<br />
buttonimage.style.width = "22px";<br />
buttonimage.style.height = "17px";<br />
buttonimage.style.paddingTop = "5px";<br />
buttonimage.style.paddingLeft = "3px";<br />
button.appendChild(buttonimage);<br />
//document.getElementById('wikiEditor-ui-toolbar').childNodes[0].childNodes[1].appendChild(button);<br />
////document.getElementById('reftoolbar-button').onclick = easyCiteMain;<br />
//$j('#reftoolbar-button').live('click', function() { easyCiteMain(); });<br />
$('#wikiEditor-section-main .group-insert').append( button );<br />
$(button).click( function() { easyCiteMain(); });<br />
<br />
}<br />
if (navigator.userAgent.indexOf('MSIE') == -1) {<br />
//alert("NO MSIE");<br />
citemain = document.createElement('div');<br />
citemain.style.display = 'none';<br />
citemain.setAttribute('Id', 'citeselect');<br />
citemain.appendChild( addOption("citeWeb()", "Cite web") );<br />
citemain.appendChild( addOption("citeBook()", "Cite book") );<br />
citemain.appendChild( addOption("citeJournal()", "Cite journal") );<br />
citemain.appendChild( addOption("citeNews()", "Cite news") );<br />
citemain.appendChild( addOption("citeNamedRef()", "Named ref") );<br />
citemain.appendChild( addOption("dispErrors()", "Error check") );<br />
citemain.appendChild( addOption("hideInitial()", "Cancel") );<br />
citemain.appendChild( addOption("textTerm()", "TextTerm") );<br />
document.getElementById('wpTextbox1').parentNode.insertBefore(citemain, document.getElementById('wpTextbox1'));<br />
}<br />
else {<br />
selection = '<div id="citeselect" style="display:none"><input type="button" value="Cite web" onclick="citeWeb()" />'+<br />
'<input type="button" value="Cite book" onclick="citeBook()" />'+<br />
'<input type="button" value="Cite journal" onclick="citeJournal()" />'+<br />
'<input type="button" value="Cite news" onclick="citeNews()" />'+<br />
'<input type="button" value="Named ref" onclick="citeNamedRef()" />'+<br />
'<input type="button" value="Error check" onclick="dispErrors()" />'+<br />
'<input type="button" value="Cancel" onclick="hideInitial()" />'+<br />
'<input type="button" value="TextTerm" onclick="textTerm()" /></div>';<br />
document.getElementById('editform').innerHTML = selection + document.getElementById('editform').innerHTML;<br />
}<br />
}<br />
}<br />
<br />
function addOption(script, text) {<br />
option = document.createElement('input');<br />
option.setAttribute('type', 'button');<br />
option.setAttribute('onclick', script);<br />
option.setAttribute("value", text);<br />
return option;<br />
}<br />
<br />
function hideInitial() {<br />
document.getElementById('citeselect').style.display = 'none';<br />
oldFormHide();<br />
}<br />
<br />
function oldFormHide() {<br />
if (numforms != 0) {<br />
document.getElementById('citediv'+numforms).style.display = 'none';<br />
}<br />
if (document.getElementById('errorform') != null) {<br />
document.getElementById('citeselect').removeChild(document.getElementById('errorform'));<br />
}<br />
} <br />
<br />
function easyCiteMain() {<br />
document.getElementById('citeselect').style.display = '';<br />
}<br />
<br />
var months = ['January', 'February', 'March', 'April', 'May', 'June',<br />
'July', 'August', 'September', 'October', 'November', 'December'];<br />
var citeGlobalDateFormat = "<date> <monthname> <year>";<br />
function getTime() {<br />
var datestr = '';<br />
if (typeof citeUserDateFormat != 'undefined') {<br />
datestr = citeUserDateFormat;<br />
} else {<br />
datestr = citeGlobalDateFormat;<br />
}<br />
var DT = new Date();<br />
var zmonth = '';<br />
var month = DT.getUTCMonth()+1;<br />
if (month < 10) {<br />
zmonth = "0"+month.toString();<br />
} else {<br />
zmonth = month.toString();<br />
}<br />
month = month.toString();<br />
var zdate = '';<br />
var date = DT.getUTCDate()<br />
if (date < 10) {<br />
zdate = "0"+date.toString();<br />
} else {<br />
zdate = date.toString();<br />
}<br />
date = date.toString()<br />
datestr = datestr.replace('<date>', date);<br />
datestr = datestr.replace('<month>', month);<br />
datestr = datestr.replace('<zdate>', zdate);<br />
datestr = datestr.replace('<zmonth>', zmonth);<br />
datestr = datestr.replace('<monthname>', months[DT.getUTCMonth()]);<br />
datestr = datestr.replace('<year>', DT.getUTCFullYear().toString());<br />
return (datestr);<br />
}<br />
<br />
function citeWeb() {<br />
citeNewsWeb("cite web");<br />
}<br />
function citeNews() {<br />
citeNewsWeb("cite news");<br />
}<br />
<br />
function textTerm() {<br />
textTermf();<br />
} <br />
<br />
var texttermall = new Array();<br />
var texttermcur = new Array();<br />
var textterminput = new Array();<br />
var poffset=null, prange=null, noffset=null, nrange=null;<br />
var section = '';<br />
var subnote = '';<br />
<br />
function textTermf() {<br />
textTermform(null,null);<br />
}<br />
<br />
function nexttextterm() {<br />
//console.log("nexttexterm before noffset :" + noffset + " nrange=" + nrange);<br />
savetextterms(); // Save if changed<br />
if(noffset){ // If there is a next<br />
textTermform(noffset, nrange); // Call with offset !{{TextTerm }}<br />
}<br />
}<br />
function previoustextterm() {<br />
//console.log("previoustexterm before poffset :" + poffset + " prange=" + prange);<br />
savetextterms();<br />
if(poffset){ // If there is a next<br />
textTermform(poffset, prange); // Call with offset !{{TextTerm }}<br />
}<br />
}<br />
<br />
<br />
<br />
function texttermfill(subtext) {<br />
var ref = new Array();<br />
this.term = '';<br />
this.note= '';<br />
this.section= '';<br />
if(section != '')<br />
this.section = section;<br />
this.subnote = '';<br />
if(subnote != '')<br />
this.subnote = subnote;<br />
this.englishentry= '';<br />
this.indexentry= '';<br />
this.otherindexentry = '';<br />
this.otherindexentrytwo = '';<br />
this.otherindexentrythree = '';<br />
this.otherindexentryfour = '';<br />
this.otherindexentryfive = '';<br />
<br />
var j=0;<br />
var nr=true;<br />
regexbar= /\|([^|]*)/gm <br />
//regexbar =/\|((.)*?)(?=[\||\n])/gm //"|programmes de population|1|933|IndexEntry=programme de population|OtherIndexEntry=population, programme de"<br />
do {<br />
ref = regexbar.exec(subtext);<br />
//console.log(" subtext=" + subtext);<br />
//console.log(" ref=" + ref);<br />
if(ref != null){<br />
switch (j)<br />
{<br />
case 0 : this.term = ref[1]; break;<br />
case 1 : this.note = ref[1]; break;<br />
case 2 : this.section = ref[1]; break;<br />
default :<br />
if(ref[1].match(/^ *?EnglishEntry *?= *?(.*) *?$/))<br />
this.englishentry = ref[1].replace(/^ *?EnglishEntry *?= *?(.*) *?$/,"$1");<br />
else if(ref[1].match(/^ *?IndexEntry *?= *?(.*) *?$/))<br />
this.indexentry = ref[1].replace(/^ *?IndexEntry *?= *?(.*) *?$/,"$1");<br />
else if(ref[1].match(/^ *?OtherIndexEntry *?= *?(.*) *?$/))<br />
this.otherindexentry = ref[1].replace(/^ *?OtherIndexEntry *?= *?(.*) *?$/,"$1");<br />
else if(ref[1].match(/^ *?OtherIndexEntryTwo *?= *?(.*) *?$/))<br />
this.otherindexentrytwo = ref[1].replace(/^ *?OtherIndexEntryTwo *?= *?(.*) *?$/,"$1");<br />
else if(ref[1].match(/^ *?OtherIndexEntryThree *?= *?(.*) *?$/))<br />
this.otherindexentrythree = ref[1].replace(/^ *?OtherIndexEntryThree *?= *?(.*) *?$/,"$1");<br />
else if(ref[1].match(/^ *?OtherIndexEntryFour *?= *?(.*) *?$/))<br />
this.otherindexentryfour = ref[1].replace(/^ *?OtherIndexEntryFour *?= *?(.*) *?$/,"$1");<br />
else if(ref[1].match(/^ *?OtherIndexEntryFive *?= *?(.*) *?$/))<br />
this.otherindexentryfive = ref[1].replace(/^ *?OtherIndexEntryFive *?= *?(.*) *?$/,"$1");<br />
else if(ref[1].match(/^ *?EnglishEntry *?= *?(.*) *?$/))<br />
this.englishentry = ref[1].replace(/^ *?EnglishEntry *?= *?(.*) *?$/,"$1");<br />
else if(j==3){<br />
this.subnote = ref[1];<br />
}else{<br />
alert("texttermfill error j=" + j + " ref1= " +ref[1]);<br />
//console.log("texttermfill error j=" + j + " ref1= " +ref[1]);<br />
}<br />
}<br />
j++;<br />
} else {<br />
nr=false;<br />
}<br />
} while (nr==true);<br />
//console.log("j=" + j + " term=" + this.term + " note=" + this.note + " section=" + this.section +" subnote=" + this.subnote +" indexentry=" + this.indexentry + " otherindexentry=" + this.otherindexentry);<br />
}<br />
<br />
<br />
function textTermform(offset,range){<br />
<br />
// We search for TextTerm in wptexbox1 from cursor position (offset) and if selected (range)<br />
// If called by a previous or next, they are not null {{TextTerm<-......>}}<br />
// if outside of a TextTerm template, we will fill with the term with the selection<br />
// in any case we compute the previous nextstart and previus end and next offset not real.<br />
// if inside a TextTerm we fill the form<br />
// if saveterm is necessary, we save and exit.<br />
// if previous or next, we save if necessary and we call textTermform with a new offset >0 (next) or <0 (previous) and range<br />
// <br />
var textarea= document.getElementById('wpTextbox1');<br />
if ('selectionStart' in textarea) {<br />
if (offset == null){ // range should be null too<br />
offset = textarea.selectionStart;<br />
range = textarea.selectionEnd - textarea.selectionStart;<br />
<br />
var lstxtterm = textarea.value.substring(0,textarea.selectionEnd). lastIndexOf("{{TextTerm") ; // Just before the string. No regex<br />
var lstcltxtterm = textarea.value.substring(0,textarea.selectionStart). lastIndexOf("}}") ; //might be for another purpose than TextTerm<br />
// Looking for the section<br />
section = '';<br />
var psectione = textarea.value.substring(0,textarea.selectionEnd). lastIndexOf("===") ; // Just before the string. No regex<br />
if(psectione != -1){<br />
var psections = textarea.value.substring(0,psectione). lastIndexOf("===") ; // Just before the string. No regex<br />
if(psections != -1){<br />
section = textarea.value.substring(psections,psectione+3).match(/^=== *?(\d{3}) *?===$/)[1];<br />
}<br />
}<br />
//console.log(" section |" + section);<br />
//textarea.value.substring(0,textarea.selectionStart). search(new RegExp("((({{TextTerm[^}]+)[^{]+)+)");<br />
<br />
if ( (-1 == lstxtterm) || ((-1 < lstxtterm) && (lstxtterm < lstcltxtterm)) ) { // @{{TextTerm ...@}}...(...).. <br />
// {{Refnumber }} ....! <br />
// alert("We are after outside a previous TextTerm or no TextTerm before:" + textarea.value.substring(0,textarea.selectionStart ));<br />
texttermcur = new texttermfill("|" + textarea.value.substring(textarea.selectionStart,textarea.selectionEnd));<br />
//console.log(" We want to fill with the selection=" + textarea.value.substring(textarea.selectionStart,textarea.selectionEnd));<br />
// On se retrouve avec du texte à ajouter et le curseur inchangé à textarea.selectionStart <br />
} else if ( (lstxtterm > lstcltxtterm) && (lstcltxtterm > -1) ) { // @}}... @{{TextTerm ... (...).. <br />
//alert("We are within a TextTerm or no closing }}:" + textarea.value.substring(lstcltxtterm, lstxtterm));<br />
<br />
// ( textarea.value.substring(lstxtterm, textarea.selectionStart). search(new RegExp("}}")) == -1) {<br />
var endtxterm= textarea.value.substring(textarea.selectionStart, textarea.length). search("}}");<br />
if( endtxterm == -1)<br />
error(" Error no closing TextTerm; should be fixed:" + textarea.value.substring(textarea.selectionStart, textarea.length));<br />
else{<br />
endtxterm = endtxterm + textarea.selectionStart +2 ; // }} included<br />
// Looking for @{{TextTerm....}}@<br />
// alert("We are within textterm " + lstxtterm + " to " + endtxterm + " soit:" + textarea.value.substring(lstxtterm,endtxterm) );<br />
//console.log(" Replacing with form result:" + textarea.value.substring(lstxtterm+"{{TextTerm".length,endtxterm-"}}".length));<br />
texttermcur = new texttermfill(textarea.value.substring(lstxtterm+"{{TextTerm".length,endtxterm-"}}".length) );<br />
// On devrait remplacer {{TextTerm ...}} par la forme, soit de lstxtterm endtxtterm<br />
// On se fout de la sélection originale et la repositionne sur toute l'étendue du textterm.<br />
// alert("After null before textarea.selectionStart is" + textarea.selectionStart + " end=" + textarea.selectionEnd);<br />
// alert(" selection is:" + textarea.value.substring(textarea.selectionStart,textarea.selectionEnd));<br />
textarea.selectionStart = lstxtterm;<br />
textarea.selectionEnd = endtxterm;<br />
// alert("After null textarea.selectionStart is" + textarea.selectionStart + " end=" + textarea.selectionEnd);<br />
// alert(" selection is now:" + textarea.value.substring(textarea.selectionStart,textarea.selectionEnd));<br />
} //en endtxtterm<br />
} // end @}}... @{{TextTerm ... (...).. <br />
}else{ // coming from a previous or next<br />
// alert("After Next textarea.selectionStart is" + textarea.selectionStart + " end=" + textarea.selectionEnd);<br />
// alert(" After next selection is:" + textarea.value.substring(textarea.selectionStart,textarea.selectionEnd));<br />
// alert("Coming from a previous or next modifing selectionStart start is an offsetstart =" + offset + " and range=" + range)<br />
// Previous<br />
// selectionStart selectionEnd<br />
// > <<br />
// ^....@{{TextTerm....#}}.................@{{TextTerm ...}}!<br />
// !<-range-------->! <br />
// #<-offset--------->! <br />
// Next<br />
// selectionStart selectionEnd<br />
// > <<br />
// ^....@{{TextTerm....#}}.................@{{TextTerm ...}}!<br />
// !<--range------->! <br />
// #<-offset--------->! <br />
// alert(" Before textarea.selectionStart=" + textarea.selectionStart + " textarea.selectionEnd=" + textarea.selectionEnd);<br />
//alert(" Before is:" + textarea.value.substring(textarea.selectionStart,textarea.selectionEnd));<br />
textarea.selectionStart = (offset > 0 ? textarea.selectionEnd + offset : textarea.selectionStart + offset -range);<br />
textarea.selectionEnd = textarea.selectionStart + range;<br />
// Looking for the section<br />
section = '';<br />
var psectione = textarea.value.substring(0,textarea.selectionEnd). lastIndexOf("===") ; // Just before the string. No regex<br />
if(psectione != -1){<br />
var psections = textarea.value.substring(0,psectione). lastIndexOf("===") ; // Just before the string. No regex<br />
if(psections != -1){<br />
section = textarea.value.substring(psections,psectione+3).match(/^=== *?(\d{3}) *?===$/)[1];<br />
}<br />
}<br />
//console.log(" section Other |" + section);<br />
<br />
// alert(" After is:" + textarea.value.substring(textarea.selectionStart,textarea.selectionEnd));<br />
// alert(" After textarea.selectionStart=" + textarea.selectionStart + " textarea.selectionEnd=" + textarea.selectionEnd);<br />
//console.log("textterm cur is:" + textarea.value.substring(textarea.selectionStart+"{{TextTerm".length,textarea.selectionEnd-"}}".length));<br />
texttermcur = new texttermfill(textarea.value.substring(textarea.selectionStart+"{{TextTerm".length,textarea.selectionEnd-"}}".length) );<br />
}<br />
}else{<br />
alert("No selectionStart Internet Explorer < 9?");<br />
} <br />
// Looking for previous and next<br />
// Previous<br />
// ^....@{{TextTerm....#}}.................@{{TextTerm ...}}!<br />
// poffset<br />
// < prange ><<br />
// >< ><<br />
// pstart pend<br />
// !<--------offsetpstart------------>! <br />
// #<-offsetpsend---->! <br />
<br />
var pstart = textarea.value.substring(0,textarea.selectionStart). lastIndexOf("{{TextTerm"); <br />
if ( pstart == -1) { // No previous<br />
// alert( "NO previous : " + textarea.value.substring(0,textarea.selectionStart));<br />
poffset = null;<br />
prange = null;<br />
}else{<br />
// alert( "Previous pstart=" + pstart + " selectionStart=" + textarea.selectionStart + " pstart:selectionStart=" + textarea.value.substring(pstart,textarea.selectionStart));<br />
var pend = textarea.value.substring(pstart,textarea.selectionStart). search("}}") ; // Regex ?<br />
// alert( "Previous pstart=" + pstart + " pend= " + pend + " selectionStart=" + textarea.selectionStart + " pstart:selectionStart=" + textarea.value.substring(pstart,textarea.selectionStart));<br />
if ( pend == -1) { // Strange no ending<br />
stop( "NO ending }} in previous : " + textarea.value.substring(0,textarea.selectionStart));<br />
}else{<br />
prange = pend + 2; // }} included<br />
poffset = pstart + prange - textarea.selectionStart; // should be negative<br />
// alert( " prange =" + prange + " poffset=" + poffset);<br />
}<br />
}<br />
// Next<br />
// ^....@{{TextTerm....#}}.................@{{TextTerm ...}}!<br />
// !<--------offsetnend-------------->! <br />
// #<-offsetnstart--->! <br />
// noffset<br />
// >< nrange ><br />
// #<-offsetnstart--->! <br />
var nstart = textarea.value.substring(textarea.selectionEnd,textarea.length). search("{{TextTerm") <br />
if ( nstart == -1) { // No next<br />
// alert( "NO next TextTerm : " + textarea.value.substring(textarea.selectionEnd,textarea.length));<br />
noffset = null;<br />
nrange = null;<br />
}else{<br />
var nend = textarea.value.substring(textarea.selectionEnd + nstart,textarea.length). search("}}") ;<br />
if ( nend == -1) { // Strange no ending<br />
stop( "NO ending }} in previous : " + textarea.value.substring(textarea.selectionEnd,textarea.length)) ;<br />
}else{<br />
noffset = nstart ;<br />
nrange = nend +2 ;// }}<br />
}<br />
}<br />
<br />
<br />
// We do have offset or null, as well formfilled with a selection.<br />
<br />
oldFormHide();<br />
template = "TextTerm";<br />
var legend;<br />
if (template == "TextTerm") {<br />
legend = "TextTerm source";<br />
} else {<br />
legend = "Cite news source";<br />
}<br />
newtime = getTime();<br />
<br />
numforms++;<br />
form = '<div id="citediv'+numforms+'">'+<br />
'<fieldset><legend>'+legend+'</legend>'+<br />
'<table cellspacing="5">'+<br />
'<input type="hidden" value="'+template+'" id="template">'+<br />
'<tr><td><label for="term">&nbsp;*Term or expression: </label></td>'+<br />
'<td colspan="3"><input type="text" tabindex=1 style="width:100%" id="term" value= "' +<br />
texttermcur.term + '"></tr>'+<br />
'<tr><td width="100"><label for="note">&nbsp;*Note number (1, 2 etc .): </label></td>'+<br />
'<td width="40"><input type="text" tabindex=1 style="width:10%" id="note" value= "' +<br />
texttermcur.note + '"></td>'+<br />
'<td width="100"><label for="subnote">&nbsp;Subnote (2): </label></td>'+<br />
'<td width="40"><input type="text" tabindex=1 style="width:10%" id="subnote" value= "' +<br />
texttermcur.subnote + '"></td></tr>'+<br />
'<tr><td width="300"><label for="section">&nbsp;Section (102, 933 etc.): </label></td>'+<br />
'<td width="40"><input type="text" tabindex=1 style="width:10%" id="section" value= "' +<br />
texttermcur.section + '"></td>'+<br />
'<td width="120"><label for="indexentry">&nbsp;IndexEntry: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="indexentry" value= "' +<br />
texttermcur.indexentry + '"></td></tr>'+<br />
'<tr><td width="120"><label for="otherindexentry">&nbsp;OtherIndexEntry: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="otherindexentry" value= "' +<br />
texttermcur.otherindexentry + '"></td>'+<br />
'<td width="120"><label for="otherindexentrytwo">&nbsp;OtherIndexEntryTwo: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="otherindexentrytwo" value= "' +<br />
texttermcur.otherindexentrytwo + '"></td></tr>'+<br />
'<tr><td width="120"><label for="otherindexentrythree">&nbsp;OtherIndexEntryThree: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="otherindexentrythree" value= "' +<br />
texttermcur.otherindexentrythree + '"></td>'+<br />
'<td width="120"><label for="otherindexentryfour">&nbsp;OtherIndexEntryFour: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="otherindexentryfour" value= "' +<br />
texttermcur.otherindexentryfour + '"></td></tr>'+<br />
'<tr><td width="120"><label for="otherindexentryfive">&nbsp;OtherIndexEntryFive: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="otherindexentryfive" value= "' +<br />
texttermcur.otherindexentryfive + '"></td>'+<br />
'<td width="120"><label for="englishentry">&nbsp;EnglishEntry (for Chinese and Japanese): </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="englishentry" value= "' +<br />
texttermcur.englishentry + '"></td></tr>'+<br />
'</table>'+<br />
'<input type="button" id="previous" value="(save &) previous TextTerm" onClick="previoustextterm()">'+<br />
'<input type="button" value="(save &) exit" onClick="savetextterms()">'+<br />
'<input type="button" id="next" value="(save &) next TextTerm" onClick="nexttextterm()">'+<br />
'</fieldset></div>';<br />
document.getElementById('citeselect').innerHTML += form;<br />
}<br />
<br />
<br />
function citeNewsWeb(templatename) {<br />
oldFormHide();<br />
template = templatename;<br />
var legend;<br />
if (template == "cite web") {<br />
legend = "Cite web source";<br />
} else {<br />
legend = "Cite news source";<br />
}<br />
newtime = getTime();<br />
numforms++;<br />
form = '<div id="citediv'+numforms+'">'+<br />
'<fieldset><legend>'+legend+'</legend>'+<br />
'<table cellspacing="5">'+<br />
'<input type="hidden" value="'+template+'" id="template">'+<br />
'<tr><td width="120"><label for="url">&nbsp;URL: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="url"></td>'+<br />
'<td width="120"><label for="title">&nbsp;Title: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="title"></td></tr>'+<br />
'<tr><td width="120"><label for="last">&nbsp;Last name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="last"></td>'+<br />
'<td width="120"><label for="first">&nbsp;First name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="first"></td></tr>'+<br />
'<tr><td width="120"><label for="coauthors">&nbsp;Coauthors: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="coauthors"></td>'+<br />
'<td width="120"><label for="date">&nbsp;Publication date: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="date"></td></tr>'+<br />
'<tr><td width="120"><label for="work">&nbsp;Work: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="work"></td>'+<br />
'<td width="120"><label for="publisher">&nbsp;Publisher: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="publisher"></td></tr>'+<br />
'<tr><td width="120"><label for="pages">&nbsp;Pages: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="pages"></td>'+<br />
'<td width="120"><label for="language">&nbsp;Language: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="language"></td></tr>'+<br />
'<tr><td width="120"><label for="accessdate">&nbsp;Access date: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="accessdate" value="'+ newtime +'"></td>'+<br />
'<td width="120"><label for="location">&nbsp;Location: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="location"></td></tr>'+<br />
'<tr><td width="120"><label for="refname">&nbsp;Reference name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="refname"></td></tr>'+<br />
'</table>'+<br />
'<input type="button" value="Add citation" onClick="addcites()">'+<br />
'</fieldset></div>';<br />
document.getElementById('citeselect').innerHTML += form;<br />
}<br />
<br />
function citeBook() {<br />
oldFormHide();<br />
template = "cite book";<br />
numforms++;<br />
form = '<div id="citediv'+numforms+'">'+<br />
'<fieldset><legend>Cite book source</legend>'+<br />
'<table cellspacing="5">'+<br />
'<input type="hidden" value="'+template+'" id="template">'+<br />
'<tr><td width="120"><label for="last">&nbsp;Last name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="last"></td>'+<br />
'<td width="120"><label for="first">&nbsp;First name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="first"></td></tr>'+<br />
'<tr><td width="120"><label for="coauthors">&nbsp;Coauthors: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="coauthors"></td>'+<br />
'<td width="120"><label for="others">&nbsp;Others: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="others"></td></tr>'+<br />
'<tr><td width="120"><label for="title">&nbsp;Title: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="title"></td>'+<br />
'<td width="120"><label for="editor">&nbsp;Editor: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="editor"></td></tr>'+<br />
'<tr><td width="120"><label for="publisher">&nbsp;Publisher: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="publisher"></td>'+<br />
'<td width="120"><label for="location">&nbsp;Location: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="location"></td></tr>'+<br />
'<tr><td width="120"><label for="date">&nbsp;Publication date: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="date"></td>'+<br />
'<td width="120"><label for="edition">&nbsp;Edition: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="edition"></td></tr>'+<br />
'<tr><td width="120"><label for="series">&nbsp;Series: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="series"></td>'+<br />
'<td width="120"><label for="volume">&nbsp;Volume: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="volume"></td></tr>'+<br />
'<tr><td width="120"><label for="pages">&nbsp;Pages: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="pages"></td>'+<br />
'<td width="120"><label for="chapter">&nbsp;Chapter: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="chapter"></td></tr>'+<br />
'<tr><td width="120"><label for="isbn">&nbsp;ISBN: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="isbn"></td>'+<br />
'<td width="120"><label for="oclc">&nbsp;OCLC: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="oclc"></td></tr>'+<br />
'<tr><td width="120"><label for="url">&nbsp;URL: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="url"></td>'+<br />
'<td width="120"><label for="accessdate">&nbsp;Access date: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="accessdate"></td></tr>'+<br />
'<tr><td width="120"><label for="language">&nbsp;Language: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="language"></td>'+<br />
'<td width="120"><label for="refname">&nbsp;Reference name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="refname"></td></tr>'+<br />
'</table>'+<br />
'<input type="button" value="Add citation" onClick="addcites()">'+<br />
'</fieldset></div>';<br />
document.getElementById('citeselect').innerHTML += form;<br />
}<br />
<br />
function citeJournal() {<br />
oldFormHide();<br />
template = "cite journal";<br />
numforms++;<br />
form = '<div id="citediv'+numforms+'">'+<br />
'<fieldset><legend>Cite journal source</legend>'+<br />
'<table cellspacing="5">'+<br />
'<input type="hidden" value="'+template+'" id="template">'+<br />
'<tr><td width="120"><label for="last">&nbsp;Last name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="last"></td>'+<br />
'<td width="120"><label for="first">&nbsp;First name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="first"></td></tr>'+<br />
'<tr><td width="120"><label for="coauthors">&nbsp;Coauthors: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="coauthors"></td>'+<br />
'<td width="120"><label for="date">&nbsp;Publication date: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="date"></td></tr>'+<br />
'<tr><td width="120"><label for="title">&nbsp;Title: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="title"></td>'+<br />
'<td width="120"><label for="journal">&nbsp;Journal: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="journal"></td></tr>'+<br />
'<tr><td width="120"><label for="publisher">&nbsp;Publisher: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="publisher"></td>'+<br />
'<td width="120"><label for="location">&nbsp;Location: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="location"></td></tr>'+<br />
'<tr><td width="120"><label for="volume">&nbsp;Volume: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="volume"></td>'+<br />
'<td width="120"><label for="issue">&nbsp;Issue: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="issue"></td></tr>'+<br />
'<tr><td width="120"><label for="pages">&nbsp;Pages: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="pages"></td>'+<br />
'<td width="120"><label for="issn">&nbsp;ISSN: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="issn"></td></tr>'+<br />
'<tr><td width="120"><label for="oclc">&nbsp;OCLC: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="oclc"></td>'+<br />
'<td width="120"><label for="language">&nbsp;Language: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="language"></td></tr>'+<br />
'<tr><td width="120"><label for="url">&nbsp;URL: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="url"></td>'+<br />
'<td width="120"><label for="accessdate">&nbsp;Access date: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="accessdate"></td></tr>'+<br />
'<tr><td width="120"><label for="refname">&nbsp;Reference name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="refname"></td></tr>'+<br />
'</table>'+<br />
'<input type="button" value="Add citation" onClick="addcites()">'+<br />
'</fieldset></div>';<br />
document.getElementById('citeselect').innerHTML += form;<br />
}<br />
<br />
function saveinput(terminput) {<br />
// terminput = document.getElementById('citediv'+numforms).getElementsByTagName('input');<br />
this.term = '';<br />
this.note= '';<br />
this.section = '';<br />
this.indexentry= '';<br />
this.otherindexentry = '';<br />
this.otherindexentrytwo = '';<br />
this.otherindexentrythree = '';<br />
this.otherindexentryfour = '';<br />
this.otherindexentryfive = '';<br />
this.englishentry = '';<br />
<br />
for (var i=0; i<terminput.length-1; i++) {<br />
if (terminput[i].id == "template" ){<br />
;<br />
}else if (terminput[i].id == "term" ){<br />
this.term = terminput[i].value;<br />
}else if(terminput[i].id == "note"){<br />
this.note = terminput[i].value;<br />
}else if(terminput[i].id == "section"){<br />
this.section = terminput[i].value;<br />
}else if(terminput[i].id == "subnote"){<br />
this.subnote = terminput[i].value;<br />
}else if(terminput[i].id == "indexentry"){<br />
this.indexentry = terminput[i].value;<br />
}else if(terminput[i].id == "otherindexentry"){<br />
this.otherindexentry = terminput[i].value;<br />
}else if(terminput[i].id == "otherindexentrytwo"){<br />
this.otherindexentrytwo = terminput[i].value;<br />
}else if(terminput[i].id == "otherindexentrythree"){<br />
this.otherindexentrythree = terminput[i].value;<br />
}else if(terminput[i].id == "otherindexentryfour"){<br />
this.otherindexentryfour = terminput[i].value;<br />
}else if(terminput[i].id == "otherindexentryfive"){<br />
this.otherindexentryfive = terminput[i].value;<br />
}else if(terminput[i].id == "englishentry"){<br />
this.englishentry = terminput[i].value;<br />
}else{<br />
;;//alert(" SaveInput terminput[i].id = " + terminput[i].id + " terminput[i].value =" + terminput[i].value);<br />
}<br />
<br />
}<br />
}<br />
<br />
function savetextterms(template) {<br />
var txtterminput = document.getElementById('citediv'+numforms).getElementsByTagName('input');<br />
textterminput = new saveinput(txtterminput);<br />
//alert("texttermcur=" + texttermcur);<br />
//alert("textterminput=" + textterminput);<br />
// Testing<br />
var different = false;<br />
if((textterminput.term != texttermcur.term) || (textterminput.note != texttermcur.note) ||<br />
(textterminput.section != texttermcur.section) ||<br />
(textterminput.subnote != texttermcur.subnote) ||<br />
(textterminput.indexentry != texttermcur.indexentry) ||<br />
(textterminput.otherindexentry != texttermcur.otherindexentry) || <br />
(textterminput.otherindexentrytwo != texttermcur.otherindexentrytwo) ||<br />
(textterminput.otherindexentrythree != texttermcur.otherindexentrythree) ||<br />
(textterminput.otherindexentryfour != texttermcur.otherindexentryfour) ||<br />
(textterminput.otherindexentryfive != texttermcur.otherindexentryfive) ||<br />
(textterminput.englishentry != texttermcur.englishentry) )<br />
different = true;<br />
<br />
if (different){<br />
// alert(" They are different, have to save" );<br />
var texttermchain="{{TextTerm";<br />
texttermchain += '|' + (textterminput.term ? textterminput.term : '');<br />
texttermchain += '|' + (textterminput.note ? textterminput.note : '');<br />
texttermchain += (textterminput.section ? '|' + textterminput.section : '');<br />
texttermchain += (textterminput.subnote ? '|' + textterminput.subnote : '');<br />
texttermchain += (textterminput.indexentry ? '|IndexEntry='+ textterminput.indexentry : '');<br />
texttermchain += (textterminput.otherindexentry ? '|OtherIndexEntry='+ textterminput.otherindexentry : '');<br />
texttermchain += (textterminput.otherindexentrytwo ? '|OtherIndexEntryTwo='+ textterminput.otherindexentrytwo : '');<br />
texttermchain += (textterminput.otherindexentrythree ? '|OtherIndexEntryThree='+ textterminput.otherindexentrythree : '');<br />
texttermchain += (textterminput.otherindexentryfour ? '|OtherIndexEntryFour='+ textterminput.otherindexentryfour : '');<br />
texttermchain += (textterminput.otherindexentryfive ? '|OtherIndexEntryFive='+ textterminput.otherindexentryfive : '');<br />
texttermchain += (textterminput.englishentry ? '|EnglishEntry='+ textterminput.englishentry : '');<br />
texttermchain += "}}";<br />
<br />
var textarea= document.getElementById('wpTextbox1');<br />
var savepos= textarea.selectionStart;<br />
if ('selectionStart' in textarea) {<br />
textarea.value=textarea.value.substring(0,textarea.selectionStart) + texttermchain + textarea.value.substring(textarea.selectionEnd, textarea.length); <br />
//insertTags(texttermchain, '', '');<br />
textarea.selectionStart = savepos;<br />
textarea.selectionEnd = savepos + texttermchain.length;<br />
}<br />
else{<br />
alert("No selectionStart firefox");<br />
}<br />
}<br />
else{<br />
;//alert(" They are similar, don't save" );<br />
}<br />
document.getElementById('citediv'+numforms).style.display = 'none';<br />
<br />
}<br />
<br />
function addcites(template) {<br />
cites = document.getElementById('citediv'+numforms).getElementsByTagName('input');<br />
var citebegin = '<ref';<br />
var citename = '';<br />
var citeinner = '';<br />
for (var i=0; i<cites.length-1; i++) {<br />
if (cites[i].value != '' && cites[i].id != "refname" && cites[i].id != "template") {<br />
citeinner += "|" + cites[i].id + "=" + cites[i].value;<br />
}<br />
else if (cites[i].value != '' && cites[i].id == "refname" && cites[i].id != "template") {<br />
citebegin += ' name="' + cites[i].value + '"';<br />
}<br />
else if (cites[i].value != '' && cites[i].id != "refname" && cites[i].id == "template") {<br />
citename = '>{{' + cites[i].value;<br />
}<br />
}<br />
cite = citebegin + citename + citeinner + "}}</ref>";<br />
$("#wpTextbox1").focus();<br />
insertTags(cite, '', '');<br />
document.getElementById('citediv'+numforms).style.display = 'none';<br />
}<br />
<br />
function getNamedRefs(calls) {<br />
if (typeof(wikEdUseWikEd) != 'undefined') {<br />
if (wikEdUseWikEd == true) {<br />
WikEdUpdateTextarea();<br />
}<br />
}<br />
text = document.getElementById('wpTextbox1').value;<br />
var regex;<br />
if (calls) {<br />
regex = /< *?ref +?name *?= *?(('([^']*?)')|("([^"]*?)")|([^'"\s]*?[^\/]\b)) *?\/ *?>/gi //'<br />
} else {<br />
regex = /< *?ref +?name *?= *?(('([^']*?)')|("([^"]*?)")|([^'"\s]*?[^\/]\b)) *?>/gi //'<br />
}<br />
var namedrefs = [];<br />
var i=0;<br />
var nr=true;<br />
do {<br />
ref = regex.exec(text);<br />
if(ref != null){<br />
if (ref[5]) {<br />
namedrefs[i] = ref[5];<br />
} else if (ref[3]) {<br />
namedrefs[i] = ref[3];<br />
} else {<br />
namedrefs[i] = ref[6];<br />
}<br />
i++;<br />
} else {<br />
nr=false;<br />
}<br />
} while (nr==true);<br />
return namedrefs;<br />
}<br />
<br />
function citeNamedRef() {<br />
namedrefs = getNamedRefs(false);<br />
if (namedrefs == '') {<br />
oldFormHide();<br />
numforms++;<br />
out = '<div id="citediv'+numforms+'"><fieldset>'+<br />
'<legend>References in text</legend>There are no named refs (<tt>&lt;ref name="Name"&gt;</tt>) in the text</fieldset></div>';<br />
document.getElementById('citeselect').innerHTML += out;<br />
}<br />
else {<br />
oldFormHide();<br />
numforms++;<br />
form = '<div id="citediv'+numforms+'">'+<br />
'<fieldset><legend>References in article</legend>'+<br />
'<table cellspacing="5">'+<br />
'<tr><td><label for="namedrefs">&nbsp;Named references in text</label></td>'+<br />
'<td><select name="namedrefs" id="namedrefs">';<br />
for (var i=0;i<namedrefs.length;i++) {<br />
form+= '<option value="'+namedrefs[i]+'">'+namedrefs[i]+'</option>';<br />
}<br />
form+= '</select>'+<br />
'</td></tr></table>'+<br />
'<input type="button" value="Add citation" onClick="addnamedcite()">'+<br />
'</fieldset></div>';<br />
document.getElementById('citeselect').innerHTML += form;<br />
}<br />
}<br />
<br />
function addnamedcite() {<br />
name = document.getElementById('citediv'+numforms).getElementsByTagName('select')[0].value;<br />
ref = '<ref name="'+name+'" />';<br />
$("#wpTextbox1").focus();<br />
insertTags(ref, '', '');<br />
document.getElementById('citediv'+numforms).style.display = 'none';<br />
}<br />
<br />
function getAllRefs() {<br />
if (typeof(wikEdUseWikEd) != 'undefined') {<br />
if (wikEdUseWikEd == true) {<br />
WikEdUpdateTextarea();<br />
}<br />
}<br />
text = document.getElementById('wpTextbox1').value;<br />
regex = /< *?ref( +?name *?= *?(('([^']*?)')|("([^"]*?)")|([^'"\s]*?[^\/]\b)))? *?>((.|\n)*?)< *?\/? *?ref *?>/gim //"<br />
var allrefs = [];<br />
var i=0;<br />
var nr=true;<br />
do {<br />
ref = regex.exec(text);<br />
if(ref != null){<br />
if (ref[0].search(/[^\s]{150}/) != -1) {<br />
ref[0] = ref[0].replace(/\|([^\s])/g, "| $1");<br />
}<br />
ref[0] = ref[0].replace(/</g, "&lt;");<br />
ref[0] = ref[0].replace(/>/g, "&gt;");<br />
allrefs[i] = ref[0];<br />
i++;<br />
} else {<br />
nr=false;<br />
}<br />
} while (nr==true);<br />
return allrefs;<br />
}<br />
<br />
function NRcallError(namedrefs, refname) {<br />
for (var i=0; i<namedrefs.length; i++) {<br />
if (namedrefs[i] == refname) {<br />
return true;<br />
}<br />
}<br />
return false;<br />
}<br />
<br />
function errorCheck() {<br />
var allrefs = getAllRefs();<br />
var allrefscontent = [];<br />
var samecontentexclude = [];<br />
var sx=0;<br />
var templateexclude = [];<br />
var tx=0;<br />
var skipcheck = false;<br />
var namedrefcalls = getNamedRefs(true);<br />
for (var i=0; i<allrefs.length; i++) {<br />
allrefscontent[i] = allrefs[i].replace(/&lt; *?ref( +?name *?= *?(('([^']*?)')|("([^"]*?)")|([^'"\s]*?[^\/]\b)))? *?&gt;((.|\n)*?)&lt; *?\/? *?ref *?&gt;/gim, "$8"); //"<br />
}<br />
var namedrefs = getNamedRefs(false);<br />
var errorlist = [];<br />
var q=0;<br />
unclosed = document.getElementById('unclosed').checked;<br />
samecontent = document.getElementById('samecontent').checked;<br />
templates = document.getElementById('templates').checked;<br />
repeated = document.getElementById('repeated').checked;<br />
undef = document.getElementById('undef').checked;<br />
for (var i=0; i<allrefs.length; i++) {<br />
if (allrefs[i].search(/&lt; *?\/ *?ref *?&gt;/) == -1 && unclosed) {<br />
errorlist[q] = '<tr><td width="75%"><tt>'+allrefs[i]+'</tt></td>';<br />
errorlist[q] += '<td width="25%">Unclosed <tt>&lt;ref&gt;</tt> tag</td></tr>';<br />
q++;<br />
}<br />
if (samecontent) {<br />
for (var d=0; d<samecontentexclude.length; d++) {<br />
if (allrefscontent[i] == samecontentexclude[d]) {<br />
skipcheck = true;<br />
}<br />
}<br />
var p=0;<br />
while (p<allrefs.length && !skipcheck) {<br />
if (allrefscontent[i] == allrefscontent[p] && i != p) {<br />
errorlist[q] = '<tr><td width="75%"><tt>'+allrefscontent[i]+'</tt></td>';<br />
errorlist[q] += '<td width="25%">Multiple refs contain this content, a <a href="//en.wikipedia.org/wiki/Wikipedia:Footnotes#Naming_a_ref_tag_so_it_can_be_used_more_than_once">named reference</a> should be used instead</td></tr>';<br />
q++;<br />
samecontentexclude[sx] = allrefscontent[i]<br />
sx++;<br />
break;<br />
}<br />
p++;<br />
}<br />
skipcheck=false;<br />
}<br />
if (templates) {<br />
if (allrefscontent[i].search(/\{\{cite/i) == -1 && allrefscontent[i].search(/\{\{citation/i) == -1 && allrefscontent[i].search(/\{\{Comic (book|strip) reference/i) == -1 && allrefscontent[i].search(/\{\{Editorial cartoon reference/i) == -1 && allrefscontent[i].search(/\{\{harv/i) == -1) {<br />
for (var x=0; x<templateexclude.length; x++) {<br />
if (allrefscontent[i] == templateexclude[x]) {<br />
skipcheck = true;<br />
}<br />
}<br />
if (!skipcheck) {<br />
errorlist[q] = '<tr><td width="75%"><tt>'+allrefs[i]+'</tt></td>';<br />
errorlist[q] += '<td width="25%">Does not use a <a href="//en.wikipedia.org/wiki/Wikipedia:Citation_templates">citation template</a></td></tr>';<br />
q++;<br />
templateexclude[tx] = allrefscontent[i];<br />
tx++;<br />
}<br />
skipcheck = false;<br />
}<br />
}<br />
}<br />
if (repeated) {<br />
var repeatnameexclude = [];<br />
var rx=0;<br />
for (var k=0; k<namedrefs.length; k++) {<br />
for (var d=0; d<repeatnameexclude.length; d++) {<br />
if (namedrefs[k] == repeatnameexclude[d]) {<br />
skipcheck = true;<br />
}<br />
}<br />
var z=0;<br />
while (z<namedrefs.length && !skipcheck) {<br />
if (namedrefs[k] == namedrefs[z] && k != z) {<br />
errorlist[q] = '<tr><td width="75%"><tt>'+namedrefs[k]+'</tt></td>';<br />
errorlist[q] += '<td width="25%">Multiple references are given the same <a href="//en.wikipedia.org/wiki/Wikipedia:Footnotes#Naming_a_ref_tag_so_it_can_be_used_more_than_once">name</a></td></tr>';<br />
q++;<br />
repeatnameexclude[rx] = namedrefs[z];<br />
rx++;<br />
break;<br />
}<br />
z++;<br />
}<br />
skipcheck = false;<br />
}<br />
}<br />
if (undef) {<br />
var undefexclude = [];<br />
var ux=0;<br />
for (var p=0; p<namedrefcalls.length; p++) {<br />
for (var d=0; d<undefexclude.length; d++) {<br />
if (allrefscontent[i] == undefexclude[d]) {<br />
skipcheck = true;<br />
}<br />
}<br />
if (!skipcheck) {<br />
if (!NRcallError(namedrefs, namedrefcalls[p])) {<br />
errorlist[q] = '<tr><td width="75%"><tt>'+namedrefcalls[p]+'</tt></td>';<br />
errorlist[q] += '<td width="25%">A <a href="//en.wikipedia.org/wiki/Wikipedia:Footnotes#Naming_a_ref_tag_so_it_can_be_used_more_than_once">named reference</a> is used but not defined</td></tr>';<br />
q++;<br />
undefexclude[ux] = namedrefs[p];<br />
ux++;<br />
}<br />
}<br />
skipcheck = false;<br />
}<br />
}<br />
if (q > 0) {<br />
return errorlist;<br />
} else {<br />
return 0;<br />
}<br />
}<br />
<br />
function dispErrors() {<br />
oldFormHide();<br />
form = '<div id="errorform"><fieldset>'+<br />
'<legend>Error checking</legend>'+<br />
'<b>Check for:</b><br/>'+<br />
'<input type="checkbox" id="unclosed" /> Unclosed <tt>&lt;ref&gt;</tt> tags<br/>'+<br />
'<input type="checkbox" id="samecontent" /> References with the same content<br/>'+<br />
'<input type="checkbox" id="templates" /> References not using a <a href="//en.wikipedia.org/wiki/Wikipedia:Citation_templates">citation template</a><br/>'+<br />
'<input type="checkbox" id="repeated" /> Multiple references with the same name<br/>'+<br />
'<input type="checkbox" id="undef" /> Usage of undefined named references<br/>'+<br />
'<input type="button" id="errorchecksubmit" value="Check for selected errors" onclick="doErrorCheck()"/>'+<br />
'</fieldset></div>';<br />
document.getElementById('citeselect').innerHTML += form;<br />
}<br />
<br />
function doErrorCheck() {<br />
var errors = errorCheck();<br />
document.getElementById('citeselect').removeChild(document.getElementById('errorform'));<br />
if (errors == 0) {<br />
if (numforms != 0) {<br />
document.getElementById('citediv'+numforms).style.display = 'none';<br />
}<br />
numforms++;<br />
out = '<div id="citediv'+numforms+'"><fieldset>'+<br />
'<legend>Error checking</legend>No errors found.</fieldset></div>';<br />
document.getElementById('citeselect').innerHTML += out;<br />
}<br />
else {<br />
if (numforms != 0) {<br />
document.getElementById('citediv'+numforms).style.display = 'none';<br />
}<br />
numforms++;<br />
form = '<div id="citediv'+numforms+'">'+<br />
'<fieldset><legend>Error checking</legend>'+<br />
'<table border="1px">';<br />
for (var i=0; i<errors.length; i++) {<br />
form+=errors[i];<br />
}<br />
form+= '</table>'+<br />
'</fieldset></div>';<br />
document.getElementById('citeselect').innerHTML += form;<br />
}<br />
}<br />
<br />
$( refbuttons );</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=MediaWiki:Gadget-refToolbar.js&diff=12941
MediaWiki:Gadget-refToolbar.js
2017-06-25T20:18:51Z
<p>Nicolas Brouard: naimportována 1 revize</p>
<hr />
<div>/**<br />
* RefToolbar<br />
*<br />
* Adds tools for citing references to the edit toolbar.<br />
* See [[Wikipedia:RefToolbar]] for further documentation. One of<br />
* three possible versions will load (Reftoolbar 2.0b, Reftoolbar 2.0a,<br />
* or Reftoolbar 1.0) depending on the user preferences (the<br />
* usebetatoolbar and usebetatoolbar-cgd parameters).<br />
*<br />
* @see: [[Wikipedia:RefToolbar]]<br />
* @see: [[MediaWiki:RefToolbar.js]]<br />
* @see: [[MediaWiki:RefToolbarConfig.js]]<br />
* @see: [[MediaWiki:RefToolbarLegacy.js]]<br />
* @see: [[MediaWiki:RefToolbarMessages-en.js]]<br />
* @see: [[MediaWiki:RefToolbarMessages-de.js]]<br />
* @see: [[MediaWiki:RefToolbarNoDialogs.js]]<br />
* @see: [[MediaWiki:Gadget-refToolbarBase.js]]<br />
* @author: [[User:Mr.Z-man]]<br />
* @author: [[User:Kaldari]]<br />
*/<br />
/*jshint browser: true, camelcase: true, curly: true, eqeqeq: true */<br />
/*global jQuery, mediaWiki, importScript */<br />
( function ( mw, $ ) {<br />
'use strict';<br />
function initializeRefTools() {<br />
if ( window.refToolbarInstalled || $( '#wpTextbox1[readonly]' ).length ){<br />
return;<br />
}<br />
// using weak comparison because ("0") is true, but ("0" == true) is false <br />
if ( mw.user.options.get( 'usebetatoolbar' ) == true ) {<br />
// Enhanced editing toolbar is on. Going to load RefToolbar 2.0a or 2.0b.<br />
if ( mw.user.options.get( 'usebetatoolbar-cgd' ) == true ) {<br />
// Dialogs are on. Loading 2.0b. (standard)<br />
// TODO:<br />
// * Explicitly declare global variables from [[MediaWiki:RefToolbar.js]] using window.*<br />
// * Move [[MediaWiki:RefToolbar.js]] to [[MediaWiki:Gadget-refToolbarDialogs.js]]<br />
// * Create the module 'ext.gadget.refToolbarDialogs' depending on 'ext.gadget.refToolbarBase' and 'ext.wikiEditor.toolbar'<br />
// * Replace the code below by mw.loader.load( 'ext.gadget.refToolbarDialogs' );<br />
mw.loader.using( [ 'ext.gadget.refToolbarBase', 'ext.wikiEditor.toolbar' ], function () {<br />
importScript( 'MediaWiki:RefToolbar.js' );<br />
} );<br />
} else {<br />
// Dialogs are off. Loading 2.0a.<br />
mw.loader.using( 'ext.wikiEditor.toolbar', function () {<br />
importScript( 'MediaWiki:RefToolbarNoDialogsTextTerm.js' );<br />
} );<br />
}<br />
} else if ( mw.user.options.get( 'showtoolbar' ) ) {<br />
// Enhanced editing toolbar is off. Loading RefToolbar 1.0. (legacy)<br />
importScript( 'MediaWiki:RefToolbarLegacy.js' );<br />
} else {<br />
return;<br />
}<br />
window.refToolbarInstalled = true;<br />
}<br />
<br />
if ( $.inArray( mw.config.get( 'wgAction' ), [ 'edit', 'submit' ] ) !== -1 ) {<br />
// Double check if user.options is loaded, to prevent errors when copy pasted accross installations<br />
$.when( mw.loader.using( ['user.options'] ), $.ready ).done( initializeRefTools );<br />
}<br />
<br />
}( mediaWiki, jQuery ) );</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=MediaWiki:RefToolbarConfig.js&diff=12943
MediaWiki:RefToolbarConfig.js
2017-06-25T20:18:51Z
<p>Nicolas Brouard: naimportována 1 revize</p>
<hr />
<div>/* Sitewide options for the the Cite toolbar button:<br />
* All options should be specified<br />
*<br />
* "date format" sets the date format used for the function to insert the current date<br />
* Current available options:<br />
* date - the day of the month<br />
* zdate - day of the month, zero padded to 2 digits<br />
* monthname - The month name<br />
* month - The numberic month (1-12)<br />
* zmonth - numeric month, zero padded to 2 digits<br />
* year - The full year (4 digits)<br />
*<br />
* "autodate fields" is a list of template fields that should have a button to insert the current date<br />
* <br />
* "months" is a list of localized month names<br />
*<br />
* "modal" - if true, the dialogs will be modal windows, blocking access to the rest of the window.<br />
* See http://en.wikipedia.org/wiki/Modal_window<br />
* All dialogs in the toolbar are modal by default<br />
*<br />
* "autoparse" - if true, previewing a ref will automatically trigger a preview of the parsed wikitext.<br />
* It is not recommended to set this to true as a global setting as it may slow the script down for<br />
* people with slow connections.<br />
*<br />
* "expandtemplates" - if true, templates and parser functions will be expanded when getting page text<br />
* (templates inside of ref tags will not be expanded). This will allow references inside of templates or<br />
* references using {{#tag:ref}} to be listed in the named refs dialog and searched by error checks.<br />
* This may slow loading the named refs and error check dialogs.<br />
*/<br />
<br />
CiteTB.Options = {<br />
"date format" : "<date> <monthname> <year>",<br />
"autodate fields" : ['accessdate'],<br />
"months" : ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],<br />
"modal" : true,<br />
"autoparse" : true,<br />
"expandtemplates" : false<br />
};<br />
<br />
// Cite template definitions<br />
new citeTemplate('cite web', 'web',<br />
[ // Basic fields<br />
{"field": "last<N>", "autofillprop":"last-incr", 'increment_group':'author'},<br />
{"field": "first<N>", "autofillprop":"first-incr", 'increment_group':'author', 'increment_button':true}, <br />
{"field": "title", "autofillprop":"title"},<br />
{"field": "url", "autofillid":"url"},<br />
{"field": "website", "autofillprop":"journal"},<br />
{"field": "publisher", "autofillprop":"publisher"},<br />
{"field": "accessdate"},<br />
{"field": "ref", "tooltip":"cite-ref-tooltip"}<br />
],<br />
[ // Expanded fields<br />
{"field": "author<N>", 'increment_group':'author_alt', 'increment_button':true},<br />
{"field": "authorlink<N>", "tooltip":"cite-authorlink-tooltip", 'increment_group':'authorlink', 'increment_button':true},<br />
{"field": "archiveurl"},<br />
{"field": "archivedate"},<br />
{"field": "location"},<br />
{"field": "page", "tooltip":"cite-page-tooltip"},<br />
{"field": "pages", "autofillprop":"pages", "tooltip":"cite-pages-tooltip"},<br />
{"field": "language", "autofillprop":"language"},<br />
{"field": "format"},<br />
{"field": "doi", "autofillid":"doi", "autofillprop":"doi"},<br />
{"field": "date", "autofillprop":"date"},<br />
{"field": "quote"}<br />
]);<br />
<br />
new citeTemplate('cite news', 'news',<br />
[ // Basic fields<br />
{"field": "last<N>", "autofillprop":"last-incr", 'increment_group':'author'},<br />
{"field": "first<N>", "autofillprop":"first-incr", 'increment_group':'author', 'increment_button':true}, <br />
{"field": "title", "autofillprop":"title"},<br />
{"field": "url", "autofillid":"url"},<br />
{"field": "accessdate"},<br />
{"field": "work", "tooltip":"cite-work-tooltip", "autofillprop":"journal"},<br />
{"field": "agency"},<br />
{"field": "issue"},<br />
{"field": "publisher", "autofillprop":"publisher"},<br />
{"field": "date", "autofillprop":"date"},<br />
{"field": "ref", "tooltip":"cite-ref-tooltip"}<br />
],<br />
[ // Expanded fields<br />
{"field": "author<N>", 'increment_group':'author_alt', 'increment_button':true},<br />
{"field": "authorlink<N>", "tooltip":"cite-authorlink-tooltip", 'increment_group':'authorlink', 'increment_button':true},<br />
{"field": "archiveurl"},<br />
{"field": "archivedate"},<br />
{"field": "location"},<br />
{"field": "page", "tooltip":"cite-page-tooltip"},<br />
{"field": "pages", "autofillprop":"pages", "tooltip":"cite-pages-tooltip"},<br />
{"field": "language", "autofillprop":"language"},<br />
{"field": "format"},<br />
{"field": "doi", "autofillid":"doi", "autofillprop":"doi"},<br />
{"field": "quote"}<br />
]);<br />
<br />
new citeTemplate('cite book', 'book',<br />
[ // Basic fields<br />
{"field": "last<N>", "autofillprop":"last-incr", 'increment_group':'author'},<br />
{"field": "first<N>", "autofillprop":"first-incr", 'increment_group':'author', 'increment_button':true}, <br />
{"field": "title", "autofillprop":"title"},<br />
{"field": "date", "autofillprop":"year"},<br />
{"field": "publisher", "autofillprop":"publisher"},<br />
{"field": "location", "autofillprop":"location"},<br />
{"field": "isbn", "autofillid":"isbn", "autofillprop":"isbn"},<br />
{"field": "page", "tooltip":"cite-page-tooltip"},<br />
{"field": "pages", "autofillprop":"pages", "tooltip":"cite-pages-tooltip"},<br />
{"field": "edition", "autofillprop":"edition"},<br />
{"field": "url", "autofillid":"url"},<br />
{"field": "accessdate"},<br />
{"field": "ref", "tooltip":"cite-ref-tooltip"}<br />
<br />
],<br />
[ // Expanded fields<br />
{"field": "author<N>", 'increment_group':'author_alt', 'increment_button':true},<br />
{"field": "authorlink<N>", "tooltip":"cite-authorlink-tooltip", 'increment_group':'authorlink', 'increment_button':true},<br />
{"field": "editor<N>-last", "increment_group":"editor"},<br />
{"field": "editor<N>-first", "increment_group":"editor", "increment_button":true},<br />
{"field": "editor<N>-link", 'increment_group':'editorlink', 'increment_button':true},<br />
{"field": "archiveurl"},<br />
{"field": "archivedate"},<br />
{"field": "language", "autofillprop":"language"},<br />
{"field": "format"},<br />
{"field": "chapter", "autofillprop":"chapter"},<br />
{"field": "quote"}<br />
]);<br />
<br />
new citeTemplate('cite journal', 'journal',<br />
[ // Basic fields<br />
{"field": "last<N>", "autofillprop":"last-incr", 'increment_group':'author'},<br />
{"field": "first<N>", "autofillprop":"first-incr", 'increment_group':'author', 'increment_button':true}, <br />
{"field": "title", "autofillprop":"title"},<br />
{"field": "journal", "autofillprop":"journal"},<br />
{"field": "date", "autofillprop":"date"},<br />
{"field": "volume", "autofillprop":"volume"},<br />
{"field": "issue", "autofillprop":"issue"},<br />
{"field": "page", "tooltip":"cite-page-tooltip"},<br />
{"field": "pages", "autofillprop":"pages", "tooltip":"cite-pages-tooltip"},<br />
{"field": "doi", "autofillid":"doi", "autofillprop":"doi"},<br />
{"field": "pmid", "autofillid":"pmid"},<br />
{"field": "url", "autofillid":"url"},<br />
{"field": "accessdate"},<br />
{"field": "ref", "tooltip":"cite-ref-tooltip"},<br />
],<br />
[ // Expanded fields<br />
{"field": "author<N>", 'increment_group':'author_alt', 'increment_button':true},<br />
{"field": "authorlink<N>", "tooltip":"cite-authorlink-tooltip", 'increment_group':'authorlink', 'increment_button':true},<br />
{"field": "editor<N>-last", "increment_group":"editor"},<br />
{"field": "editor<N>-first", "increment_group":"editor", "increment_button":true},<br />
{"field": "editor<N>-link", 'increment_group':'editorlink', 'increment_button':true},<br />
{"field": "series"},<br />
{"field": "at", "tooltip":"cite-at-tooltip"},<br />
{"field": "trans-title"},<br />
{"field": "publisher", "autofillprop":"publisher"},<br />
{"field": "location"},<br />
{"field": "language", "autofillprop":"language"},<br />
{"field": "format"},<br />
{"field": "issn", "autofillprop":"issn"},<br />
{"field": "pmc"},<br />
{"field": "oclc"},<br />
{"field": "bibcode"},<br />
{"field": "id"},<br />
{"field": "quote"},<br />
{"field": "postscript", "tooltip":"cite-postscript-tooltip"}<br />
]);<br />
<br />
new citeErrorCheck({'type':'reflist', 'testname':'samecontent', 'desc': 'cite-samecontent-desc',<br />
'func': function(reflist) {<br />
var errors = [];<br />
var refs2 = [];<br />
for(var i=0; i<reflist.length; i++) {<br />
if (!reflist[i].shorttag) {<br />
if ($.inArray(reflist[i].content, refs2) != -1) {<br />
if ($.inArray(reflist[i].content, errors) == -1) {<br />
errors.push(reflist[i].content);<br />
}<br />
} else {<br />
refs2.push(reflist[i].content);<br />
}<br />
}<br />
}<br />
ret = [];<br />
for(var j=0; j<errors.length; j++) {<br />
ret.push({'msg':'cite-samecontent-error', 'err':errors[j]});<br />
}<br />
return ret;<br />
}}<br />
);<br />
<br />
new citeErrorCheck({'type':'reflist', 'testname':'repeated', 'desc':'cite-repeated-desc',<br />
'func': function(reflist) {<br />
var errors = [];<br />
var refs2 = [];<br />
for(var i=0; i<reflist.length; i++) {<br />
if (!reflist[i].shorttag && reflist[i].refname) {<br />
if ($.inArray(reflist[i].refname, refs2) != -1) {<br />
if ($.inArray(reflist[i].refname, errors) == -1) {<br />
errors.push(reflist[i].refname);<br />
}<br />
} else {<br />
refs2.push(reflist[i].refname);<br />
}<br />
}<br />
}<br />
ret = [];<br />
for(var j=0; j<errors.length; j++) {<br />
ret.push({'msg':'cite-repeated-error', 'err':errors[j]});<br />
}<br />
return ret;<br />
}}<br />
);<br />
<br />
new citeErrorCheck({'type':'reflist', 'testname':'undefined', 'desc':'cite-undefined-desc',<br />
'func': function(reflist) {<br />
var errors = [];<br />
var longrefs = [];<br />
for(var i=0; i<reflist.length; i++) {<br />
if (!reflist[i].shorttag && reflist[i].refname) {<br />
longrefs.push(reflist[i].refname);<br />
}<br />
}<br />
for(var j=0; i<reflist.length; j++) {<br />
if (reflist[i].shorttag && $.inArray(reflist[i].refname, errors) == -1 && $.inArray(reflist[i].refname, longrefs) == -1) {<br />
errors.push(reflist[i].refname);<br />
}<br />
}<br />
ret = [];<br />
for(var j=0; j<errors.length; j++) {<br />
ret.push({'msg':'cite-undefined-error', 'err':errors[j]});<br />
}<br />
return ret;<br />
}}<br />
);<br />
<br />
CiteTB.init();</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=MediaWiki:Gadgets-definition&diff=12946
MediaWiki:Gadgets-definition
2017-06-25T16:00:27Z
<p>Nicolas Brouard: </p>
<hr />
<div>#Editing<br />
* wikEd[ResourceLoader]|wikEd.js<br />
* refToolbar[ResourceLoader|default|dependencies=user.options,mediawiki.legacy.wikibits]|refToolbar.js<br />
* refToolbarBase[ResourceLoader|hidden]|refToolbarBase.js<br />
* DotsSyntaxHighlighter[ResourceLoader|default|dependencies=jquery.client]|DotsSyntaxHighlighter.js<br />
<br />
#Interface<br />
* exlinks[ResourceLoader]|exlinks.js<br />
* purgeTab[ResourceLoader]|purgeTab.js<br />
* citations[ResourceLoader]|citations.js</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=MediaWiki:Common.js&diff=12948
MediaWiki:Common.js
2017-06-25T15:00:10Z
<p>Nicolas Brouard: Back to minimum</p>
<hr />
<div>/**<br />
* Keep code in MediaWiki:Common.js to a minimum as it is unconditionally<br />
* loaded for all users on every wiki page. If possible create a gadget that is<br />
* enabled by default instead of adding it here (since gadgets are fully<br />
* optimized ResourceLoader modules with possibility to add dependencies etc.)<br />
*<br />
* Since Common.js isn't a gadget, there is no place to declare its<br />
* dependencies, so we have to lazy load them with mw.loader.using on demand and<br />
* then execute the rest in the callback. In most cases these dependencies will<br />
* be loaded (or loading) already and the callback will not be delayed. In case a<br />
* dependency hasn't arrived yet it'll make sure those are loaded before this.<br />
*/</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=MediaWiki:Gadget-DotsSyntaxHighlighter.js&diff=12936
MediaWiki:Gadget-DotsSyntaxHighlighter.js
2017-06-20T10:18:31Z
<p>Nicolas Brouard: modified</p>
<hr />
<div>//Syntax highlighter with various advantages See [[User:Remember the<br />
//dot/Syntax highlighter]] for more information<br />
/*<br />
MediaWiki:Gadget-DotsSyntaxHighlighter<br />
[https://www.mediawiki.org/wiki/User:Remember_the_dot/Syntax_highlighter Adapted from Syntax highlighter]: Make syntax stand out colourfully in the edit box and especially with Demopaedia TextTerm etc.<br />
<br />
MediaWiki:Gadget-DotsSyntaxHighlighter.js<br />
<br />
*/<br />
//in the edit box and especially with Demopaedia TextTerm etc.<br />
/* This file may be used under the terms of any of the following<br />
licenses, as well as any later version of the same licenses:<br />
<br />
GNU General Public License 2.0<br />
<https://www.gnu.org/licenses/old-licenses/gpl-2.0.html><br />
<br />
Creative Commons Attribution-ShareAlike 3.0 Unported License<br />
<https://creativecommons.org/licenses/by-sa/3.0/><br />
<br />
GNU Free Documentation License 1.2<br />
<https://www.gnu.org/licenses/old-licenses/fdl-1.2.html><br />
Modified by Nicolas Brouard for Demopaedia.org 12 June 2017<br />
*/<br />
<br />
(function () {<br />
"use strict";<br />
<br />
//variables that are preserved between function calls<br />
var wpTextbox0;<br />
var wpTextbox1;<br />
var syntaxStyleTextNode;<br />
var lastText;<br />
var maxSpanNumber = -1; //the number of the last span available, used to tell if creating additional spans is necessary<br />
var highlightSyntaxIfNeededIntervalID;<br />
var attributeObserver;<br />
var parentObserver;<br />
<br />
/* Define context-specific regexes, one for every common token that ends the<br />
current context.<br />
<br />
An attempt has been made to search for the most common syntaxes first,<br />
thus maximizing performance. Syntaxes that begin with the same character<br />
are searched for at the same time.<br />
<br />
Supported wiki syntaxes from most common to least common:<br />
[[internal link]] [http:// named external link]<br />
{{template}} {{{template parameter}}} {| table |}<br />
<tag> <!-- comment --><br />
http:// bare external link<br />
=Heading= * unordered list # ordered list : indent ; small heading ---- horizontal line<br />
''italic'' '''bold'''<br />
three tildes username four tildes signature five tildes timestamp<br />
&entity;<br />
<br />
The tag-matching regex follows the XML standard closely so that users<br />
won't feel like they have to escape sequences that MediaWiki will never<br />
consider to be tags.<br />
<br />
Only entities for characters which need to be escaped or cannot be<br />
unambiguously represented in a monospace font are highlighted, such as<br />
Greek letters that strongly resemble Latin letters. Use of other entities<br />
is discouraged as a matter of style. For the same reasons, numeric<br />
entities should be in hexadecimal (giving character codes in decimal only<br />
adds confusion).<br />
<br />
Newlines are sucked up into ending tokens (including comments, bare<br />
external links, lists, horizontal lines, signatures, entities, etc.) to<br />
avoid creating spans with nothing but newlines in them.<br />
<br />
Flags: g for global search, m for make ^ match the beginning of each line<br />
and $ the end of each line<br />
*/<br />
var wgUrlProtocols = mw.config.get("wgUrlProtocols");<br />
var entityRegexBase = "&(?:(?:n(?:bsp|dash)|m(?:dash|inus)|lt|e[mn]sp|thinsp|amp|quot|gt|shy|zwn?j|lrm|rlm|Alpha|Beta|Epsilon|Zeta|Eta|Iota|Kappa|[Mm]u|micro|Nu|[Oo]micron|[Rr]ho|Tau|Upsilon|Chi)|#x[0-9a-fA-F]+);\n*";<br />
var breakerRegexBase = "\\[(?:\\[|(?:" + wgUrlProtocols + "))|\\{(?:\\{\\{?|\\|)|<(?:[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:\\w\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD-\\.\u00B7\u0300-\u036F\u203F-\u203F-\u2040]*(?=/?>| |\n)|!--[^]*?-->\n*)|(?:" + wgUrlProtocols.replace("|\\/\\/", "") + ")[^\\s\"<>[\\]{-}]*[^\\s\",\\.:;<>[\\]{-}]\n*|^(?:=|[*#:;]+\n*|-{4,}\n*)|\\\\'\\\\'(?:\\\\')?|~{3,5}\n*|" + entityRegexBase;<br />
function breakerRegexWithPrefix(prefix)<br />
{<br />
//the stop token has to be at the beginning of the regex so that it takes precedence over substrings of itself.<br />
return new RegExp("(" + prefix + ")\n*|" + breakerRegexBase, "gm");<br />
}<br />
function nowikiTagBreakerRegex(tagName)<br />
{<br />
return new RegExp("(</" + tagName + ">)\n*|" + entityRegexBase, "gm");<br />
}<br />
var defaultBreakerRegex = new RegExp(breakerRegexBase, "gm");<br />
var wikilinkBreakerRegex = breakerRegexWithPrefix("]][a-zA-Z]*");<br />
var namedExternalLinkBreakerRegex = breakerRegexWithPrefix("]");<br />
var parameterBreakerRegex = breakerRegexWithPrefix("}}}");<br />
var templateBreakerRegex = breakerRegexWithPrefix("}}");<br />
var templateArgBreakerRegex = breakerRegexWithPrefix("[\\|}]");<br />
var tableBreakerRegex = breakerRegexWithPrefix("\\|}");<br />
var headingBreakerRegex = breakerRegexWithPrefix("\n");<br />
var tagBreakerRegexCache = {};<br />
var nowikiTagBreakerRegexCache = {};<br />
<br />
function highlightSyntax()<br />
{<br />
lastText = wpTextbox1.value;<br />
/* Backslashes and apostrophes are CSS-escaped at the beginning and all<br />
parsing regexes and functions are designed to match. On the other hand,<br />
newlines are not escaped until written so that in the regexes ^ and $<br />
work for both newlines and the beginning or end of the string. */<br />
var text = lastText.replace(/['\\]/g, "\\$&") + "\n"; //add a newline to fix scrolling and parsing issues<br />
var i = 0; //the location of the parser as it goes through var text<br />
<br />
var css = "";<br />
var spanNumber = 0;<br />
var lastColor;<br />
var before = true;<br />
<br />
//writes text into to-be-created span elements of wpTextbox0 using :before and :after pseudo-elements<br />
//both :before and :after are used because using two pseudo-elements per span is significantly faster than doubling the number of spans required<br />
function writeText(text, color)<br />
{<br />
//no need to use another span if using the same color<br />
if (color != lastColor)<br />
{<br />
//whitespace is omitted in the hope of increasing performance<br />
css += "'}#s" + spanNumber; //spans will be created with IDs s0 through sN<br />
if (before)<br />
{<br />
css += ":before{";<br />
before = false;<br />
}<br />
else<br />
{<br />
css += ":after{";<br />
before = true;<br />
++spanNumber;<br />
}<br />
if (color)<br />
{<br />
//"background-color" is 6 characters longer than "background" but the browser processes it faster<br />
css += "background-color:" + color + ";";<br />
}<br />
css += "content:'";<br />
lastColor = color;<br />
}<br />
css += text;<br />
}<br />
<br />
/* About assumedBold and assumedItalic:<br />
<br />
Highlighting bold or italic markup presents a special challenge<br />
because the actual MediaWiki parser uses multiple passes to determine<br />
which ticks represent start tags and which represent end tags.<br />
Because that would be too slow for us here, we instead keep track of<br />
what kinds of unclosed opening ticks have been encountered and use<br />
that to make a good guess as to whether the next ticks encountered<br />
are an opening tag or a closing tag.<br />
<br />
The major downsides to this method are that '''apostrophe italic''<br />
and ''italic apostrophe''' are not highlighted correctly, and bold<br />
and italic are both highlighted in the same color.<br />
<br />
To permit ''The best<ref>''Reference Title''</ref> book ever'',<br />
assumedBold and assumedItalic are saved on the stack and reset to<br />
undefined (essentially, false) when recursing into a new block. */<br />
<br />
function highlightBlock(color, breakerRegex, assumedBold, assumedItalic)<br />
{<br />
var match;<br />
<br />
for (breakerRegex.lastIndex = i; match = breakerRegex.exec(text); breakerRegex.lastIndex = i)<br />
{<br />
// console.log(" breakerRegex.lastIndex="+breakerRegex.lastIndex);<br />
// console.log(" breakerRegex.source="+breakerRegex.source);<br />
//console.log(" match.input="+match.input);<br />
// if (match[1])<br />
// //console.log(" match1=" + match[1]+ " match0=" +match[0]);<br />
// else<br />
// //console.log(" unmatch1=" + match[1]+ " match0=" +match[0]);<br />
if (match[1])<br />
{<br />
//end token found, we are within a coloured zone <br />
writeText(text.substring(i, breakerRegex.lastIndex), color);<br />
//console.log(" breaker Regex i="+ i + " breakerRegex.lastIndex=" +breakerRegex.lastIndex + " t="+text.substring(i, breakerRegex.lastIndex) + " return highlight" );<br />
i = breakerRegex.lastIndex; /* end of zone */<br />
<br />
return; /* returns after the break ie for with a defautregex in order to search again */<br />
}<br />
<br />
var endIndexOfLastColor = breakerRegex.lastIndex - match[0].length; /* Not including the match? */<br />
if (i < endIndexOfLastColor) //avoid calling writeText with text == "" to improve performance<br />
{<br />
writeText(text.substring(i, endIndexOfLastColor), color); /* Includes i (from 0), excludes endIndexOfLastColor */<br />
//console.log(" substring i="+ i + " endIndexOfLastColor=" + endIndexOfLastColor );<br />
<br />
}<br />
<br />
i = breakerRegex.lastIndex; /* Out of coloured zone */ /* Dot is first position after the search "{{." */<br />
<br />
switch (match[0].charAt(0)) //cases in this switch should be arranged from most common to least common<br />
{<br />
case "[":<br />
if (match[0].charAt(1) == "[")<br />
{<br />
//wikilink<br />
writeText("[[", syntaxHighlighterConfig.wikilinkColor || color);<br />
highlightBlock(syntaxHighlighterConfig.wikilinkColor || color, wikilinkBreakerRegex);<br />
}<br />
else<br />
{<br />
//named external link<br />
writeText(match[0], syntaxHighlighterConfig.externalLinkColor || color);<br />
highlightBlock(syntaxHighlighterConfig.externalLinkColor || color, namedExternalLinkBreakerRegex);<br />
}<br />
break;<br />
case "{":<br />
if (match[0].charAt(1) == "{")<br />
{<br />
if (match[0].length == 3)<br />
{<br />
//parameter<br />
writeText("{{{", syntaxHighlighterConfig.parameterColor || color);<br />
highlightBlock(syntaxHighlighterConfig.parameterColor || color, parameterBreakerRegex);<br />
}<br />
else<br />
{<br />
//template<br />
//some other kind of template, search for its end<br />
//writeText("{{", syntaxHighlighterConfig.templateColor || color);<br />
//{{Note|6| {{NoteTerm|Biométrie}}, s.f. - {{NoteTerm|biométrique}}, adj. - {{NoteTerm|biométricien}}, s.m. : spécialiste de la biométrie.}}<br />
//var templEnd = text.indexOf("}", i) + 1; /* Just before first } +1*/<br />
var templTextTermEnd = text.indexOf("|", i); /* char from 0 to index "{{Note|" is position 6 (7th char); just after first | if any*/<br />
var iv=text.indexOf("|", i);//"{{Note|1|" termEnd is position 7 (starting at "1"), result is 8<br />
var ib=text.indexOf("}", i);//"{{RefTerm|Love}}" termEnd is position 9 (starting at "L"), result is 13<br />
var nbarg=0;<br />
var templTextTermEnd ;<br />
var templTextTermEndClose;<br />
if( (ib < iv) || (iv == -1) ){<br />
nbarg=0;<br />
templTextTermEndClose=templTextTermEnd = ib ;/* Just at } if any */ /* no argument */<br />
}else{<br />
nbarg=1;<br />
templTextTermEnd = iv ; /* Just at second | if any */<br />
}<br />
//{{Current status}}<br />
if(nbarg==1){<br />
iv=text.indexOf("|", templTextTermEnd+1);//"{{Note|1|" termEnd is position 7 (starting at "1"), result is 8<br />
ib=text.indexOf("}", templTextTermEnd+1);//"{{RefTerm|Love}}" termEnd is position 9 (starting at "L"), result is 13<br />
if( (ib < iv) || (iv == -1) ){<br />
templTextTermEndClose= ib ;/* Just at } if any */<br />
}else{<br />
nbarg=2;<br />
templTextTermEndClose = iv ; /* Just at second | if any {{Note|1| */<br />
}<br />
}<br />
//console.log("templ1 TextTermEndClose :" + templTextTermEndClose); // Ok before |<br />
// Be careful with scrolling and asynchronous generated by console.log see<br />
// https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Scroll-linked_effects<br />
//console.log("templ End :" + templEnd + " noarg=", noarg); // Ok before }}<br />
// console.log("templ TextTermEnd :" + templTextTermEnd); // Ok before |<br />
//console.log("templ TextTermEndClose :" + templTextTermEndClose); // Ok before |<br />
// La {{TextTerm|démographie historique|1|102|OtherIndexEntry=historique. démographie ...}} s’occupe<br />
//de la {{NonRefTerm|structure}} <br />
//{{Note|6| {{NoteTerm|Biométrie}}, s.f. - {{NoteTerm|biométrique}}, adj. - {{NoteTerm|biométricien}}, s.m. : spécialiste de la biométrie.}}<br />
//var templText = text.substring(i+2 - match[0].length, templEnd-1);<br />
//TextTerm|démographie historique|1|102|OtherIndexEntry=historique. démographie ..<br />
//NonRefTerm|structure<br />
var templTextType = text.substring(i+2 - match[0].length, templTextTermEnd); /* Excluding char at TermEnd | or } */<br />
//TextTerm<br />
//NonRefTerm<br />
//var templTextTermall = text.substring(templTextTermEnd, templEnd); /* Just after termination | or }*/<br />
//démographie historique|1|102|OtherIndexEntry=historique. démographie ...<br />
//NonRefTerm|structure<br />
var templTextTerm;<br />
if(nbarg >0)<br />
templTextTerm = text.substring(templTextTermEnd+1,templTextTermEndClose); //excluding terminaison | or }<br />
else<br />
templTextTerm="";<br />
//templTextTermall.substring(0, templTextTermall.indexOf("|"));<br />
//démographie historique<br />
//structure<br />
var TypeTemplateColor=syntaxHighlighterConfig.templateColor;<br />
var TemplateColor=syntaxHighlighterConfig.templateColor;<br />
var Text1TemplateColor=syntaxHighlighterConfig.templateColor;<br />
var Text2TemplateColor=syntaxHighlighterConfig.templateColor;<br />
if((templTextType=="TextTerm") ){<br />
TypeTemplateColor= syntaxHighlighterConfig.templTextTermColor;<br />
TemplateColor= syntaxHighlighterConfig.templTypeTextTermColor;<br />
Text1TemplateColor= syntaxHighlighterConfig.backgroundColor;<br />
Text2TemplateColor=TemplateColor ;<br />
}else if ( (templTextType=="Note") ){<br />
TypeTemplateColor= syntaxHighlighterConfig.templTypeNoteColor;<br />
TemplateColor= syntaxHighlighterConfig.templNoteColor;<br />
Text1TemplateColor= syntaxHighlighterConfig.backgroundColor;<br />
Text2TemplateColor= syntaxHighlighterConfig.templNoteColor;<br />
}else if ( (templTextType=="NoteTerm") ){<br />
TypeTemplateColor= syntaxHighlighterConfig.templNoteTermColor;<br />
TemplateColor= syntaxHighlighterConfig.templNoteTermColor;<br />
Text1TemplateColor= syntaxHighlighterConfig.backgroundColor;<br />
Text2TemplateColor= syntaxHighlighterConfig.templNoteTermColor;<br />
}else if (templTextType=="NewTextTerm" ){<br />
TypeTemplateColor= syntaxHighlighterConfig.templTextTermColor;<br />
TemplateColor= syntaxHighlighterConfig.templTypeNewTextTermColor;<br />
Text1TemplateColor= syntaxHighlighterConfig.backgroundColor;<br />
Text2TemplateColor= TemplateColor;<br />
}else if ( templTextType=="RefNumber" ){<br />
TypeTemplateColor= syntaxHighlighterConfig.templRefNumberColor;<br />
TemplateColor= syntaxHighlighterConfig.templRefNumberColor;<br />
Text1TemplateColor= syntaxHighlighterConfig.backgroundColor;<br />
Text2TemplateColor= TemplateColor;<br />
}else if ((templTextType=="NonRefTerm") ){<br />
TypeTemplateColor= syntaxHighlighterConfig.templNonRefTermColor;<br />
TemplateColor= syntaxHighlighterConfig.templNonRefTermColor;<br />
Text1TemplateColor= syntaxHighlighterConfig.backgroundColor;<br />
Text2TemplateColor= syntaxHighlighterConfig.backgroundColor;<br />
}<br />
//writeText("{{", TemplateColor || color);<br />
writeText("{{", TemplateColor || color); //NonRefTerm| or TextTerm|<br />
writeText(templTextType, TypeTemplateColor || color); //NonRefTerm| or TextTerm|<br />
i=templTextTermEnd;<br />
if(nbarg>=1){<br />
writeText( "|", TemplateColor || color); //NonRefTerm| or TextTerm|<br />
//writeText(templTextType+"|", syntaxHighlighterConfig.templateColor || color); //NonRefTerm| or TextTerm|<br />
i=templTextTermEnd+1;<br />
//writeText(templTextTerm, syntaxHighlighterConfig.tagColor || color); //struture<br />
writeText(templTextTerm, Text1TemplateColor || color); //struture<br />
i=templTextTermEndClose; //-noarg; démographie historique| or 1|, at the terminaison (| or }.<br />
}<br />
if(nbarg==2){<br />
writeText("|",Text2TemplateColor || color);<br />
i=templTextTermEndClose+1; //-noarg; démographie historique| or 1|, at the terminaison (| or }.<br />
}<br />
//console.log(" i="+ i );<br />
//highlightBlock(syntaxHighlighterConfig.templateColor || color, templateBreakerRegex);<br />
highlightBlock(TemplateColor || color, templateBreakerRegex);<br />
}<br />
}<br />
else //|<br />
{<br />
//table<br />
writeText("{|", syntaxHighlighterConfig.tableColor || color);<br />
highlightBlock(syntaxHighlighterConfig.tableColor || color, tableBreakerRegex);<br />
}<br />
break;<br />
case "<":<br />
if (match[0].charAt(1) == "!")<br />
{<br />
//comment tag<br />
writeText(match[0], syntaxHighlighterConfig.commentColor || color);<br />
break;<br />
}<br />
else<br />
{<br />
//some other kind of tag, search for its end<br />
//the search is made easier because XML attributes may not contain the character ">"<br />
var tagEnd = text.indexOf(">", i) + 1;<br />
if (tagEnd == 0)<br />
{<br />
//not a tag, just a "<" with some text after it<br />
writeText("<", color);<br />
i = i - match[0].length + 1;<br />
break;<br />
}<br />
<br />
if (text.charAt(tagEnd - 2) == "/")<br />
{<br />
//empty tag<br />
writeText(text.substring(i - match[0].length, tagEnd), syntaxHighlighterConfig.tagColor || color);<br />
i = tagEnd;<br />
}<br />
else<br />
{<br />
var tagName = match[0].substring(1);<br />
<br />
if (syntaxHighlighterConfig.sourceTags.indexOf(tagName) != -1)<br />
{<br />
//tag that contains text in a different programming language<br />
var stopAfter = "</" + tagName + ">";<br />
var endIndex = text.indexOf(stopAfter, i);<br />
if (endIndex == -1)<br />
{<br />
endIndex = text.length;<br />
}<br />
else<br />
{<br />
endIndex += stopAfter.length;<br />
}<br />
writeText(text.substring(i - match[0].length, endIndex), syntaxHighlighterConfig.tagColor || color);<br />
i = endIndex;<br />
}<br />
else if (syntaxHighlighterConfig.nowikiTags.indexOf(tagName) != -1)<br />
{<br />
//tag that can contain only HTML entities<br />
writeText(text.substring(i - match[0].length, tagEnd), syntaxHighlighterConfig.tagColor || color);<br />
i = tagEnd;<br />
highlightBlock(syntaxHighlighterConfig.tagColor || color, nowikiTagBreakerRegexCache[tagName]);<br />
}<br />
else<br />
{<br />
//ordinary tag<br />
writeText(text.substring(i - match[0].length, tagEnd), syntaxHighlighterConfig.tagColor || color);<br />
i = tagEnd;<br />
if (!tagBreakerRegexCache[tagName])<br />
{<br />
tagBreakerRegexCache[tagName] = breakerRegexWithPrefix("</" + tagName + ">");<br />
}<br />
highlightBlock(syntaxHighlighterConfig.tagColor || color, tagBreakerRegexCache[tagName]);<br />
}<br />
}<br />
}<br />
break;<br />
case "=":<br />
if (/[^=]=+$/.test(text.substring(i, text.indexOf("\n", i)))) //the line begins and ends with an equals sign and has something else in the middle<br />
{<br />
//heading<br />
writeText("=", syntaxHighlighterConfig.headingColor || color);<br />
highlightBlock(syntaxHighlighterConfig.headingColor || color, headingBreakerRegex);<br />
}<br />
else<br />
{<br />
writeText("=", color); //move on, process this line as regular wikitext<br />
}<br />
break;<br />
case "*":<br />
case "#":<br />
case ":":<br />
//unordered list, ordered list, indent, small heading<br />
//just highlight the marker<br />
writeText(match[0], syntaxHighlighterConfig.listOrIndentColor || color);<br />
break;<br />
case ";":<br />
//small heading<br />
writeText(";", syntaxHighlighterConfig.headingColor || color);<br />
highlightBlock(syntaxHighlighterConfig.headingColor || color, headingBreakerRegex);<br />
break;<br />
case "-":<br />
//horizontal line<br />
writeText(match[0], syntaxHighlighterConfig.hrColor || color);<br />
break;<br />
case "\\":<br />
writeText(match[0], syntaxHighlighterConfig.boldOrItalicColor || color);<br />
if (match[0].length == 6)<br />
{<br />
//bold<br />
if (assumedBold)<br />
{<br />
//end tag<br />
if (assumedItalic)<br />
{<br />
//end of bold part of bold-italic block<br />
//block is now italic-only<br />
assumedBold = false;<br />
}<br />
else<br />
{<br />
//end of bold block<br />
return;<br />
}<br />
}<br />
else<br />
{<br />
//start tag<br />
if (assumedItalic)<br />
{<br />
//start of bold part of previously italic-only block<br />
//block is now bold-italic<br />
assumedBold = true;<br />
}<br />
else<br />
{<br />
//start of bold block<br />
highlightBlock(syntaxHighlighterConfig.boldOrItalicColor || color, defaultBreakerRegex, true, false);<br />
}<br />
}<br />
}<br />
else<br />
{<br />
//italic<br />
if (assumedItalic)<br />
{<br />
//end tag<br />
if (assumedBold)<br />
{<br />
//end of italic part of bold-italic block<br />
//block is now bold-only<br />
assumedItalic = false;<br />
}<br />
else<br />
{<br />
//end of italic block<br />
return;<br />
}<br />
}<br />
else<br />
{<br />
//start tag<br />
if (assumedBold)<br />
{<br />
//start of italic part of previously bold-only block<br />
//block is now bold-italic<br />
assumedItalic = true;<br />
}<br />
else<br />
{<br />
//start of italic block<br />
highlightBlock(syntaxHighlighterConfig.boldOrItalicColor || color, defaultBreakerRegex, false, true);<br />
}<br />
}<br />
}<br />
break;<br />
case "&":<br />
//entity<br />
writeText(match[0], syntaxHighlighterConfig.entityColor || color);<br />
break;<br />
case "~":<br />
//username, signature, timestamp<br />
writeText(match[0], syntaxHighlighterConfig.signatureColor || color);<br />
break;<br />
default:<br />
//bare external link<br />
writeText(match[0], syntaxHighlighterConfig.externalLinkColor || color);<br />
}<br />
}<br />
}<br />
<br />
<br />
//start!<br />
var startTime = Date.now();<br />
highlightBlock("", defaultBreakerRegex);<br />
<br />
//output the leftovers (if any) to make sure whitespace etc. matches<br />
if (i < text.length)<br />
{<br />
writeText(text.substring(i), "");<br />
}<br />
<br />
//if highlighting took too long, disable it.<br />
var endTime = Date.now();<br />
/*if (typeof(bestTime) == "undefined")<br />
{<br />
window.bestTime = endTime - startTime;<br />
document.title = bestTime;<br />
highlightSyntaxIfNeededIntervalID = setInterval(highlightSyntax, 250);<br />
}<br />
else<br />
{<br />
if (endTime - startTime < bestTime)<br />
{<br />
bestTime = endTime - startTime;<br />
document.title = bestTime;<br />
}<br />
}//*/<br />
if (endTime - startTime > syntaxHighlighterConfig.timeout)<br />
{<br />
clearInterval(highlightSyntaxIfNeededIntervalID);<br />
wpTextbox1.removeEventListener("input", highlightSyntax);<br />
wpTextbox1.removeEventListener("scroll", syncScrollX);<br />
wpTextbox1.removeEventListener("scroll", syncScrollY);<br />
attributeObserver.disconnect();<br />
parentObserver.disconnect();<br />
syntaxStyleTextNode.nodeValue = "";<br />
<br />
var errorMessage = {<br />
ca: "S'ha desactivat el remarcar de sintaxi en aquesta pàgina perquè ha trigat massa temps. El temps màxim permès per a remarcar és $1ms, i el vostre ordinador ha trigat $2ms. Proveu tancar algunes pestanyes i programes i fer clic en \"Mostra la previsualització\" o \"Mostra els canvis\". Si no funciona això, proveu un altre navegador web, i si això no funciona, proveu un ordinador més ràpid.",<br />
de: "Die Syntaxhervorhebung wurde auf dieser Seite deaktiviert, da diese zu lange gedauert hat. Die maximal erlaubte Zeit zur Hervorhebung beträgt $1ms und dein Computer benötigte $2ms. Versuche einige Tabs und Programme zu schließen und klicke \"Vorschau zeigen\" oder \"Änderungen zeigen\". Wenn das nicht funktioniert, probiere einen anderen Webbrowser und wenn immer noch nicht, probiere einen schnelleren Computer.",<br />
el: "Η έμφαση σύνταξης έχει απενεργοποιηθεί σε αυτήν τη σελίδα γιατί αργούσε πολύ. Ο μέγιστος επιτρεπτός χρόνος για την έμφαση σύνταξης είναι $1ms και ο υπολογιστής σας έκανε $2ms. Δοκιμάστε να κλείσετε μερικές καρτέλες και προγράμματα και να κάνετε κλικ στην «Εμφάνιση προεπισκόπησης» ή στην «Εμφάνιση αλλαγών». Αν αυτό δεν δουλέψει, δοκιμάστε έναν διαφορετικό περιηγητή και αν ούτε αυτό δουλέψει, δοκιμάστε έναν ταχύτερο υπολογιστή.",<br />
en: "Syntax highlighting on this page was disabled because it took too long. The maximum allowed highlighting time is $1ms, and your computer took $2ms. Try closing some tabs and programs and clicking \"Show preview\" or \"Show changes\". If that doesn't work, try a different web browser, and if that doesn't work, try a faster computer.",<br />
es: "Se desactivó el resaltar de sintaxis en esta página porque tardó demasiado. El tiempo máximo permitido para resaltar es $1ms, y tu ordenador tardó $2ms. Prueba cerrar algunas pestañas y programas y hacer clic en \"Mostrar previsualización\" o \"Mostrar cambios\". Si no funciona esto, prueba otro navegador web, y si eso no funciona, prueba un ordenador más rápido.",<br />
fa: "از آنجایی که زمان زیادی صرف آن میشد، برجستهسازی نحو در این صفحه غیرفعال شده است. بیشینهٔ زمان برجستهسازی برای ابزار $1ms تعریف شده در حالی که رایانهٔ شما $2ms زمان نیاز داشت. میتوانید بستن برخی سربرگها و برنامهها و سپس کلیککردن دکمهٔ «پیشنمایش» یا «نمایش تغییرات» را بیازمایید. اگر جواب نداد مرورگر دیگری را امتحان کنید؛ و اگر باز هم جواب نداد، رایانهٔ سریعتری را بیازمایید.",<br />
fr: "La coloration syntaxique a été désactivée sur cette page en raison d'un temps de chargement trop important ($2ms). Le temps maximum autorisé est $1ms. Vous pouvez essayer de fermer certains onglets et programmes et cliquez sur \"Prévisualisation\" ou \"Voir mes modifications\". Si cela ne fonctionne pas, essayez un autre navigateur web, et si cela ne fonctionne toujours pas, essayez un ordinateur plus rapide.",<br />
hy: "Շարադասության ընդգծումը այս էջում անջատվել է, քանի որ այն չափից շատ է տևել։ Ընդգծման թույլատրելի առավելագույն ժամանակը $1 միլիվայրկյան է, բայց այս էջում տևել է $2 միլիվայրկյան։ Փորձեք անջատել որոշ ներդիրներ կամ ծրագրեր և սեղմել «Նախադիտել» կամ «Կատարված փոփոխությունները»։ Կրկին չաշխատելու դեպքում փորձեք այլ վեբ դիտարկիչ, եթե կրկին չաշխատի, փորձեք ավելի արագ համակարգիչ։",<br />
io: "Sintaxo-hailaitar en ca pagino esis nekapabligata pro ke konsumis tro multa tempo. La maxima permisata hailaitala tempo es $1ms, e tua ordinatro konsumis $2ms. Probez klozar kelka tabi e programi e kliktar \"Previdar\" o \"Montrez chanji\". Se to ne funcionas, probez altra brauzero, e se to ne funcionas, probez plu rapida ordinatro.",<br />
it: "L'evidenziazione delle sintassi su questa pagina è stata disabilitata perché ha richiesto troppo tempo. Il tempo massimo per l'evidenziazione è di $1ms e al tuo computer sono serviti $2ms. Prova a chiudere alcune schede e programmi e ricarica la pagina cliccando su \"Visualizza anteprima\" o \"Mostra modifiche\". Se non funziona ancora, prova con un web browser differente e, in ultima alternativa, prova ad utilizzare un computer più veloce.",<br />
ko: "이 문서에서의 문법 강조가 너무 오래 걸러서 해제되었습니다. 최대로 할당된 강조 시간은 $1ms인데, 당신의 컴퓨터는 $2ms이나 걸렸습니다. 탭과 프로그램을 일부 닫으신 후에 \"미리 보기\"나 \"차이 보기\"를 클릭하시기 바랍니다. 만약 작동하지 않으면 다른 웹 브라우저로 시도해보시고, 그래도 안되면 더 빠른 컴퓨터를 이용하십시오",<br />
pt: "O marcador de sintaxe foi desativado nesta página porque demorou demais. O tempo máximo permitido para marcar é de $1ms, e seu computador demorou $2ms. Tente fechar algumas abas e programas e clique em \"Mostrar previsão\" ou \"Mostrar alterações\". Se isso não funcionar, tente usar um outro navegador web, e se ainda não funcionar, tente em um computador mais rápido.",<br />
ru: "Подсветка синтаксиса на странице была отключена, так как заняла слишком долго. Максимальное допустимое время операции - $1мс, сейчас на вашем компьютере она заняла $2мс. Попробуйте закрыть несколько вкладок и программ, затем нажать «Предварительный просмотр» или «Внесённые изменения». Если это не поможет, попробуйте другой браузер; если и это не поможет, используйте более быстрый компьютер.",<br />
sr: "Истицање синтаксе на овој страници је онемогућено јер се одвија предуго. Максимално дозвољено време истицања је $1ms, а на Вашем рачунару траје $2ms. Покушајте затворити неке картице и програме или кликните на „Прикажи претпреглед” или „Прикажи измене”. Ако то не ради, покушајте са другим веб-прегледачем, а ако и тада не ради, покушајте са бржим рачунаром.",<br />
};<br />
var wgUserLanguage = mw.config.get("wgUserLanguage");<br />
<br />
errorMessage = errorMessage[wgUserLanguage] || errorMessage[wgUserLanguage.substring(0, wgUserLanguage.indexOf("-"))] || errorMessage.en;<br />
<br />
wpTextbox1.style.backgroundColor = "";<br />
wpTextbox1.style.marginTop = wpTextbox0.style.marginTop;<br />
wpTextbox0.removeAttribute("dir");<br />
wpTextbox0.removeAttribute("lang");<br />
wpTextbox0.setAttribute("style", "color:red; font-size:small");<br />
<br />
wpTextbox0.textContent = errorMessage.replace("$1", syntaxHighlighterConfig.timeout).replace("$2", endTime - startTime);<br />
return;<br />
}<br />
<br />
//do we have enough span elements to match the generated CSS?<br />
//this step isn't included in the above benchmark because it takes a highly variable amount of time<br />
if (maxSpanNumber < spanNumber)<br />
{<br />
var fragment = document.createDocumentFragment();<br />
do<br />
{<br />
fragment.appendChild(document.createElement("span")).id = "s" + ++maxSpanNumber;<br />
}<br />
while (maxSpanNumber < spanNumber);<br />
wpTextbox0.appendChild(fragment);<br />
}<br />
<br />
/* finish CSS: move the extra '} from the beginning to the end and CSS-<br />
escape newlines. CSS ignores the space after the hex code of the<br />
escaped character */<br />
syntaxStyleTextNode.nodeValue = css.substring(2).replace(/\n/g, "\\A ") + "'}";<br />
}<br />
<br />
function syncScrollX()<br />
{<br />
//console.log("syncScrollX");<br />
wpTextbox0.scrollLeft = wpTextbox1.scrollLeft;<br />
}<br />
<br />
function syncScrollY()<br />
{<br />
//console.log("syncScrollY");<br />
wpTextbox0.scrollTop = wpTextbox1.scrollTop;<br />
}<br />
<br />
function syncTextDirection()<br />
{<br />
wpTextbox0.dir = wpTextbox1.dir;<br />
}<br />
<br />
function syncParent()<br />
{<br />
if (wpTextbox1.previousSibling != wpTextbox0)<br />
{<br />
wpTextbox1.parentNode.insertBefore(wpTextbox0, wpTextbox1);<br />
parentObserver.disconnect();<br />
parentObserver.observe(wpTextbox1.parentNode, {childList: true});<br />
}<br />
}<br />
<br />
//this function runs once every 500ms to detect changes to wpTextbox1's text that the input event does not catch<br />
//this happens when another script changes the text without knowing that the syntax highlighter needs to be informed<br />
function highlightSyntaxIfNeeded()<br />
{<br />
if (wpTextbox1.value != lastText)<br />
{<br />
highlightSyntax();<br />
}<br />
if (wpTextbox1.scrollLeft != wpTextbox0.scrollLeft)<br />
{<br />
//console.log("Box1syncScrollX");<br />
syncScrollX();<br />
}<br />
if (wpTextbox1.scrollTop != wpTextbox0.scrollTop)<br />
{<br />
//console.log("Box1syncScrollY");<br />
syncScrollY();<br />
}<br />
if (wpTextbox1.offsetHeight != wpTextbox0.offsetHeight)<br />
{<br />
var height = wpTextbox1.offsetHeight + "px";<br />
wpTextbox0.style.height = height;<br />
wpTextbox1.style.marginTop = "-" + height;<br />
}<br />
}<br />
<br />
function setup()<br />
{<br />
function configureColor(parameterName, hardcodedFallback, defaultOk)<br />
{<br />
if (typeof(syntaxHighlighterConfig[parameterName]) == "undefined")<br />
{<br />
syntaxHighlighterConfig[parameterName] = syntaxHighlighterSiteConfig[parameterName];<br />
}<br />
<br />
if (syntaxHighlighterConfig[parameterName] == "normal")<br />
{<br />
syntaxHighlighterConfig[parameterName] = hardcodedFallback;<br />
}<br />
else if (typeof(syntaxHighlighterConfig[parameterName]) != "undefined")<br />
{<br />
return;<br />
}<br />
else if (typeof(syntaxHighlighterConfig.defaultColor) != "undefined" && defaultOk)<br />
{<br />
syntaxHighlighterConfig[parameterName] = syntaxHighlighterConfig.defaultColor;<br />
}<br />
else<br />
{<br />
syntaxHighlighterConfig[parameterName] = hardcodedFallback;<br />
}<br />
}<br />
<br />
window.syntaxHighlighterSiteConfig = window.syntaxHighlighterSiteConfig || {};<br />
window.syntaxHighlighterConfig = window.syntaxHighlighterConfig || {};<br />
<br />
//use 3-digit colors instead of 6-digit colors for performance<br />
// See for example http://maettig.com/?page=PHP/CSS_Color_Converter<br />
configureColor("backgroundColor", "#FFF", false); //white<br />
configureColor("foregroundColor", "#000", false); //black<br />
configureColor("boldOrItalicColor", "#EEE", true); //gray<br />
configureColor("commentColor", "#EFE", true); //green<br />
configureColor("entityColor", "#DFD", true); //green<br />
configureColor("externalLinkColor", "#EFF", true); //cyan<br />
configureColor("headingColor", "#EEE", true); //gray<br />
configureColor("hrColor", "#EEE", true); //gray<br />
configureColor("listOrIndentColor", "#EFE", true); //green<br />
configureColor("parameterColor", "#FC6", true); //orange<br />
configureColor("signatureColor", "#FC6", true); //orange<br />
configureColor("tagColor", "#FEF", true); //pink<br />
configureColor("tableColor", "#FFC", true); //yellow<br />
configureColor("templateColor", "#FFC", true); //gray <br />
configureColor("templTextTermColor", "#888", true); //gray<br />
configureColor("templTypeTextTermColor", "#888", true); //gray<br />
configureColor("templNewTextTermColor", "#BBB", true); //gray light<br />
configureColor("templTypeNewTextTermColor", "#BBB", true); //gray light<br />
configureColor("templNonRefTermColor", "#FEF", true); //pink<br />
configureColor("templRefNumberColor", "#E9E", true); //pink<br />
configureColor("templNoteColor", "#EFE", true); //green<br />
configureColor("templNoteTermColor", "#484", true); //green<br />
configureColor("templTypeNoteColor", "#7C7", true); //green<br />
configureColor("wikilinkColor", "#EEF", true); //blue<br />
<br />
//tag lists are ordered from most common to least common<br />
syntaxHighlighterConfig.nowikiTags = syntaxHighlighterConfig.nowikiTags || syntaxHighlighterSiteConfig.nowikiTags || ["nowiki", "pre"];<br />
syntaxHighlighterConfig.sourceTags = syntaxHighlighterConfig.sourceTags || syntaxHighlighterSiteConfig.sourceTags || ["math", "syntaxhighlight", "source", "timeline", "hiero"];<br />
syntaxHighlighterConfig.timeout = syntaxHighlighterConfig.timeout || syntaxHighlighterSiteConfig.timeout || 50;<br />
<br />
syntaxHighlighterConfig.nowikiTags.forEach(function(tagName) {<br />
nowikiTagBreakerRegexCache[tagName] = nowikiTagBreakerRegex(tagName);<br />
});<br />
<br />
wpTextbox0 = document.createElement("div");<br />
wpTextbox1 = document.getElementById("wpTextbox1");<br />
<br />
var syntaxStyleElement = document.createElement("style");<br />
syntaxStyleTextNode = syntaxStyleElement.appendChild(document.createTextNode(""));<br />
<br />
//the styling of the textbox and the background div must be kept very similar<br />
var wpTextbox1Style = window.getComputedStyle(wpTextbox1);<br />
<br />
//horizontal resize would look horribly choppy, better to make the user resize the browser window instead<br />
var resize = (wpTextbox1Style.resize == "vertical" || wpTextbox1Style.resize == "both" ? "vertical" : "none");<br />
<br />
wpTextbox0.dir = wpTextbox1.dir;<br />
wpTextbox0.id = "wpTextbox0";<br />
wpTextbox0.lang = wpTextbox1.lang; //lang determines which font "monospace" is<br />
wpTextbox0.style.backgroundColor = syntaxHighlighterConfig.backgroundColor;<br />
wpTextbox0.style.border = "1px solid transparent";<br />
wpTextbox0.style.boxSizing = "border-box";<br />
wpTextbox0.style.clear = wpTextbox1Style.clear;<br />
wpTextbox0.style.color = "transparent"; //makes it look just a little bit smoother<br />
wpTextbox0.style.fontFamily = wpTextbox1Style.fontFamily;<br />
wpTextbox0.style.fontSize = wpTextbox1Style.fontSize;<br />
wpTextbox0.style.lineHeight = "normal";<br />
wpTextbox0.style.marginBottom = "0";<br />
wpTextbox0.style.marginLeft = "0";<br />
wpTextbox0.style.marginRight = "0";<br />
wpTextbox0.style.marginTop = wpTextbox1Style.marginTop;<br />
wpTextbox0.style.overflowX = "auto";<br />
wpTextbox0.style.overflowY = "scroll";<br />
wpTextbox0.style.resize = resize;<br />
wpTextbox0.style.tabSize = wpTextbox1Style.tabSize;<br />
wpTextbox0.style.whiteSpace = "pre-wrap";<br />
wpTextbox0.style.width = "100%";<br />
wpTextbox0.style.wordWrap = "normal"; //see below<br />
<br />
wpTextbox1.style.backgroundColor = "transparent";<br />
wpTextbox1.style.border = "1px inset gray";<br />
wpTextbox1.style.boxSizing = "border-box";<br />
wpTextbox1.style.color = syntaxHighlighterConfig.foregroundColor;<br />
wpTextbox1.style.fontSize = wpTextbox1Style.fontSize; //resolves alignment problems on mobile chrome<br />
wpTextbox1.style.lineHeight = "normal";<br />
wpTextbox1.style.marginBottom = wpTextbox1Style.marginBottom; //lock to pixel value because the top margin was also locked to a pixel value when it was moved to wpTextbox0<br />
wpTextbox1.style.marginLeft = "0";<br />
wpTextbox1.style.marginRight = "0";<br />
wpTextbox1.style.overflowX = "auto";<br />
wpTextbox1.style.overflowY = "scroll";<br />
wpTextbox1.style.padding = "0";<br />
wpTextbox1.style.resize = resize;<br />
wpTextbox1.style.width = "100%";<br />
wpTextbox1.style.wordWrap = "normal"; //overall more visually appealing<br />
<br />
// https://bugzilla.mozilla.org/show_bug.cgi?id=1301290<br />
if (layoutEngine == "gecko")<br />
{<br />
wpTextbox0.style.isolation = "isolate";<br />
wpTextbox1.style.isolation = "isolate";<br />
}<br />
<br />
//lock both heights to pixel values so that the browser zoom feature works better<br />
wpTextbox1.style.height = wpTextbox0.style.height = wpTextbox1.offsetHeight + "px";<br />
<br />
//insert wpTextbox0 underneath wpTextbox1<br />
wpTextbox1.style.marginTop = -wpTextbox1.offsetHeight + "px";<br />
wpTextbox1.parentNode.insertBefore(wpTextbox0, wpTextbox1);<br />
<br />
document.head.appendChild(syntaxStyleElement);<br />
<br />
wpTextbox1.addEventListener("input", highlightSyntax);<br />
//console.log("Box1ListenersyncScroll");<br />
wpTextbox1.addEventListener("scroll", syncScrollX);<br />
wpTextbox1.addEventListener("scroll", syncScrollY);<br />
attributeObserver = new MutationObserver(syncTextDirection);<br />
attributeObserver.observe(wpTextbox1, {attributes: true});<br />
parentObserver = new MutationObserver(syncParent);<br />
parentObserver.observe(wpTextbox1.parentNode, {childList: true});<br />
highlightSyntaxIfNeededIntervalID = setInterval(highlightSyntaxIfNeeded, 500);<br />
highlightSyntax();<br />
}<br />
<br />
<br />
//enable the highlighter only when editing wikitext pages<br />
//in the future a separate parser could be added for CSS and JS pages<br />
//blacklist Internet Explorer and Edge, they're just too broken<br />
var wgAction = mw.config.get("wgAction");<br />
var layoutEngine = $.client.profile().layout;<br />
if ((wgAction == "edit" || wgAction == "submit") && mw.config.get("wgPageContentModel") == "wikitext" && layoutEngine != "trident" && layoutEngine != "edge")<br />
{<br />
//give other scripts an opportunity to set syntaxHighlighterConfig<br />
if (document.readyState == "complete")<br />
{<br />
setup();<br />
}<br />
else<br />
{<br />
$(window).load(setup);<br />
}<br />
}<br />
})();</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=MediaWiki:Gadget-refToolbar.js&diff=12940
MediaWiki:Gadget-refToolbar.js
2017-06-09T09:42:02Z
<p>Nicolas Brouard: Adding TextTerm</p>
<hr />
<div>/**<br />
* RefToolbar<br />
*<br />
* Adds tools for citing references to the edit toolbar.<br />
* See [[Wikipedia:RefToolbar]] for further documentation. One of<br />
* three possible versions will load (Reftoolbar 2.0b, Reftoolbar 2.0a,<br />
* or Reftoolbar 1.0) depending on the user preferences (the<br />
* usebetatoolbar and usebetatoolbar-cgd parameters).<br />
*<br />
* @see: [[Wikipedia:RefToolbar]]<br />
* @see: [[MediaWiki:RefToolbar.js]]<br />
* @see: [[MediaWiki:RefToolbarConfig.js]]<br />
* @see: [[MediaWiki:RefToolbarLegacy.js]]<br />
* @see: [[MediaWiki:RefToolbarMessages-en.js]]<br />
* @see: [[MediaWiki:RefToolbarMessages-de.js]]<br />
* @see: [[MediaWiki:RefToolbarNoDialogs.js]]<br />
* @see: [[MediaWiki:Gadget-refToolbarBase.js]]<br />
* @author: [[User:Mr.Z-man]]<br />
* @author: [[User:Kaldari]]<br />
*/<br />
/*jshint browser: true, camelcase: true, curly: true, eqeqeq: true */<br />
/*global jQuery, mediaWiki, importScript */<br />
( function ( mw, $ ) {<br />
'use strict';<br />
function initializeRefTools() {<br />
if ( window.refToolbarInstalled || $( '#wpTextbox1[readonly]' ).length ){<br />
return;<br />
}<br />
// using weak comparison because ("0") is true, but ("0" == true) is false <br />
if ( mw.user.options.get( 'usebetatoolbar' ) == true ) {<br />
// Enhanced editing toolbar is on. Going to load RefToolbar 2.0a or 2.0b.<br />
if ( mw.user.options.get( 'usebetatoolbar-cgd' ) == true ) {<br />
// Dialogs are on. Loading 2.0b. (standard)<br />
// TODO:<br />
// * Explicitly declare global variables from [[MediaWiki:RefToolbar.js]] using window.*<br />
// * Move [[MediaWiki:RefToolbar.js]] to [[MediaWiki:Gadget-refToolbarDialogs.js]]<br />
// * Create the module 'ext.gadget.refToolbarDialogs' depending on 'ext.gadget.refToolbarBase' and 'ext.wikiEditor.toolbar'<br />
// * Replace the code below by mw.loader.load( 'ext.gadget.refToolbarDialogs' );<br />
mw.loader.using( [ 'ext.gadget.refToolbarBase', 'ext.wikiEditor.toolbar' ], function () {<br />
importScript( 'MediaWiki:RefToolbar.js' );<br />
} );<br />
} else {<br />
// Dialogs are off. Loading 2.0a.<br />
mw.loader.using( 'ext.wikiEditor.toolbar', function () {<br />
importScript( 'MediaWiki:RefToolbarNoDialogsTextTerm.js' );<br />
} );<br />
}<br />
} else if ( mw.user.options.get( 'showtoolbar' ) ) {<br />
// Enhanced editing toolbar is off. Loading RefToolbar 1.0. (legacy)<br />
importScript( 'MediaWiki:RefToolbarLegacy.js' );<br />
} else {<br />
return;<br />
}<br />
window.refToolbarInstalled = true;<br />
}<br />
<br />
if ( $.inArray( mw.config.get( 'wgAction' ), [ 'edit', 'submit' ] ) !== -1 ) {<br />
// Double check if user.options is loaded, to prevent errors when copy pasted accross installations<br />
$.when( mw.loader.using( ['user.options'] ), $.ready ).done( initializeRefTools );<br />
}<br />
<br />
}( mediaWiki, jQuery ) );</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=MediaWiki:RefToolbarTextTerm.js&diff=12954
MediaWiki:RefToolbarTextTerm.js
2017-06-09T09:41:07Z
<p>Nicolas Brouard: Identical to new RefToolbar.js</p>
<hr />
<div>/*jshint smarttabs:true, loopfunc:true,forin:false*/<br />
/*global mw, $, importScript */<br />
// TODO: make autodate an option in the CiteTemplate object, not a preference<br />
<br />
// Global object<br />
// TODO:<br />
// * Remove this once the page is moved to a module 'ext.gadget.refToolbarDialogs' depending on 'ext.gadget.refToolbarBase'<br />
if (typeof CiteTB === 'undefined') {<br />
var CiteTB = {<br />
"Templates" : {}, // All templates<br />
"Options" : {}, // Global options<br />
"UserOptions" : {}, // User options<br />
"DefaultOptions" : {}, // Script defaults<br />
"ErrorChecks" : {} // Error check functions<br />
};<br />
}<br />
<br />
// Only execute on edit, unless it is a user JS/CSS page<br />
// TODO: Remove tests already done by [[MediaWiki:Gadget-refToolbar.js]]<br />
if (<br />
( mw.config.get('wgAction') === 'edit' || mw.config.get('wgAction') === 'submit' ) &&<br />
( ( mw.config.get('wgNamespaceNumber') !== 2 && mw.config.get('wgNamespaceNumber') !== 4 ) ||<br />
( mw.config.get('wgPageName').indexOf('.js') === -1 && mw.config.get('wgPageName').indexOf('.css') === -1 ) )<br />
) {<br />
<br />
// TODO: Move this to [[MediaWiki:Gadget-refToolbarDialogs.css]] and add it to the definition of module 'ext.gadget.refToolbarDialogs'<br />
mw.util.addCSS(".cite-form-td {"+<br />
"height: 0 !important;"+<br />
"padding: 0.1em !important;"+<br />
"}"); <br />
<br />
// Default options, these mainly exist so the script won't break if a new option is added<br />
CiteTB.DefaultOptions = {<br />
"date format" : "<year>-<zmonth>-<zdate>",<br />
"autodate fields" : [],<br />
"months" : ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],<br />
"modal" : true,<br />
"autoparse" : false,<br />
"expandtemplates": false<br />
};<br />
<br />
// Get an option - user settings override global which override defaults<br />
CiteTB.getOption = function(opt) {<br />
if (CiteTB.UserOptions[opt] !== undefined) {<br />
return CiteTB.UserOptions[opt];<br />
} else if (CiteTB.Options[opt] !== undefined) {<br />
return CiteTB.Options[opt];<br />
}<br />
return CiteTB.DefaultOptions[opt];<br />
};<br />
<br />
CiteTB.init = function() {<br />
/* Main stuff, build the actual toolbar structure<br />
* 1. get the template list, make the dropdown list and set up the template dialog boxes<br />
* 2. actually build the toolbar:<br />
* * A section for cites<br />
* ** dropdown for the templates (previously defined)<br />
* ** button for named refs with a dialog box<br />
* ** button for errorcheck<br />
* 3. add the whole thing to the main toolbar<br />
*/<br />
<br />
if (typeof $('div[rel=cites]')[0] !== 'undefined') { // Mystery IE bug workaround<br />
return;<br />
}<br />
$('head').trigger('reftoolbarbase');<br />
var $target = $('#wpTextbox1');<br />
var temlist = {};<br />
for (var t in CiteTB.Templates) {<br />
var tem = CiteTB.Templates[t];<br />
var sform = CiteTB.escStr(tem.shortform);<br />
var actionobj = { <br />
type: 'dialog',<br />
module: 'cite-dialog-'+sform<br />
};<br />
var dialogobj = {};<br />
dialogobj['cite-dialog-'+sform] = {<br />
resizeme: false,<br />
titleMsg: 'cite-dialog-'+sform, <br />
id: 'citetoolbar-'+sform,<br />
init: function() {}, <br />
html: tem.getInitial(), <br />
dialog: {<br />
width:675,<br />
open: function() { <br />
$(this).html(CiteTB.getOpenTemplate().getForm());<br />
/** @param {jQuery.Event} e */<br />
$('.cite-prev-parse').bind( 'click', function ( e ) {<br />
e.preventDefault();<br />
CiteTB.prevParseClick();<br />
});<br />
},<br />
buttons: {<br />
'cite-form-submit': function() {<br />
var ref = CiteTB.getRef(false, true);<br />
$(this).dialog( 'close' );<br />
$.wikiEditor.modules.toolbar.fn.doAction( $(this).data( 'context' ), {<br />
type: 'encapsulate',<br />
options: {<br />
post: ref<br />
}<br />
}, $(this) );<br />
},<br />
'cite-form-showhide': CiteTB.showHideExtra,<br />
'cite-refpreview': function() { <br />
var ref = CiteTB.getRef(false, false);<br />
var template = CiteTB.getOpenTemplate();<br />
var div = $("#citetoolbar-"+CiteTB.escStr(template.shortform));<br />
div.find('.cite-preview-label').show();<br />
div.find('.cite-ref-preview').text(ref).show();<br />
if (CiteTB.getOption('autoparse')) {<br />
CiteTB.prevParseClick();<br />
} else {<br />
div.find('.cite-prev-parse').show();<br />
div.find('.cite-prev-parsed-label').hide();<br />
div.find('.cite-preview-parsed').html('');<br />
} <br />
},<br />
'wikieditor-toolbar-tool-link-cancel': function() {<br />
$(this).dialog( 'close' );<br />
},<br />
'cite-form-reset': function() {<br />
CiteTB.resetForm();<br />
}<br />
}<br />
} <br />
};<br />
$target.wikiEditor('addDialog', dialogobj);<br />
//if (!CiteTB.getOption('modal')) {<br />
//$('#citetoolbar-'+sform).dialog('option', 'modal', false);<br />
//}<br />
temlist[sform] = {label: tem.templatename, action: actionobj }; <br />
}<br />
<br />
var refsection = {<br />
'sections': {<br />
'cites': { <br />
type: 'toolbar', <br />
labelMsg: 'cite-section-label',<br />
groups: { <br />
'template': {<br />
tools: {<br />
'template': {<br />
type: 'select',<br />
labelMsg: 'cite-template-list',<br />
list: temlist<br />
} <br />
}<br />
},<br />
'namedrefs': {<br />
labelMsg: 'cite-named-refs-label',<br />
tools: {<br />
'nrefs': {<br />
type: 'button',<br />
action: {<br />
type: 'dialog',<br />
module: 'cite-toolbar-namedrefs'<br />
},<br />
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/b/be/Nuvola_clipboard_lined.svg/22px-Nuvola_clipboard_lined.svg.png',<br />
section: 'cites',<br />
group: 'namedrefs',<br />
labelMsg: 'cite-named-refs-button'<br />
}<br />
}<br />
},<br />
'errorcheck': {<br />
labelMsg: 'cite-errorcheck-label',<br />
tools: {<br />
'echeck': {<br />
type: 'button',<br />
action: {<br />
type: 'dialog',<br />
module: 'cite-toolbar-errorcheck' <br />
},<br />
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/a/a3/Nuvola_apps_korganizer-NO.png/22px-Nuvola_apps_korganizer-NO.png',<br />
section: 'cites',<br />
group: 'errorcheck',<br />
labelMsg: 'cite-errorcheck-button'<br />
}<br />
}<br />
}<br />
} <br />
} <br />
} <br />
};<br />
<br />
var defaultdialogs = { <br />
'cite-toolbar-errorcheck': {<br />
titleMsg: 'cite-errorcheck-label',<br />
id: 'citetoolbar-errorcheck',<br />
resizeme: false,<br />
init: function() {},<br />
html: '<div id="cite-namedref-loading">'+<br />
'<img src="//upload.wikimedia.org/wikipedia/commons/4/42/Loading.gif" />'+<br />
'&nbsp;'+mw.usability.getMsg('cite-loading')+'</div>',<br />
dialog: {<br />
width:550,<br />
open: function() { <br />
CiteTB.loadRefs();<br />
},<br />
buttons: {<br />
'cite-errorcheck-submit': function() {<br />
var errorchecks = $("input[name='cite-err-test']:checked");<br />
var errors = [];<br />
for (var i=0; i<errorchecks.length; i++) {<br />
errors = errors.concat(CiteTB.ErrorChecks[$(errorchecks[i]).val()].run());<br />
}<br />
CiteTB.displayErrors(errors);<br />
$(this).dialog( 'close' ); <br />
},<br />
'wikieditor-toolbar-tool-link-cancel': function() {<br />
$(this).dialog( 'close' );<br />
}<br />
}<br />
}<br />
},<br />
'cite-toolbar-namedrefs': {<br />
titleMsg: 'cite-named-refs-title',<br />
resizeme: false,<br />
id: 'citetoolbar-namedrefs',<br />
html: '<div id="cite-namedref-loading">'+<br />
'<img src="//upload.wikimedia.org/wikipedia/commons/4/42/Loading.gif" />'+<br />
'&nbsp;'+mw.usability.getMsg('cite-loading')+'</div>',<br />
init: function() {},<br />
dialog: {<br />
width: 550,<br />
open: function() { <br />
CiteTB.loadRefs();<br />
},<br />
buttons: {<br />
'cite-form-submit': function() {<br />
var refname = $("#cite-namedref-select").val();<br />
if (refname === '') {<br />
return;<br />
}<br />
$(this).dialog( 'close' );<br />
$.wikiEditor.modules.toolbar.fn.doAction( $(this).data( 'context' ), {<br />
type: 'encapsulate',<br />
options: {<br />
post: CiteTB.getNamedRef(refname, true)<br />
}<br />
}, $(this) );<br />
},<br />
'wikieditor-toolbar-tool-link-cancel': function() {<br />
$(this).dialog( 'close' );<br />
} <br />
}<br />
} <br />
}<br />
};<br />
<br />
$target.wikiEditor('addDialog', defaultdialogs);<br />
$('#citetoolbar-namedrefs').unbind('dialogopen');<br />
if (!CiteTB.getOption('modal')) {<br />
//$('#citetoolbar-namedrefs').dialog('option', 'modal', false);<br />
//$('#citetoolbar-errorcheck').dialog('option', 'modal', false);<br />
mw.util.addCSS(".ui-widget-overlay {"+<br />
"display:none !important;"+<br />
"}"); <br />
}<br />
$target.wikiEditor('addToToolbar', refsection);<br />
};<br />
<br />
// Load local data - messages, cite templates, etc.<br />
$(document).ready( function() {<br />
switch( mw.config.get('wgUserLanguage') ) {<br />
case 'de': // German<br />
importScript('MediaWiki:RefToolbarMessages-de.js');<br />
break;<br />
default: // English<br />
importScript('MediaWiki:RefToolbarMessages-en.js');<br />
}<br />
});<br />
<br />
// Setup the main object<br />
CiteTB.mainRefList = [];<br />
CiteTB.refsLoaded = false;<br />
<br />
// REF FUNCTIONS<br />
// Actually assemble a ref from user input<br />
CiteTB.getRef = function(inneronly, forinsert) {<br />
var i;<br />
var template = CiteTB.getOpenTemplate();<br />
var templatename = template.templatename;<br />
var res = '';<br />
var refobj = {'shorttag':false};<br />
if (!inneronly) {<br />
var group = $('#cite-'+CiteTB.escStr(template.shortform)+'-group').val();<br />
var refname = $('#cite-'+CiteTB.escStr(template.shortform)+'-name').val();<br />
res += '<ref';<br />
if (refname) {<br />
refname = $.trim(refname);<br />
res+=' name='+CiteTB.getQuotedString(refname);<br />
refobj.refname = refname;<br />
}<br />
if (group) {<br />
group = $.trim(group);<br />
res+=' group='+CiteTB.getQuotedString(group);<br />
refobj.refgroup = group;<br />
}<br />
res+='>';<br />
}<br />
var content ='{{'+templatename;<br />
for( g in template.incrementables ) {<br />
group = template.incrementables[g];<br />
for (i=1; i<=group.val; i++) {<br />
for (j=0; j<group.fields.length; j++) {<br />
var fieldname = group.fields[j].field;<br />
var fieldid = fieldname.replace('<N>', i.toString());<br />
var field = $('#cite-'+CiteTB.escStr(template.shortform)+'-'+fieldid).val();<br />
if (field) {<br />
content+='|'+fieldid+'=';<br />
content+= $.trim(field);<br />
}<br />
}<br />
}<br />
}<br />
for( i=0; i<template.basic.length; i++ ) {<br />
if (template.basic[i].increment_group) {<br />
continue;<br />
}<br />
var fieldname = template.basic[i].field;<br />
var field = $('#cite-'+CiteTB.escStr(template.shortform)+'-'+fieldname).val();<br />
if (field) {<br />
content+='|'+fieldname+'=';<br />
content+= $.trim(field);<br />
}<br />
}<br />
if ($('#cite-form-status').val() !== 'closed') {<br />
for( i=0; i<template.extra.length; i++ ) {<br />
if (template.extra[i].increment_group) {<br />
continue;<br />
}<br />
var fieldname = template.extra[i].field;<br />
var field = $('#cite-'+CiteTB.escStr(template.shortform)+'-'+fieldname).val();<br />
if (field) {<br />
content+='|'+fieldname+'=';<br />
content+= $.trim(field);<br />
}<br />
}<br />
}<br />
content+= '}}';<br />
res+=content;<br />
refobj.content = content;<br />
if (!inneronly) {<br />
res+= '</ref>';<br />
}<br />
if (forinsert) {<br />
CiteTB.mainRefList.push(refobj);<br />
}<br />
return res;<br />
};<br />
<br />
// Make a reference to a named ref<br />
CiteTB.getNamedRef = function(refname, forinsert) {<br />
if (forinsert) {<br />
CiteTB.mainRefList.push( {'shorttag':true, 'refname':refname} );<br />
}<br />
return '<ref name='+CiteTB.getQuotedString(refname)+' />'; <br />
};<br />
<br />
// Function to load the ref list<br />
CiteTB.loadRefs = function() {<br />
if (CiteTB.refsLoaded) {<br />
return;<br />
}<br />
CiteTB.getPageText(CiteTB.loadRefsInternal);<br />
};<br />
<br />
// Function that actually loads the list from the page text<br />
CiteTB.loadRefsInternal = function(text) { <br />
// What this does: extract first name/group extract second name/group shorttag inner content<br />
var refsregex = /< *ref(?: +(name|group) *= *(?:"([^"]*?)"|'([^']*?)'|([^ '"\/\>]*?)) *)? *(?: +(name|group) *= *(?:"([^"]*?)"|'([^']*?)'|([^ '"\/\>]*?)) *)? *(?:\/ *>|>((?:.|\n)*?)< *\/ *ref *>)/gim;<br />
// This should work regardless of the quoting used for names/groups and for linebreaks in the inner content <br />
while (true) {<br />
var ref = refsregex.exec(text);<br />
if (ref === null) {<br />
break;<br />
}<br />
var refobj = {};<br />
if (ref[9]) { // Content + short tag check<br />
//alert('"'+ref[9]+'"');<br />
refobj.content = ref[9]; <br />
refobj.shorttag = false;<br />
} else {<br />
refobj.shorttag = true;<br />
}<br />
if (ref[1] !== '') { // First name/group<br />
if (ref[2]) {<br />
refobj['ref'+ref[1]] = ref[2];<br />
} else if (ref[3]) {<br />
refobj['ref'+ref[1]] = ref[3];<br />
} else {<br />
refobj['ref'+ref[1]] = ref[4];<br />
}<br />
}<br />
if (ref[5] !== '') { // Second name/group<br />
if (ref[6]) {<br />
refobj['ref'+ref[5]] = ref[6];<br />
} else if (ref[7]) {<br />
refobj['ref'+ref[5]] = ref[7];<br />
} else {<br />
refobj['ref'+ref[5]] = ref[8];<br />
}<br />
}<br />
CiteTB.mainRefList.push(refobj);<br />
}<br />
CiteTB.refsLoaded = true;<br />
CiteTB.setupErrorCheck();<br />
CiteTB.setupNamedRefs();<br />
};<br />
<br />
// AJAX FUNCTIONS<br />
// Parse some wikitext and hand it off to a callback function<br />
CiteTB.parse = function(text, callback) {<br />
$.post( mw.util.wikiScript( 'api' ),<br />
{action:'parse', title:mw.config.get('wgPageName'), text:text, prop:'text', format:'json'},<br />
function(data) {<br />
var html = data.parse.text['*'];<br />
callback(html);<br />
},<br />
'json'<br />
); <br />
};<br />
<br />
// Use the API to expand templates on some text<br />
CiteTB.expandtemplates = function(text, callback) {<br />
$.post( mw.util.wikiScript( 'api' ),<br />
{action:'expandtemplates', title:mw.config.get('wgPageName'), text:text, format:'json'},<br />
function(data) {<br />
var restext = data.expandtemplates['*'];<br />
callback(restext);<br />
},<br />
'json'<br />
);<br />
};<br />
<br />
// Function to get the page text<br />
CiteTB.getPageText = function(callback) {<br />
var section = $("input[name='wpSection']").val();<br />
if ( section !== '' ) {<br />
var postdata = {action:'query', prop:'revisions', rvprop:'content', pageids:mw.config.get('wgArticleId'), format:'json'};<br />
if (CiteTB.getOption('expandtemplates')) {<br />
postdata.rvexpandtemplates = '1';<br />
}<br />
$.get( mw.util.wikiScript( 'api' ),<br />
postdata,<br />
function(data) {<br />
var pagetext = data.query.pages[mw.config.get('wgArticleId').toString()].revisions[0]['*'];<br />
callback(pagetext);<br />
},<br />
'json'<br />
);<br />
} else {<br />
if (CiteTB.getOption('expandtemplates')) {<br />
CiteTB.expandtemplates($('#wpTextbox1').wikiEditor('getContents').text(), callback);<br />
} else {<br />
callback($('#wpTextbox1').wikiEditor('getContents').text());<br />
}<br />
}<br />
};<br />
<br />
// Autofill a template from an ID (ISBN, DOI, PMID, URL)<br />
CiteTB.initAutofill = function() {<br />
var elemid = $(this).attr('id');<br />
var res = /^cite\-auto\-(.*?)\-(.*)\-(.*)$/.exec(elemid);<br />
var tem = res[1];<br />
var field = res[2];<br />
var autotype = res[3];<br />
var id = $('#cite-'+tem+'-'+field).val();<br />
if (!id) {<br />
return false;<br />
}<br />
var url = '//tools.wmflabs.org/reftoolbar/lookup.php?';<br />
url+=autotype+'='+encodeURIComponent(id);<br />
url+='&template='+encodeURIComponent(tem);<br />
var s = document.createElement('script');<br />
s.setAttribute('src', url);<br />
s.setAttribute('type', 'text/javascript');<br />
document.getElementsByTagName('head')[0].appendChild(s);<br />
return false;<br />
};<br />
<br />
// Callback for autofill<br />
//TODO: Autofill the URL, at least for DOI<br />
CiteTB.autoFill = function(data, template, type) {<br />
var cl = 'cite-'+template+'-';<br />
var i,j, coauthors;<br />
$('.'+cl+'title').val(data.title);<br />
// Fill in authors<br />
if (data.authors && data.authors.length > 0) {<br />
if ($('.'+cl+'last-incr-1').length != 0) {<br />
var classes = $('.'+cl+'last-incr-1').eq(0).attr('class').split(/\s+/);<br />
var group = false;<br />
var patt = /cite-[^-]*?-incr-(.*)/<br />
for (var c=0; c<classes.length; c++) {<br />
if (patt.exec(classes[c])) {<br />
group = patt.exec(classes[c])[1];<br />
break;<br />
}<br />
}<br />
$('.'+cl+'last-incr-1').val(data.authors[0][0])<br />
$('.'+cl+'first-incr-1').val(data.authors[0][1])<br />
elemid = '#cite-incr-'+template+'-'+group;<br />
for (var i=2; i<data.authors.length+1; i++) {<br />
$(elemid).click();<br />
$('.'+cl+'last-incr-'+i.toString()).val(data.authors[i-1][0])<br />
$('.'+cl+'first-incr-'+i.toString()).val(data.authors[i-1][1])<br />
}<br />
} else if ($('.'+cl+'author-incr-1').length != 0) {<br />
var classes = $('.'+cl+'author-incr-1').eq(0).attr('class').split(/\s+/);<br />
var group = false;<br />
var patt = /cite-[^-]*?-incr-(.*)/<br />
for (var c=0; c<classes.length; c++) {<br />
if (patt.exec(classes[c])) {<br />
group = patt.exec(classes[c])[1];<br />
break;<br />
}<br />
}<br />
$('.'+cl+'author-incr-1').val(data.authors[0].join(', '))<br />
elemid = '#cite-incr-'+template+'-'+group;<br />
for (var i=2; i<data.authors.length+1; i++) {<br />
$(elemid).click();<br />
$('.'+cl+'author-incr-'+i.toString()).val(data.authors[i-1].join(', '))<br />
}<br />
} else if ($('.'+cl+'last1').length != 0) {<br />
for(i=0; data.authors && i<data.authors.length; i++) {<br />
if ($('.'+cl+'last'+(i+1)).length) {<br />
$('.'+cl+'last'+(i+1)).val(data.authors[i][0]);<br />
$('.'+cl+'first'+(i+1)).val(data.authors[i][1]);<br />
} else {<br />
coauthors = [];<br />
for(j=i; j<data.authors.length; j++) {<br />
coauthors.push(data.authors[j].join(', '));<br />
}<br />
$('.'+cl+'coauthors').val(coauthors.join('; '));<br />
break;<br />
}<br />
}<br />
} else if($('.'+cl+'author1').length !== 0) {<br />
for(i=0; data.authors && i<data.authors.length; i++) {<br />
if ($('.'+cl+'author'+(i+1)).length) {<br />
$('.'+cl+'author'+(i+1)).val(data.authors[i].join(', '));<br />
} else {<br />
coauthors = [];<br />
for(j=i; j<data.authors.length; j++) {<br />
coauthors.push(data.authors[j].join(', '));<br />
}<br />
$('.'+cl+'coauthors').val(coauthors.join('; '));<br />
break;<br />
}<br />
}<br />
} else {<br />
var authors = [];<br />
for(i=0; data.authors && i<data.authors.length; i++) {<br />
authors.push(data.authors[i].join(', '));<br />
}<br />
$('.'+cl+'authors').val(authors.join('; '));<br />
}<br />
}<br />
<br />
if (type === 'pmid' || type === 'doi') {<br />
if (data.date && (data.fulldate || !$('.'+cl+'month').length)) {<br />
var DT = new Date(data.date);<br />
var useday = /\d{4}-\d{2}-\d{2}/.test(data.date);<br />
var usemonth = /\d{4}-\d{2}/.test(data.date);<br />
$('.'+cl+'date').val(CiteTB.formatDate(DT, useday, usemonth));<br />
} else if (!data.fulldate && $('.'+cl+'month').length && $('.'+cl+'year').length) {<br />
if (data.month) { // lookup.php sets month to false if it isn't provided<br />
$('.'+cl+'month').val( CiteTB.getOption('months')[parseInt(data.month)-1] );<br />
}<br />
$('.'+cl+'year').val(data.year);<br />
} else {<br />
$('.'+cl+'date').val(data.date);<br />
}<br />
$('.'+cl+'journal').val(data.journal);<br />
$('.'+cl+'volume').val(data.volume);<br />
$('.'+cl+'issue').val(data.issue);<br />
$('.'+cl+'pages').val(data.pages);<br />
} else if (type === 'isbn') {<br />
$('.'+cl+'publisher').val(data.publisher);<br />
$('.'+cl+'location').val(data.location);<br />
$('.'+cl+'year').val(data.year);<br />
$('.'+cl+'edition').val(data.edition);<br />
} else if (type === 'url') {<br />
if (data.date) {<br />
var DT = new Date(data.date);<br />
var useday = /\d{4}-\d{2}-\d{2}/.test(data.date) && template !== 'book';<br />
var usemonth = /\d{4}-\d{2}/.test(data.date) && template !== 'book';<br />
var yearOrDate = (template === 'book') ? 'year' : 'date';<br />
$('.'+cl+yearOrDate).val(CiteTB.formatDate(DT, useday, usemonth));<br />
}<br />
$('.'+cl+'journal').val(data.journal);<br />
$('.'+cl+'volume').val(data.volume);<br />
$('.'+cl+'issue').val(data.issue);<br />
$('.'+cl+'pages').val(data.pages);<br />
$('.'+cl+'publisher').val(data.publisher);<br />
$('.'+cl+'edition').val(data.edition);<br />
$('.'+cl+'isbn').val(data.isbn);<br />
$('.'+cl+'issn').val(data.issn);<br />
$('.'+cl+'doi').val(data.doi);<br />
// "en-US" isn't a valid value for the language parameter<br />
if (data.language && data.language !== 'en-US' && data.language !== 'en-GB') {<br />
$('.'+cl+'language').val(data.language);<br />
}<br />
$('.'+cl+'chapter').val(data.chapter);<br />
}<br />
};<br />
<br />
// FORM DIALOG FUNCTIONS<br />
// Add new incrementable fields<br />
CiteTB.incrementFields = function() {<br />
template = CiteTB.getOpenTemplate();<br />
var currentrow = $(this).parents('tr')[0];<br />
$(this).prev().css('width', '100%')<br />
$(this).detach();<br />
var elemid = $(this).attr('id');<br />
var res = /^cite\-incr\-(.*?)\-(.*)$/.exec(elemid);<br />
group = res[2];<br />
increments = template.incrementables[group];<br />
fields = increments.fields;<br />
incrval = increments.val+1;<br />
template.incrementables[group].val += 1;<br />
trs = template.makeFormInner(fields, false);<br />
trs.reverse();<br />
for (var i=0; i<trs.length; i++) {<br />
$(currentrow).after(trs[i]);<br />
}<br />
};<br />
<br />
// fill the accessdate param with the current date<br />
CiteTB.fillAccessdate = function() {<br />
var elemid = $(this).attr('id');<br />
var res = /^cite\-date\-(.*?)\-(.*)$/.exec(elemid);<br />
var id = res[1];<br />
var field = res[2];<br />
var DT = new Date();<br />
var datestr = CiteTB.formatDate(DT);<br />
$('#cite-'+id+'-'+field).val(datestr);<br />
return false;<br />
};<br />
<br />
CiteTB.formatDate = function(DT, useday, usemonth) {<br />
if (typeof useday == "undefined") {<br />
useday = true; <br />
}<br />
if (typeof usemonth == "undefined") {<br />
usemonth = true; <br />
}<br />
var datestr = CiteTB.getOption('date format');<br />
var zmonth = '';<br />
var month = DT.getUTCMonth()+1;<br />
if (month < 10) {<br />
zmonth = "0"+month.toString();<br />
} else {<br />
zmonth = month.toString();<br />
}<br />
month = month.toString();<br />
var zdate = '';<br />
var date = DT.getUTCDate();<br />
if (date < 10) {<br />
zdate = "0"+date.toString();<br />
} else {<br />
zdate = date.toString();<br />
}<br />
date = date.toString();<br />
if (useday) {<br />
datestr = datestr.replace('<date>', date);<br />
datestr = datestr.replace('<zdate>', zdate);<br />
} else {<br />
datestr = datestr.replace('<date>', '');<br />
datestr = datestr.replace('<zdate>', '');<br />
}<br />
if (usemonth) {<br />
datestr = datestr.replace('<month>', month);<br />
datestr = datestr.replace('<zmonth>', zmonth);<br />
datestr = datestr.replace('<monthname>', CiteTB.getOption('months')[DT.getUTCMonth()]);<br />
} else {<br />
datestr = datestr.replace('<month>', '');<br />
datestr = datestr.replace('<zmonth>', '');<br />
datestr = datestr.replace('<monthname>', '');<br />
} <br />
datestr = datestr.replace('<year>', DT.getUTCFullYear().toString());<br />
return datestr.replace(/^[ \/\-\,\.]*(.*?)[ \/\-\,\.]*$/g, "$1"); // Cleanup any dangling spaces or connectors that might result from omitting date/month<br />
};<br />
<br />
// Function called after the ref list is loaded, to actually set the contents of the named ref dialog<br />
// Until the list is loaded, its just a "Loading" placeholder<br />
CiteTB.setupNamedRefs = function() {<br />
var names = [], i;<br />
for( i=0; i<CiteTB.mainRefList.length; i++) {<br />
if (!CiteTB.mainRefList[i].shorttag && CiteTB.mainRefList[i].refname) {<br />
names.push(CiteTB.mainRefList[i]);<br />
}<br />
}<br />
var stuff = $('<div>');<br />
$('#citetoolbar-namedrefs').html( stuff );<br />
if (names.length === 0) {<br />
stuff.html(mw.usability.getMsg('cite-no-namedrefs'));<br />
} else {<br />
stuff.html(mw.usability.getMsg('cite-namedrefs-intro'));<br />
var select = $('<select id="cite-namedref-select">');<br />
select.append($('<option value="" />').text(mw.usability.getMsg('cite-named-refs-dropdown')));<br />
for(i=0; i<names.length; i++) {<br />
select.append($('<option />').text(names[i].refname));<br />
}<br />
stuff.after(select);<br />
select.before('<br />'); <br />
var prevlabel = $('<div id="cite-nref-preview-label" style="display:none;" />').html(mw.usability.getMsg('cite-raw-preview'));<br />
select.after(prevlabel);<br />
prevlabel.before("<br /><br />");<br />
prevlabel.after('<div id="cite-namedref-preview" style="padding:0.5em; font-size:110%" />');<br />
var parselabel = $('<span id="cite-parsed-label" style="display:none;" />').html(mw.usability.getMsg('cite-parsed-label'));<br />
$('#cite-namedref-preview').after(parselabel);<br />
parselabel.after('<div id="cite-namedref-parsed" style="padding-bottom:0.5em; font-size:110%" />');<br />
var link = $('<a href="#" id="cite-nref-parse" style="margin:0 1em 0 1em; display:none; color:darkblue" />');<br />
link.html(mw.usability.getMsg('cite-form-parse'));<br />
$('#cite-namedref-parsed').after(link);<br />
<br />
$("#cite-namedref-select").bind( 'change', CiteTB.namedRefSelectClick);<br />
$('#cite-nref-parse').bind( 'click', CiteTB.nrefParseClick);<br />
} <br />
};<br />
<br />
// Function to get the errorcheck form HTML<br />
CiteTB.setupErrorCheck = function() {<br />
var form = $('<div id="cite-errorcheck-heading" />').html(mw.usability.getMsg('cite-errorcheck-heading'));<br />
var ul = $("<ul id='cite-errcheck-list' />");<br />
var test;<br />
for (var t in CiteTB.ErrorChecks) {<br />
test = CiteTB.ErrorChecks[t];<br />
ul.append(test.getRow());<br />
}<br />
form.append(ul);<br />
$('#citetoolbar-errorcheck').html(form);<br />
};<br />
<br />
// Callback function for parsed preview<br />
CiteTB.fillNrefPreview = function(parsed) {<br />
$('#cite-parsed-label').show();<br />
$('#cite-namedref-parsed').html(parsed);<br />
};<br />
<br />
// Click handler for the named-ref parsed preview<br />
CiteTB.nrefParseClick = function() {<br />
var choice = $("#cite-namedref-select").val();<br />
if (choice === '') {<br />
$('#cite-parsed-label').hide();<br />
$('#cite-namedref-parsed').text('');<br />
return false;<br />
}<br />
$('#cite-nref-parse').hide();<br />
for( var i=0; i<CiteTB.mainRefList.length; i++) {<br />
if (!CiteTB.mainRefList[i].shorttag && CiteTB.mainRefList[i].refname == choice) {<br />
CiteTB.parse(CiteTB.mainRefList[i].content, CiteTB.fillNrefPreview);<br />
return false;<br />
}<br />
} <br />
};<br />
<br />
// Click handler for the named-ref dropdown<br />
CiteTB.lastnamedrefchoice = '';<br />
CiteTB.namedRefSelectClick = function() {<br />
var choice = $("#cite-namedref-select").val();<br />
if (CiteTB.lastnamedrefchoice == choice) {<br />
return;<br />
}<br />
CiteTB.lastnamedrefchoice = choice;<br />
$('#cite-parsed-label').hide();<br />
$('#cite-namedref-parsed').text('');<br />
if (choice === '') {<br />
$('#cite-nref-preview-label').hide();<br />
$('#cite-namedref-preview').text('');<br />
$('#cite-nref-parse').hide();<br />
return;<br />
}<br />
for( var i=0; i<CiteTB.mainRefList.length; i++) {<br />
if (!CiteTB.mainRefList[i].shorttag && CiteTB.mainRefList[i].refname == choice) {<br />
$('#cite-nref-preview-label').show();<br />
$('#cite-namedref-preview').text(CiteTB.mainRefList[i].content);<br />
if (CiteTB.getOption('autoparse')) {<br />
CiteTB.nrefParseClick();<br />
} else {<br />
$('#cite-nref-parse').show();<br />
}<br />
}<br />
}<br />
};<br />
<br />
// callback function for parsed preview<br />
CiteTB.fillTemplatePreview = function(text) {<br />
var template = CiteTB.getOpenTemplate();<br />
var div = $("#citetoolbar-"+CiteTB.escStr(template.shortform));<br />
div.find('.cite-prev-parsed-label').show();<br />
div.find('.cite-preview-parsed').html(text);<br />
};<br />
<br />
// Click handler for template parsed preview<br />
CiteTB.prevParseClick = function() {<br />
var ref = CiteTB.getRef(true, false);<br />
var template = CiteTB.getOpenTemplate();<br />
var div = $("#citetoolbar-"+CiteTB.escStr(template.shortform));<br />
div.find('.cite-prev-parse').hide();<br />
CiteTB.parse(ref, CiteTB.fillTemplatePreview);<br />
};<br />
<br />
// Show/hide the extra fields in the dialog box<br />
CiteTB.showHideExtra = function() {<br />
var template = CiteTB.getOpenTemplate();<br />
var div = $("#citetoolbar-"+CiteTB.escStr(template.shortform));<br />
var setting = div.find(".cite-form-status").val();<br />
if ( setting === 'closed' ) {<br />
div.find(".cite-form-status").val('open');<br />
div.find('.cite-extra-fields').show(1, function() {<br />
// jQuery adds "display:block", which screws things up<br />
div.find('.cite-extra-fields').attr('style', 'width:100%; background-color:transparent;'); <br />
});<br />
} else {<br />
div.find(".cite-form-status").val('closed');<br />
div.find('.cite-extra-fields').hide();<br />
} <br />
};<br />
<br />
// Resets form fields and previews<br />
// Resets form fields and previews<br />
CiteTB.resetForm = function() {<br />
var template = CiteTB.getOpenTemplate();<br />
var div = $("#citetoolbar-"+CiteTB.escStr(template.shortform));<br />
div.html(template.getForm());<br />
};<br />
<br />
// STRING UTILITY FUNCTIONS<br />
// Returns a string quoted as necessary for name/group attributes<br />
CiteTB.getQuotedString = function(s) {<br />
var sq = /\'/.test(s); // single quotes<br />
var dq = /\"/.test(s); // double quotes<br />
if (!sq && !dq) { // Always quotes for non-latin alphabet<br />
return '"'+s+'"';<br />
} else if (!dq) { // Can use double quotes<br />
return '"'+s+'"';<br />
} else if (!sq) { // Can use single quotes<br />
return "'"+s+"'";<br />
} else { // Has double and single quotes<br />
s = s.replace(/\"/g, '\'');<br />
return '"'+s+'"';<br />
}<br />
};<br />
<br />
// Fix up strings for output - capitalize first char, replace underscores with spaces<br />
CiteTB.fixStr = function(s) {<br />
s = s.slice(0,1).toUpperCase() + s.slice(1);<br />
s = s.replace('_',' ');<br />
return s;<br />
};<br />
<br />
// Escape spaces and quotes for use in HTML classes/ids<br />
CiteTB.escStr = function(s) {<br />
return s.replace(' ', '-').replace("'", "\'").replace('"', '\"');<br />
};<br />
<br />
// MISC FUNCTIONS<br />
// Determine which template form is open, and get the template object for it<br />
CiteTB.getOpenTemplate = function() {<br />
var dialogs = $(".ui-dialog-content.ui-widget-content:visible");<br />
var templatename = $(dialogs[0]).find(".cite-template").val();<br />
return CiteTB.Templates[templatename];<br />
};<br />
<br />
// Display the report for the error checks<br />
CiteTB.displayErrors = function(errors) {<br />
$('#cite-err-report').remove();<br />
var table = $('<table id="cite-err-report" style="width:100%; border:1px solid #A9A9A9; background-color:#FFEFD5; padding:0.25em; margin-top:0.5em" />');<br />
$('#editpage-copywarn').before(table);<br />
var tr;<br />
var tr1 = $('<tr style="width:100%" />');<br />
var th1 = $('<th style="width:60%; font-size:110%" />').html(mw.usability.getMsg('cite-err-report-heading'));<br />
var th2 = $('<th style="text-align:right; width:40%" />');<br />
var im = $('<img />').attr('src', '//upload.wikimedia.org/wikipedia/commons/thumb/5/55/Gtk-stop.svg/20px-Gtk-stop.svg.png');<br />
im.attr('alt', mw.usability.getMsg('cite-err-report-close')).attr('title', mw.usability.getMsg('cite-err-report-close'));<br />
var ad = $('<a id="cite-err-check-close" />').attr('href', '#');<br />
ad.append(im);<br />
th2.append(ad);<br />
tr1.append(th1).append(th2);<br />
table.append(tr1);<br />
$('#cite-err-check-close').bind('click', function() { $('#cite-err-report').remove(); });<br />
if (errors.length === 0) {<br />
tr = $('<tr style="width:100%;" />');<br />
var td = $('<td style="text-align:center; margin:1.5px;" />').html(mw.usability.getMsg('cite-err-report-empty'));<br />
tr.append(td);<br />
table.append(tr);<br />
<br />
return;<br />
}<br />
for(var e in errors) {<br />
var err = errors[e];<br />
tr = $('<tr style="width:100%;" />');<br />
var td1 = $('<td style="border: 1px solid black; margin:1.5px; width:60%" />').html(err.err);<br />
var td2 = $('<td style="border: 1px solid black; margin:1.5px; width:40%" />').html(mw.usability.getMsg(err.msg));<br />
tr.append(td1).append(td2);<br />
table.append(tr);<br />
}<br />
};<br />
<br />
} // End of code loaded only on edit</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=MediaWiki:RefToolbarNoDialogsTextTerm.js&diff=12938
MediaWiki:RefToolbarNoDialogsTextTerm.js
2017-06-09T09:28:43Z
<p>Nicolas Brouard: New mw28 version</p>
<hr />
<div>var numforms = 0;<br />
var wikEdAutoUpdateUrl;<br />
function refbuttons() {<br />
if (mw.toolbar && (document.getElementById('toolbar') || document.getElementById('wikiEditor-section-main'))/* && wikEdAutoUpdateUrl == null*/) {<br />
if (document.getElementById('toolbar')) {<br />
button = document.createElement('a');<br />
button.href = "javascript:easyCiteMain()";<br />
button.title = "Insert citation";<br />
buttonimage = document.createElement('img');<br />
buttonimage.src = "//upload.wikimedia.org/wikipedia/commons/0/00/Button_easy_cite_%281%29.png";<br />
buttonimage.alt = "Insert footnote";<br />
button.appendChild(buttonimage);<br />
document.getElementById('toolbar').appendChild(button);<br />
} else {<br />
button = document.createElement('a');<br />
button.href = "#";<br />
button.title = "Insert citation";<br />
button.id = 'reftoolbar-button';<br />
buttonimage = document.createElement('img');<br />
buttonimage.src = "//upload.wikimedia.org/wikipedia/commons/thumb/9/9a/Curly_Brackets.svg/22px-Curly_Brackets.svg.png";<br />
buttonimage.alt = "Insert citation";<br />
button.classname = "tool tool-button";<br />
buttonimage.style.width = "22px";<br />
buttonimage.style.height = "17px";<br />
buttonimage.style.paddingTop = "5px";<br />
buttonimage.style.paddingLeft = "3px";<br />
button.appendChild(buttonimage);<br />
//document.getElementById('wikiEditor-ui-toolbar').childNodes[0].childNodes[1].appendChild(button);<br />
////document.getElementById('reftoolbar-button').onclick = easyCiteMain;<br />
//$j('#reftoolbar-button').live('click', function() { easyCiteMain(); });<br />
$('#wikiEditor-section-main .group-insert').append( button );<br />
$(button).click( function() { easyCiteMain(); });<br />
<br />
}<br />
if (navigator.userAgent.indexOf('MSIE') == -1) {<br />
//alert("NO MSIE");<br />
citemain = document.createElement('div');<br />
citemain.style.display = 'none';<br />
citemain.setAttribute('Id', 'citeselect');<br />
citemain.appendChild( addOption("citeWeb()", "Cite web") );<br />
citemain.appendChild( addOption("citeBook()", "Cite book") );<br />
citemain.appendChild( addOption("citeJournal()", "Cite journal") );<br />
citemain.appendChild( addOption("citeNews()", "Cite news") );<br />
citemain.appendChild( addOption("citeNamedRef()", "Named ref") );<br />
citemain.appendChild( addOption("dispErrors()", "Error check") );<br />
citemain.appendChild( addOption("hideInitial()", "Cancel") );<br />
citemain.appendChild( addOption("textTerm()", "TextTerm") );<br />
document.getElementById('wpTextbox1').parentNode.insertBefore(citemain, document.getElementById('wpTextbox1'));<br />
}<br />
else {<br />
selection = '<div id="citeselect" style="display:none"><input type="button" value="Cite web" onclick="citeWeb()" />'+<br />
'<input type="button" value="Cite book" onclick="citeBook()" />'+<br />
'<input type="button" value="Cite journal" onclick="citeJournal()" />'+<br />
'<input type="button" value="Cite news" onclick="citeNews()" />'+<br />
'<input type="button" value="Named ref" onclick="citeNamedRef()" />'+<br />
'<input type="button" value="Error check" onclick="dispErrors()" />'+<br />
'<input type="button" value="Cancel" onclick="hideInitial()" />'+<br />
'<input type="button" value="TextTerm" onclick="textTerm()" /></div>';<br />
document.getElementById('editform').innerHTML = selection + document.getElementById('editform').innerHTML;<br />
}<br />
}<br />
}<br />
<br />
function addOption(script, text) {<br />
option = document.createElement('input');<br />
option.setAttribute('type', 'button');<br />
option.setAttribute('onclick', script);<br />
option.setAttribute("value", text);<br />
return option;<br />
}<br />
<br />
function hideInitial() {<br />
document.getElementById('citeselect').style.display = 'none';<br />
oldFormHide();<br />
}<br />
<br />
function oldFormHide() {<br />
if (numforms != 0) {<br />
document.getElementById('citediv'+numforms).style.display = 'none';<br />
}<br />
if (document.getElementById('errorform') != null) {<br />
document.getElementById('citeselect').removeChild(document.getElementById('errorform'));<br />
}<br />
} <br />
<br />
function easyCiteMain() {<br />
document.getElementById('citeselect').style.display = '';<br />
}<br />
<br />
var months = ['January', 'February', 'March', 'April', 'May', 'June',<br />
'July', 'August', 'September', 'October', 'November', 'December'];<br />
var citeGlobalDateFormat = "<date> <monthname> <year>";<br />
function getTime() {<br />
var datestr = '';<br />
if (typeof citeUserDateFormat != 'undefined') {<br />
datestr = citeUserDateFormat;<br />
} else {<br />
datestr = citeGlobalDateFormat;<br />
}<br />
var DT = new Date();<br />
var zmonth = '';<br />
var month = DT.getUTCMonth()+1;<br />
if (month < 10) {<br />
zmonth = "0"+month.toString();<br />
} else {<br />
zmonth = month.toString();<br />
}<br />
month = month.toString();<br />
var zdate = '';<br />
var date = DT.getUTCDate()<br />
if (date < 10) {<br />
zdate = "0"+date.toString();<br />
} else {<br />
zdate = date.toString();<br />
}<br />
date = date.toString()<br />
datestr = datestr.replace('<date>', date);<br />
datestr = datestr.replace('<month>', month);<br />
datestr = datestr.replace('<zdate>', zdate);<br />
datestr = datestr.replace('<zmonth>', zmonth);<br />
datestr = datestr.replace('<monthname>', months[DT.getUTCMonth()]);<br />
datestr = datestr.replace('<year>', DT.getUTCFullYear().toString());<br />
return (datestr);<br />
}<br />
<br />
function citeWeb() {<br />
citeNewsWeb("cite web");<br />
}<br />
function citeNews() {<br />
citeNewsWeb("cite news");<br />
}<br />
<br />
function textTerm() {<br />
textTermf();<br />
} <br />
<br />
var texttermall = new Array();<br />
var texttermcur = new Array();<br />
var textterminput = new Array();<br />
var poffset=null, prange=null, noffset=null, nrange=null;<br />
var section = '';<br />
var subnote = '';<br />
<br />
function textTermf() {<br />
textTermform(null,null);<br />
}<br />
<br />
function nexttextterm() {<br />
//console.log("nexttexterm before noffset :" + noffset + " nrange=" + nrange);<br />
savetextterms(); // Save if changed<br />
if(noffset){ // If there is a next<br />
textTermform(noffset, nrange); // Call with offset !{{TextTerm }}<br />
}<br />
}<br />
function previoustextterm() {<br />
//console.log("previoustexterm before poffset :" + poffset + " prange=" + prange);<br />
savetextterms();<br />
if(poffset){ // If there is a next<br />
textTermform(poffset, prange); // Call with offset !{{TextTerm }}<br />
}<br />
}<br />
<br />
<br />
<br />
function texttermfill(subtext) {<br />
var ref = new Array();<br />
this.term = '';<br />
this.note= '';<br />
this.section= '';<br />
if(section != '')<br />
this.section = section;<br />
this.subnote = '';<br />
if(subnote != '')<br />
this.subnote = subnote;<br />
this.englishentry= '';<br />
this.indexentry= '';<br />
this.otherindexentry = '';<br />
this.otherindexentrytwo = '';<br />
this.otherindexentrythree = '';<br />
this.otherindexentryfour = '';<br />
this.otherindexentryfive = '';<br />
<br />
var j=0;<br />
var nr=true;<br />
regexbar= /\|([^|]*)/gm <br />
//regexbar =/\|((.)*?)(?=[\||\n])/gm //"|programmes de population|1|933|IndexEntry=programme de population|OtherIndexEntry=population, programme de"<br />
do {<br />
ref = regexbar.exec(subtext);<br />
//console.log(" subtext=" + subtext);<br />
//console.log(" ref=" + ref);<br />
if(ref != null){<br />
switch (j)<br />
{<br />
case 0 : this.term = ref[1]; break;<br />
case 1 : this.note = ref[1]; break;<br />
case 2 : this.section = ref[1]; break;<br />
default :<br />
if(ref[1].match(/^ *?EnglishEntry *?= *?(.*) *?$/))<br />
this.englishentry = ref[1].replace(/^ *?EnglishEntry *?= *?(.*) *?$/,"$1");<br />
else if(ref[1].match(/^ *?IndexEntry *?= *?(.*) *?$/))<br />
this.indexentry = ref[1].replace(/^ *?IndexEntry *?= *?(.*) *?$/,"$1");<br />
else if(ref[1].match(/^ *?OtherIndexEntry *?= *?(.*) *?$/))<br />
this.otherindexentry = ref[1].replace(/^ *?OtherIndexEntry *?= *?(.*) *?$/,"$1");<br />
else if(ref[1].match(/^ *?OtherIndexEntryTwo *?= *?(.*) *?$/))<br />
this.otherindexentrytwo = ref[1].replace(/^ *?OtherIndexEntryTwo *?= *?(.*) *?$/,"$1");<br />
else if(ref[1].match(/^ *?OtherIndexEntryThree *?= *?(.*) *?$/))<br />
this.otherindexentrythree = ref[1].replace(/^ *?OtherIndexEntryThree *?= *?(.*) *?$/,"$1");<br />
else if(ref[1].match(/^ *?OtherIndexEntryFour *?= *?(.*) *?$/))<br />
this.otherindexentryfour = ref[1].replace(/^ *?OtherIndexEntryFour *?= *?(.*) *?$/,"$1");<br />
else if(ref[1].match(/^ *?OtherIndexEntryFive *?= *?(.*) *?$/))<br />
this.otherindexentryfive = ref[1].replace(/^ *?OtherIndexEntryFive *?= *?(.*) *?$/,"$1");<br />
else if(ref[1].match(/^ *?EnglishEntry *?= *?(.*) *?$/))<br />
this.englishentry = ref[1].replace(/^ *?EnglishEntry *?= *?(.*) *?$/,"$1");<br />
else if(j==3){<br />
this.subnote = ref[1];<br />
}else{<br />
alert("texttermfill error j=" + j + " ref1= " +ref[1]);<br />
//console.log("texttermfill error j=" + j + " ref1= " +ref[1]);<br />
}<br />
}<br />
j++;<br />
} else {<br />
nr=false;<br />
}<br />
} while (nr==true);<br />
//console.log("j=" + j + " term=" + this.term + " note=" + this.note + " section=" + this.section +" subnote=" + this.subnote +" indexentry=" + this.indexentry + " otherindexentry=" + this.otherindexentry);<br />
}<br />
<br />
<br />
function textTermform(offset,range){<br />
<br />
// We search for TextTerm in wptexbox1 from cursor position (offset) and if selected (range)<br />
// If called by a previous or next, they are not null {{TextTerm<-......>}}<br />
// if outside of a TextTerm template, we will fill with the term with the selection<br />
// in any case we compute the previous nextstart and previus end and next offset not real.<br />
// if inside a TextTerm we fill the form<br />
// if saveterm is necessary, we save and exit.<br />
// if previous or next, we save if necessary and we call textTermform with a new offset >0 (next) or <0 (previous) and range<br />
// <br />
var textarea= document.getElementById('wpTextbox1');<br />
if ('selectionStart' in textarea) {<br />
if (offset == null){ // range should be null too<br />
offset = textarea.selectionStart;<br />
range = textarea.selectionEnd - textarea.selectionStart;<br />
<br />
var lstxtterm = textarea.value.substring(0,textarea.selectionEnd). lastIndexOf("{{TextTerm") ; // Just before the string. No regex<br />
var lstcltxtterm = textarea.value.substring(0,textarea.selectionStart). lastIndexOf("}}") ; //might be for another purpose than TextTerm<br />
// Looking for the section<br />
section = '';<br />
var psectione = textarea.value.substring(0,textarea.selectionEnd). lastIndexOf("===") ; // Just before the string. No regex<br />
if(psectione != -1){<br />
var psections = textarea.value.substring(0,psectione). lastIndexOf("===") ; // Just before the string. No regex<br />
if(psections != -1){<br />
section = textarea.value.substring(psections,psectione+3).match(/^=== *?(\d{3}) *?===$/)[1];<br />
}<br />
}<br />
//console.log(" section |" + section);<br />
//textarea.value.substring(0,textarea.selectionStart). search(new RegExp("((({{TextTerm[^}]+)[^{]+)+)");<br />
<br />
if ( (-1 == lstxtterm) || ((-1 < lstxtterm) && (lstxtterm < lstcltxtterm)) ) { // @{{TextTerm ...@}}...(...).. <br />
// {{Refnumber }} ....! <br />
// alert("We are after outside a previous TextTerm or no TextTerm before:" + textarea.value.substring(0,textarea.selectionStart ));<br />
texttermcur = new texttermfill("|" + textarea.value.substring(textarea.selectionStart,textarea.selectionEnd));<br />
//console.log(" We want to fill with the selection=" + textarea.value.substring(textarea.selectionStart,textarea.selectionEnd));<br />
// On se retrouve avec du texte à ajouter et le curseur inchangé à textarea.selectionStart <br />
} else if ( (lstxtterm > lstcltxtterm) && (lstcltxtterm > -1) ) { // @}}... @{{TextTerm ... (...).. <br />
//alert("We are within a TextTerm or no closing }}:" + textarea.value.substring(lstcltxtterm, lstxtterm));<br />
<br />
// ( textarea.value.substring(lstxtterm, textarea.selectionStart). search(new RegExp("}}")) == -1) {<br />
var endtxterm= textarea.value.substring(textarea.selectionStart, textarea.length). search("}}");<br />
if( endtxterm == -1)<br />
error(" Error no closing TextTerm; should be fixed:" + textarea.value.substring(textarea.selectionStart, textarea.length));<br />
else{<br />
endtxterm = endtxterm + textarea.selectionStart +2 ; // }} included<br />
// Looking for @{{TextTerm....}}@<br />
// alert("We are within textterm " + lstxtterm + " to " + endtxterm + " soit:" + textarea.value.substring(lstxtterm,endtxterm) );<br />
//console.log(" Replacing with form result:" + textarea.value.substring(lstxtterm+"{{TextTerm".length,endtxterm-"}}".length));<br />
texttermcur = new texttermfill(textarea.value.substring(lstxtterm+"{{TextTerm".length,endtxterm-"}}".length) );<br />
// On devrait remplacer {{TextTerm ...}} par la forme, soit de lstxtterm endtxtterm<br />
// On se fout de la sélection originale et la repositionne sur toute l'étendue du textterm.<br />
// alert("After null before textarea.selectionStart is" + textarea.selectionStart + " end=" + textarea.selectionEnd);<br />
// alert(" selection is:" + textarea.value.substring(textarea.selectionStart,textarea.selectionEnd));<br />
textarea.selectionStart = lstxtterm;<br />
textarea.selectionEnd = endtxterm;<br />
// alert("After null textarea.selectionStart is" + textarea.selectionStart + " end=" + textarea.selectionEnd);<br />
// alert(" selection is now:" + textarea.value.substring(textarea.selectionStart,textarea.selectionEnd));<br />
} //en endtxtterm<br />
} // end @}}... @{{TextTerm ... (...).. <br />
}else{ // coming from a previous or next<br />
// alert("After Next textarea.selectionStart is" + textarea.selectionStart + " end=" + textarea.selectionEnd);<br />
// alert(" After next selection is:" + textarea.value.substring(textarea.selectionStart,textarea.selectionEnd));<br />
// alert("Coming from a previous or next modifing selectionStart start is an offsetstart =" + offset + " and range=" + range)<br />
// Previous<br />
// selectionStart selectionEnd<br />
// > <<br />
// ^....@{{TextTerm....#}}.................@{{TextTerm ...}}!<br />
// !<-range-------->! <br />
// #<-offset--------->! <br />
// Next<br />
// selectionStart selectionEnd<br />
// > <<br />
// ^....@{{TextTerm....#}}.................@{{TextTerm ...}}!<br />
// !<--range------->! <br />
// #<-offset--------->! <br />
// alert(" Before textarea.selectionStart=" + textarea.selectionStart + " textarea.selectionEnd=" + textarea.selectionEnd);<br />
//alert(" Before is:" + textarea.value.substring(textarea.selectionStart,textarea.selectionEnd));<br />
textarea.selectionStart = (offset > 0 ? textarea.selectionEnd + offset : textarea.selectionStart + offset -range);<br />
textarea.selectionEnd = textarea.selectionStart + range;<br />
// Looking for the section<br />
section = '';<br />
var psectione = textarea.value.substring(0,textarea.selectionEnd). lastIndexOf("===") ; // Just before the string. No regex<br />
if(psectione != -1){<br />
var psections = textarea.value.substring(0,psectione). lastIndexOf("===") ; // Just before the string. No regex<br />
if(psections != -1){<br />
section = textarea.value.substring(psections,psectione+3).match(/^=== *?(\d{3}) *?===$/)[1];<br />
}<br />
}<br />
//console.log(" section Other |" + section);<br />
<br />
// alert(" After is:" + textarea.value.substring(textarea.selectionStart,textarea.selectionEnd));<br />
// alert(" After textarea.selectionStart=" + textarea.selectionStart + " textarea.selectionEnd=" + textarea.selectionEnd);<br />
//console.log("textterm cur is:" + textarea.value.substring(textarea.selectionStart+"{{TextTerm".length,textarea.selectionEnd-"}}".length));<br />
texttermcur = new texttermfill(textarea.value.substring(textarea.selectionStart+"{{TextTerm".length,textarea.selectionEnd-"}}".length) );<br />
}<br />
}else{<br />
alert("No selectionStart Internet Explorer < 9?");<br />
} <br />
// Looking for previous and next<br />
// Previous<br />
// ^....@{{TextTerm....#}}.................@{{TextTerm ...}}!<br />
// poffset<br />
// < prange ><<br />
// >< ><<br />
// pstart pend<br />
// !<--------offsetpstart------------>! <br />
// #<-offsetpsend---->! <br />
<br />
var pstart = textarea.value.substring(0,textarea.selectionStart). lastIndexOf("{{TextTerm"); <br />
if ( pstart == -1) { // No previous<br />
// alert( "NO previous : " + textarea.value.substring(0,textarea.selectionStart));<br />
poffset = null;<br />
prange = null;<br />
}else{<br />
// alert( "Previous pstart=" + pstart + " selectionStart=" + textarea.selectionStart + " pstart:selectionStart=" + textarea.value.substring(pstart,textarea.selectionStart));<br />
var pend = textarea.value.substring(pstart,textarea.selectionStart). search("}}") ; // Regex ?<br />
// alert( "Previous pstart=" + pstart + " pend= " + pend + " selectionStart=" + textarea.selectionStart + " pstart:selectionStart=" + textarea.value.substring(pstart,textarea.selectionStart));<br />
if ( pend == -1) { // Strange no ending<br />
stop( "NO ending }} in previous : " + textarea.value.substring(0,textarea.selectionStart));<br />
}else{<br />
prange = pend + 2; // }} included<br />
poffset = pstart + prange - textarea.selectionStart; // should be negative<br />
// alert( " prange =" + prange + " poffset=" + poffset);<br />
}<br />
}<br />
// Next<br />
// ^....@{{TextTerm....#}}.................@{{TextTerm ...}}!<br />
// !<--------offsetnend-------------->! <br />
// #<-offsetnstart--->! <br />
// noffset<br />
// >< nrange ><br />
// #<-offsetnstart--->! <br />
var nstart = textarea.value.substring(textarea.selectionEnd,textarea.length). search("{{TextTerm") <br />
if ( nstart == -1) { // No next<br />
// alert( "NO next TextTerm : " + textarea.value.substring(textarea.selectionEnd,textarea.length));<br />
noffset = null;<br />
nrange = null;<br />
}else{<br />
var nend = textarea.value.substring(textarea.selectionEnd + nstart,textarea.length). search("}}") ;<br />
if ( nend == -1) { // Strange no ending<br />
stop( "NO ending }} in previous : " + textarea.value.substring(textarea.selectionEnd,textarea.length)) ;<br />
}else{<br />
noffset = nstart ;<br />
nrange = nend +2 ;// }}<br />
}<br />
}<br />
<br />
<br />
// We do have offset or null, as well formfilled with a selection.<br />
<br />
oldFormHide();<br />
template = "TextTerm";<br />
var legend;<br />
if (template == "TextTerm") {<br />
legend = "TextTerm source";<br />
} else {<br />
legend = "Cite news source";<br />
}<br />
newtime = getTime();<br />
<br />
numforms++;<br />
form = '<div id="citediv'+numforms+'">'+<br />
'<fieldset><legend>'+legend+'</legend>'+<br />
'<table cellspacing="5">'+<br />
'<input type="hidden" value="'+template+'" id="template">'+<br />
'<tr><td><label for="term">&nbsp;*Term or expression: </label></td>'+<br />
'<td colspan="3"><input type="text" tabindex=1 style="width:100%" id="term" value= "' +<br />
texttermcur.term + '"></tr>'+<br />
'<tr><td width="100"><label for="note">&nbsp;*Note number (1, 2 etc .): </label></td>'+<br />
'<td width="40"><input type="text" tabindex=1 style="width:10%" id="note" value= "' +<br />
texttermcur.note + '"></td>'+<br />
'<td width="100"><label for="subnote">&nbsp;Subnote (2): </label></td>'+<br />
'<td width="40"><input type="text" tabindex=1 style="width:10%" id="subnote" value= "' +<br />
texttermcur.subnote + '"></td></tr>'+<br />
'<tr><td width="300"><label for="section">&nbsp;Section (102, 933 etc.): </label></td>'+<br />
'<td width="40"><input type="text" tabindex=1 style="width:10%" id="section" value= "' +<br />
texttermcur.section + '"></td>'+<br />
'<td width="120"><label for="indexentry">&nbsp;IndexEntry: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="indexentry" value= "' +<br />
texttermcur.indexentry + '"></td></tr>'+<br />
'<tr><td width="120"><label for="otherindexentry">&nbsp;OtherIndexEntry: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="otherindexentry" value= "' +<br />
texttermcur.otherindexentry + '"></td>'+<br />
'<td width="120"><label for="otherindexentrytwo">&nbsp;OtherIndexEntryTwo: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="otherindexentrytwo" value= "' +<br />
texttermcur.otherindexentrytwo + '"></td></tr>'+<br />
'<tr><td width="120"><label for="otherindexentrythree">&nbsp;OtherIndexEntryThree: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="otherindexentrythree" value= "' +<br />
texttermcur.otherindexentrythree + '"></td>'+<br />
'<td width="120"><label for="otherindexentryfour">&nbsp;OtherIndexEntryFour: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="otherindexentryfour" value= "' +<br />
texttermcur.otherindexentryfour + '"></td></tr>'+<br />
'<tr><td width="120"><label for="otherindexentryfive">&nbsp;OtherIndexEntryFive: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="otherindexentryfive" value= "' +<br />
texttermcur.otherindexentryfive + '"></td>'+<br />
'<td width="120"><label for="englishentry">&nbsp;EnglishEntry (for Chinese and Japanese): </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="englishentry" value= "' +<br />
texttermcur.englishentry + '"></td></tr>'+<br />
'</table>'+<br />
'<input type="button" id="previous" value="(save &) previous TextTerm" onClick="previoustextterm()">'+<br />
'<input type="button" value="(save &) exit" onClick="savetextterms()">'+<br />
'<input type="button" id="next" value="(save &) next TextTerm" onClick="nexttextterm()">'+<br />
'</fieldset></div>';<br />
document.getElementById('citeselect').innerHTML += form;<br />
}<br />
<br />
<br />
function citeNewsWeb(templatename) {<br />
oldFormHide();<br />
template = templatename;<br />
var legend;<br />
if (template == "cite web") {<br />
legend = "Cite web source";<br />
} else {<br />
legend = "Cite news source";<br />
}<br />
newtime = getTime();<br />
numforms++;<br />
form = '<div id="citediv'+numforms+'">'+<br />
'<fieldset><legend>'+legend+'</legend>'+<br />
'<table cellspacing="5">'+<br />
'<input type="hidden" value="'+template+'" id="template">'+<br />
'<tr><td width="120"><label for="url">&nbsp;URL: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="url"></td>'+<br />
'<td width="120"><label for="title">&nbsp;Title: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="title"></td></tr>'+<br />
'<tr><td width="120"><label for="last">&nbsp;Last name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="last"></td>'+<br />
'<td width="120"><label for="first">&nbsp;First name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="first"></td></tr>'+<br />
'<tr><td width="120"><label for="coauthors">&nbsp;Coauthors: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="coauthors"></td>'+<br />
'<td width="120"><label for="date">&nbsp;Publication date: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="date"></td></tr>'+<br />
'<tr><td width="120"><label for="work">&nbsp;Work: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="work"></td>'+<br />
'<td width="120"><label for="publisher">&nbsp;Publisher: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="publisher"></td></tr>'+<br />
'<tr><td width="120"><label for="pages">&nbsp;Pages: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="pages"></td>'+<br />
'<td width="120"><label for="language">&nbsp;Language: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="language"></td></tr>'+<br />
'<tr><td width="120"><label for="accessdate">&nbsp;Access date: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="accessdate" value="'+ newtime +'"></td>'+<br />
'<td width="120"><label for="location">&nbsp;Location: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="location"></td></tr>'+<br />
'<tr><td width="120"><label for="refname">&nbsp;Reference name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="refname"></td></tr>'+<br />
'</table>'+<br />
'<input type="button" value="Add citation" onClick="addcites()">'+<br />
'</fieldset></div>';<br />
document.getElementById('citeselect').innerHTML += form;<br />
}<br />
<br />
function citeBook() {<br />
oldFormHide();<br />
template = "cite book";<br />
numforms++;<br />
form = '<div id="citediv'+numforms+'">'+<br />
'<fieldset><legend>Cite book source</legend>'+<br />
'<table cellspacing="5">'+<br />
'<input type="hidden" value="'+template+'" id="template">'+<br />
'<tr><td width="120"><label for="last">&nbsp;Last name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="last"></td>'+<br />
'<td width="120"><label for="first">&nbsp;First name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="first"></td></tr>'+<br />
'<tr><td width="120"><label for="coauthors">&nbsp;Coauthors: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="coauthors"></td>'+<br />
'<td width="120"><label for="others">&nbsp;Others: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="others"></td></tr>'+<br />
'<tr><td width="120"><label for="title">&nbsp;Title: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="title"></td>'+<br />
'<td width="120"><label for="editor">&nbsp;Editor: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="editor"></td></tr>'+<br />
'<tr><td width="120"><label for="publisher">&nbsp;Publisher: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="publisher"></td>'+<br />
'<td width="120"><label for="location">&nbsp;Location: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="location"></td></tr>'+<br />
'<tr><td width="120"><label for="date">&nbsp;Publication date: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="date"></td>'+<br />
'<td width="120"><label for="edition">&nbsp;Edition: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="edition"></td></tr>'+<br />
'<tr><td width="120"><label for="series">&nbsp;Series: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="series"></td>'+<br />
'<td width="120"><label for="volume">&nbsp;Volume: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="volume"></td></tr>'+<br />
'<tr><td width="120"><label for="pages">&nbsp;Pages: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="pages"></td>'+<br />
'<td width="120"><label for="chapter">&nbsp;Chapter: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="chapter"></td></tr>'+<br />
'<tr><td width="120"><label for="isbn">&nbsp;ISBN: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="isbn"></td>'+<br />
'<td width="120"><label for="oclc">&nbsp;OCLC: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="oclc"></td></tr>'+<br />
'<tr><td width="120"><label for="url">&nbsp;URL: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="url"></td>'+<br />
'<td width="120"><label for="accessdate">&nbsp;Access date: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="accessdate"></td></tr>'+<br />
'<tr><td width="120"><label for="language">&nbsp;Language: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="language"></td>'+<br />
'<td width="120"><label for="refname">&nbsp;Reference name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="refname"></td></tr>'+<br />
'</table>'+<br />
'<input type="button" value="Add citation" onClick="addcites()">'+<br />
'</fieldset></div>';<br />
document.getElementById('citeselect').innerHTML += form;<br />
}<br />
<br />
function citeJournal() {<br />
oldFormHide();<br />
template = "cite journal";<br />
numforms++;<br />
form = '<div id="citediv'+numforms+'">'+<br />
'<fieldset><legend>Cite journal source</legend>'+<br />
'<table cellspacing="5">'+<br />
'<input type="hidden" value="'+template+'" id="template">'+<br />
'<tr><td width="120"><label for="last">&nbsp;Last name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="last"></td>'+<br />
'<td width="120"><label for="first">&nbsp;First name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="first"></td></tr>'+<br />
'<tr><td width="120"><label for="coauthors">&nbsp;Coauthors: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="coauthors"></td>'+<br />
'<td width="120"><label for="date">&nbsp;Publication date: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="date"></td></tr>'+<br />
'<tr><td width="120"><label for="title">&nbsp;Title: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="title"></td>'+<br />
'<td width="120"><label for="journal">&nbsp;Journal: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="journal"></td></tr>'+<br />
'<tr><td width="120"><label for="publisher">&nbsp;Publisher: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="publisher"></td>'+<br />
'<td width="120"><label for="location">&nbsp;Location: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="location"></td></tr>'+<br />
'<tr><td width="120"><label for="volume">&nbsp;Volume: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="volume"></td>'+<br />
'<td width="120"><label for="issue">&nbsp;Issue: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="issue"></td></tr>'+<br />
'<tr><td width="120"><label for="pages">&nbsp;Pages: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="pages"></td>'+<br />
'<td width="120"><label for="issn">&nbsp;ISSN: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="issn"></td></tr>'+<br />
'<tr><td width="120"><label for="oclc">&nbsp;OCLC: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="oclc"></td>'+<br />
'<td width="120"><label for="language">&nbsp;Language: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="language"></td></tr>'+<br />
'<tr><td width="120"><label for="url">&nbsp;URL: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="url"></td>'+<br />
'<td width="120"><label for="accessdate">&nbsp;Access date: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="accessdate"></td></tr>'+<br />
'<tr><td width="120"><label for="refname">&nbsp;Reference name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="refname"></td></tr>'+<br />
'</table>'+<br />
'<input type="button" value="Add citation" onClick="addcites()">'+<br />
'</fieldset></div>';<br />
document.getElementById('citeselect').innerHTML += form;<br />
}<br />
<br />
function saveinput(terminput) {<br />
// terminput = document.getElementById('citediv'+numforms).getElementsByTagName('input');<br />
this.term = '';<br />
this.note= '';<br />
this.section = '';<br />
this.indexentry= '';<br />
this.otherindexentry = '';<br />
this.otherindexentrytwo = '';<br />
this.otherindexentrythree = '';<br />
this.otherindexentryfour = '';<br />
this.otherindexentryfive = '';<br />
this.englishentry = '';<br />
<br />
for (var i=0; i<terminput.length-1; i++) {<br />
if (terminput[i].id == "template" ){<br />
;<br />
}else if (terminput[i].id == "term" ){<br />
this.term = terminput[i].value;<br />
}else if(terminput[i].id == "note"){<br />
this.note = terminput[i].value;<br />
}else if(terminput[i].id == "section"){<br />
this.section = terminput[i].value;<br />
}else if(terminput[i].id == "subnote"){<br />
this.subnote = terminput[i].value;<br />
}else if(terminput[i].id == "indexentry"){<br />
this.indexentry = terminput[i].value;<br />
}else if(terminput[i].id == "otherindexentry"){<br />
this.otherindexentry = terminput[i].value;<br />
}else if(terminput[i].id == "otherindexentrytwo"){<br />
this.otherindexentrytwo = terminput[i].value;<br />
}else if(terminput[i].id == "otherindexentrythree"){<br />
this.otherindexentrythree = terminput[i].value;<br />
}else if(terminput[i].id == "otherindexentryfour"){<br />
this.otherindexentryfour = terminput[i].value;<br />
}else if(terminput[i].id == "otherindexentryfive"){<br />
this.otherindexentryfive = terminput[i].value;<br />
}else if(terminput[i].id == "englishentry"){<br />
this.englishentry = terminput[i].value;<br />
}else{<br />
;;//alert(" SaveInput terminput[i].id = " + terminput[i].id + " terminput[i].value =" + terminput[i].value);<br />
}<br />
<br />
}<br />
}<br />
<br />
function savetextterms(template) {<br />
var txtterminput = document.getElementById('citediv'+numforms).getElementsByTagName('input');<br />
textterminput = new saveinput(txtterminput);<br />
//alert("texttermcur=" + texttermcur);<br />
//alert("textterminput=" + textterminput);<br />
// Testing<br />
var different = false;<br />
if((textterminput.term != texttermcur.term) || (textterminput.note != texttermcur.note) ||<br />
(textterminput.section != texttermcur.section) ||<br />
(textterminput.subnote != texttermcur.subnote) ||<br />
(textterminput.indexentry != texttermcur.indexentry) ||<br />
(textterminput.otherindexentry != texttermcur.otherindexentry) || <br />
(textterminput.otherindexentrytwo != texttermcur.otherindexentrytwo) ||<br />
(textterminput.otherindexentrythree != texttermcur.otherindexentrythree) ||<br />
(textterminput.otherindexentryfour != texttermcur.otherindexentryfour) ||<br />
(textterminput.otherindexentryfive != texttermcur.otherindexentryfive) ||<br />
(textterminput.englishentry != texttermcur.englishentry) )<br />
different = true;<br />
<br />
if (different){<br />
// alert(" They are different, have to save" );<br />
var texttermchain="{{TextTerm";<br />
texttermchain += '|' + (textterminput.term ? textterminput.term : '');<br />
texttermchain += '|' + (textterminput.note ? textterminput.note : '');<br />
texttermchain += (textterminput.section ? '|' + textterminput.section : '');<br />
texttermchain += (textterminput.subnote ? '|' + textterminput.subnote : '');<br />
texttermchain += (textterminput.indexentry ? '|IndexEntry='+ textterminput.indexentry : '');<br />
texttermchain += (textterminput.otherindexentry ? '|OtherIndexEntry='+ textterminput.otherindexentry : '');<br />
texttermchain += (textterminput.otherindexentrytwo ? '|OtherIndexEntryTwo='+ textterminput.otherindexentrytwo : '');<br />
texttermchain += (textterminput.otherindexentrythree ? '|OtherIndexEntryThree='+ textterminput.otherindexentrythree : '');<br />
texttermchain += (textterminput.otherindexentryfour ? '|OtherIndexEntryFour='+ textterminput.otherindexentryfour : '');<br />
texttermchain += (textterminput.otherindexentryfive ? '|OtherIndexEntryFive='+ textterminput.otherindexentryfive : '');<br />
texttermchain += (textterminput.englishentry ? '|EnglishEntry='+ textterminput.englishentry : '');<br />
texttermchain += "}}";<br />
<br />
var textarea= document.getElementById('wpTextbox1');<br />
var savepos= textarea.selectionStart;<br />
if ('selectionStart' in textarea) {<br />
textarea.value=textarea.value.substring(0,textarea.selectionStart) + texttermchain + textarea.value.substring(textarea.selectionEnd, textarea.length); <br />
//insertTags(texttermchain, '', '');<br />
textarea.selectionStart = savepos;<br />
textarea.selectionEnd = savepos + texttermchain.length;<br />
}<br />
else{<br />
alert("No selectionStart firefox");<br />
}<br />
}<br />
else{<br />
;//alert(" They are similar, don't save" );<br />
}<br />
document.getElementById('citediv'+numforms).style.display = 'none';<br />
<br />
}<br />
<br />
function addcites(template) {<br />
cites = document.getElementById('citediv'+numforms).getElementsByTagName('input');<br />
var citebegin = '<ref';<br />
var citename = '';<br />
var citeinner = '';<br />
for (var i=0; i<cites.length-1; i++) {<br />
if (cites[i].value != '' && cites[i].id != "refname" && cites[i].id != "template") {<br />
citeinner += "|" + cites[i].id + "=" + cites[i].value;<br />
}<br />
else if (cites[i].value != '' && cites[i].id == "refname" && cites[i].id != "template") {<br />
citebegin += ' name="' + cites[i].value + '"';<br />
}<br />
else if (cites[i].value != '' && cites[i].id != "refname" && cites[i].id == "template") {<br />
citename = '>{{' + cites[i].value;<br />
}<br />
}<br />
cite = citebegin + citename + citeinner + "}}</ref>";<br />
$("#wpTextbox1").focus();<br />
insertTags(cite, '', '');<br />
document.getElementById('citediv'+numforms).style.display = 'none';<br />
}<br />
<br />
function getNamedRefs(calls) {<br />
if (typeof(wikEdUseWikEd) != 'undefined') {<br />
if (wikEdUseWikEd == true) {<br />
WikEdUpdateTextarea();<br />
}<br />
}<br />
text = document.getElementById('wpTextbox1').value;<br />
var regex;<br />
if (calls) {<br />
regex = /< *?ref +?name *?= *?(('([^']*?)')|("([^"]*?)")|([^'"\s]*?[^\/]\b)) *?\/ *?>/gi //'<br />
} else {<br />
regex = /< *?ref +?name *?= *?(('([^']*?)')|("([^"]*?)")|([^'"\s]*?[^\/]\b)) *?>/gi //'<br />
}<br />
var namedrefs = [];<br />
var i=0;<br />
var nr=true;<br />
do {<br />
ref = regex.exec(text);<br />
if(ref != null){<br />
if (ref[5]) {<br />
namedrefs[i] = ref[5];<br />
} else if (ref[3]) {<br />
namedrefs[i] = ref[3];<br />
} else {<br />
namedrefs[i] = ref[6];<br />
}<br />
i++;<br />
} else {<br />
nr=false;<br />
}<br />
} while (nr==true);<br />
return namedrefs;<br />
}<br />
<br />
function citeNamedRef() {<br />
namedrefs = getNamedRefs(false);<br />
if (namedrefs == '') {<br />
oldFormHide();<br />
numforms++;<br />
out = '<div id="citediv'+numforms+'"><fieldset>'+<br />
'<legend>References in text</legend>There are no named refs (<tt>&lt;ref name="Name"&gt;</tt>) in the text</fieldset></div>';<br />
document.getElementById('citeselect').innerHTML += out;<br />
}<br />
else {<br />
oldFormHide();<br />
numforms++;<br />
form = '<div id="citediv'+numforms+'">'+<br />
'<fieldset><legend>References in article</legend>'+<br />
'<table cellspacing="5">'+<br />
'<tr><td><label for="namedrefs">&nbsp;Named references in text</label></td>'+<br />
'<td><select name="namedrefs" id="namedrefs">';<br />
for (var i=0;i<namedrefs.length;i++) {<br />
form+= '<option value="'+namedrefs[i]+'">'+namedrefs[i]+'</option>';<br />
}<br />
form+= '</select>'+<br />
'</td></tr></table>'+<br />
'<input type="button" value="Add citation" onClick="addnamedcite()">'+<br />
'</fieldset></div>';<br />
document.getElementById('citeselect').innerHTML += form;<br />
}<br />
}<br />
<br />
function addnamedcite() {<br />
name = document.getElementById('citediv'+numforms).getElementsByTagName('select')[0].value;<br />
ref = '<ref name="'+name+'" />';<br />
$("#wpTextbox1").focus();<br />
insertTags(ref, '', '');<br />
document.getElementById('citediv'+numforms).style.display = 'none';<br />
}<br />
<br />
function getAllRefs() {<br />
if (typeof(wikEdUseWikEd) != 'undefined') {<br />
if (wikEdUseWikEd == true) {<br />
WikEdUpdateTextarea();<br />
}<br />
}<br />
text = document.getElementById('wpTextbox1').value;<br />
regex = /< *?ref( +?name *?= *?(('([^']*?)')|("([^"]*?)")|([^'"\s]*?[^\/]\b)))? *?>((.|\n)*?)< *?\/? *?ref *?>/gim //"<br />
var allrefs = [];<br />
var i=0;<br />
var nr=true;<br />
do {<br />
ref = regex.exec(text);<br />
if(ref != null){<br />
if (ref[0].search(/[^\s]{150}/) != -1) {<br />
ref[0] = ref[0].replace(/\|([^\s])/g, "| $1");<br />
}<br />
ref[0] = ref[0].replace(/</g, "&lt;");<br />
ref[0] = ref[0].replace(/>/g, "&gt;");<br />
allrefs[i] = ref[0];<br />
i++;<br />
} else {<br />
nr=false;<br />
}<br />
} while (nr==true);<br />
return allrefs;<br />
}<br />
<br />
function NRcallError(namedrefs, refname) {<br />
for (var i=0; i<namedrefs.length; i++) {<br />
if (namedrefs[i] == refname) {<br />
return true;<br />
}<br />
}<br />
return false;<br />
}<br />
<br />
function errorCheck() {<br />
var allrefs = getAllRefs();<br />
var allrefscontent = [];<br />
var samecontentexclude = [];<br />
var sx=0;<br />
var templateexclude = [];<br />
var tx=0;<br />
var skipcheck = false;<br />
var namedrefcalls = getNamedRefs(true);<br />
for (var i=0; i<allrefs.length; i++) {<br />
allrefscontent[i] = allrefs[i].replace(/&lt; *?ref( +?name *?= *?(('([^']*?)')|("([^"]*?)")|([^'"\s]*?[^\/]\b)))? *?&gt;((.|\n)*?)&lt; *?\/? *?ref *?&gt;/gim, "$8"); //"<br />
}<br />
var namedrefs = getNamedRefs(false);<br />
var errorlist = [];<br />
var q=0;<br />
unclosed = document.getElementById('unclosed').checked;<br />
samecontent = document.getElementById('samecontent').checked;<br />
templates = document.getElementById('templates').checked;<br />
repeated = document.getElementById('repeated').checked;<br />
undef = document.getElementById('undef').checked;<br />
for (var i=0; i<allrefs.length; i++) {<br />
if (allrefs[i].search(/&lt; *?\/ *?ref *?&gt;/) == -1 && unclosed) {<br />
errorlist[q] = '<tr><td width="75%"><tt>'+allrefs[i]+'</tt></td>';<br />
errorlist[q] += '<td width="25%">Unclosed <tt>&lt;ref&gt;</tt> tag</td></tr>';<br />
q++;<br />
}<br />
if (samecontent) {<br />
for (var d=0; d<samecontentexclude.length; d++) {<br />
if (allrefscontent[i] == samecontentexclude[d]) {<br />
skipcheck = true;<br />
}<br />
}<br />
var p=0;<br />
while (p<allrefs.length && !skipcheck) {<br />
if (allrefscontent[i] == allrefscontent[p] && i != p) {<br />
errorlist[q] = '<tr><td width="75%"><tt>'+allrefscontent[i]+'</tt></td>';<br />
errorlist[q] += '<td width="25%">Multiple refs contain this content, a <a href="//en.wikipedia.org/wiki/Wikipedia:Footnotes#Naming_a_ref_tag_so_it_can_be_used_more_than_once">named reference</a> should be used instead</td></tr>';<br />
q++;<br />
samecontentexclude[sx] = allrefscontent[i]<br />
sx++;<br />
break;<br />
}<br />
p++;<br />
}<br />
skipcheck=false;<br />
}<br />
if (templates) {<br />
if (allrefscontent[i].search(/\{\{cite/i) == -1 && allrefscontent[i].search(/\{\{citation/i) == -1 && allrefscontent[i].search(/\{\{Comic (book|strip) reference/i) == -1 && allrefscontent[i].search(/\{\{Editorial cartoon reference/i) == -1 && allrefscontent[i].search(/\{\{harv/i) == -1) {<br />
for (var x=0; x<templateexclude.length; x++) {<br />
if (allrefscontent[i] == templateexclude[x]) {<br />
skipcheck = true;<br />
}<br />
}<br />
if (!skipcheck) {<br />
errorlist[q] = '<tr><td width="75%"><tt>'+allrefs[i]+'</tt></td>';<br />
errorlist[q] += '<td width="25%">Does not use a <a href="//en.wikipedia.org/wiki/Wikipedia:Citation_templates">citation template</a></td></tr>';<br />
q++;<br />
templateexclude[tx] = allrefscontent[i];<br />
tx++;<br />
}<br />
skipcheck = false;<br />
}<br />
}<br />
}<br />
if (repeated) {<br />
var repeatnameexclude = [];<br />
var rx=0;<br />
for (var k=0; k<namedrefs.length; k++) {<br />
for (var d=0; d<repeatnameexclude.length; d++) {<br />
if (namedrefs[k] == repeatnameexclude[d]) {<br />
skipcheck = true;<br />
}<br />
}<br />
var z=0;<br />
while (z<namedrefs.length && !skipcheck) {<br />
if (namedrefs[k] == namedrefs[z] && k != z) {<br />
errorlist[q] = '<tr><td width="75%"><tt>'+namedrefs[k]+'</tt></td>';<br />
errorlist[q] += '<td width="25%">Multiple references are given the same <a href="//en.wikipedia.org/wiki/Wikipedia:Footnotes#Naming_a_ref_tag_so_it_can_be_used_more_than_once">name</a></td></tr>';<br />
q++;<br />
repeatnameexclude[rx] = namedrefs[z];<br />
rx++;<br />
break;<br />
}<br />
z++;<br />
}<br />
skipcheck = false;<br />
}<br />
}<br />
if (undef) {<br />
var undefexclude = [];<br />
var ux=0;<br />
for (var p=0; p<namedrefcalls.length; p++) {<br />
for (var d=0; d<undefexclude.length; d++) {<br />
if (allrefscontent[i] == undefexclude[d]) {<br />
skipcheck = true;<br />
}<br />
}<br />
if (!skipcheck) {<br />
if (!NRcallError(namedrefs, namedrefcalls[p])) {<br />
errorlist[q] = '<tr><td width="75%"><tt>'+namedrefcalls[p]+'</tt></td>';<br />
errorlist[q] += '<td width="25%">A <a href="//en.wikipedia.org/wiki/Wikipedia:Footnotes#Naming_a_ref_tag_so_it_can_be_used_more_than_once">named reference</a> is used but not defined</td></tr>';<br />
q++;<br />
undefexclude[ux] = namedrefs[p];<br />
ux++;<br />
}<br />
}<br />
skipcheck = false;<br />
}<br />
}<br />
if (q > 0) {<br />
return errorlist;<br />
} else {<br />
return 0;<br />
}<br />
}<br />
<br />
function dispErrors() {<br />
oldFormHide();<br />
form = '<div id="errorform"><fieldset>'+<br />
'<legend>Error checking</legend>'+<br />
'<b>Check for:</b><br/>'+<br />
'<input type="checkbox" id="unclosed" /> Unclosed <tt>&lt;ref&gt;</tt> tags<br/>'+<br />
'<input type="checkbox" id="samecontent" /> References with the same content<br/>'+<br />
'<input type="checkbox" id="templates" /> References not using a <a href="//en.wikipedia.org/wiki/Wikipedia:Citation_templates">citation template</a><br/>'+<br />
'<input type="checkbox" id="repeated" /> Multiple references with the same name<br/>'+<br />
'<input type="checkbox" id="undef" /> Usage of undefined named references<br/>'+<br />
'<input type="button" id="errorchecksubmit" value="Check for selected errors" onclick="doErrorCheck()"/>'+<br />
'</fieldset></div>';<br />
document.getElementById('citeselect').innerHTML += form;<br />
}<br />
<br />
function doErrorCheck() {<br />
var errors = errorCheck();<br />
document.getElementById('citeselect').removeChild(document.getElementById('errorform'));<br />
if (errors == 0) {<br />
if (numforms != 0) {<br />
document.getElementById('citediv'+numforms).style.display = 'none';<br />
}<br />
numforms++;<br />
out = '<div id="citediv'+numforms+'"><fieldset>'+<br />
'<legend>Error checking</legend>No errors found.</fieldset></div>';<br />
document.getElementById('citeselect').innerHTML += out;<br />
}<br />
else {<br />
if (numforms != 0) {<br />
document.getElementById('citediv'+numforms).style.display = 'none';<br />
}<br />
numforms++;<br />
form = '<div id="citediv'+numforms+'">'+<br />
'<fieldset><legend>Error checking</legend>'+<br />
'<table border="1px">';<br />
for (var i=0; i<errors.length; i++) {<br />
form+=errors[i];<br />
}<br />
form+= '</table>'+<br />
'</fieldset></div>';<br />
document.getElementById('citeselect').innerHTML += form;<br />
}<br />
}<br />
<br />
$( refbuttons );</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=MediaWiki:RefToolbarLegacy.js&diff=12944
MediaWiki:RefToolbarLegacy.js
2017-06-09T08:46:57Z
<p>Nicolas Brouard: From https://en.wikipedia.org/w/index.php?title=MediaWiki:RefToolbarLegacy.js&oldid=773919858</p>
<hr />
<div>var numforms = 0;<br />
var wikEdAutoUpdateUrl;<br />
var citeUserDateFormat;<br />
var refTagURL;<br />
var defaultRefTagURL = '//reftag.appspot.com/';<br />
var refToolDebug;<br />
<br />
String.prototype.trim = function() {<br />
return this.replace(/^\s+|\s+$/g,"");<br />
};<br />
<br />
function refbuttons() {<br />
if (mw.toolbar && document.getElementById('toolbar') ) {<br />
var button = document.createElement('a');<br />
button.href = "javascript:easyCiteMain()";<br />
button.title = "Insert Citation";<br />
var buttonimage = document.createElement('img');<br />
buttonimage.src = "//upload.wikimedia.org/wikipedia/commons/e/ea/Button_easy_cite.png";<br />
buttonimage.alt = "Insert Citation";<br />
button.appendChild(buttonimage);<br />
var toolbar = document.getElementById('toolbar');<br />
if (navigator.userAgent.indexOf('MSIE') == -1) {<br />
toolbar.appendChild(button);<br />
var citemain = document.createElement('div');<br />
citemain.style.display = 'none';<br />
citemain.style.margin = '0 0 6px';<br />
citemain.style.clear = 'both';<br />
citemain.style.height = 'auto';<br />
citemain.setAttribute('Id', 'citeselect');<br />
citemain.appendChild( addOption("citeWeb()", "Web") );<br />
citemain.appendChild( addOption("citeNews()", "News") );<br />
citemain.appendChild( addOption("citeBook()", "Book") );<br />
citemain.appendChild( addOption("citeJournal()", "Journal") );<br />
citemain.appendChild( addOption("citeNamedRef()", "Named references") );<br />
citemain.appendChild( addOption("dispErrors()", "Error check") );<br />
citemain.appendChild( addOption("showMore()", "More") );<br />
citemain.appendChild( addOption("hideInitial()", "Cancel") );<br />
<br />
var citemore = document.createElement('div');<br />
citemore.style.display = 'none';<br />
citemore.setAttribute('Id', 'citemore');<br />
citemore.appendChild( addOption("citeEncyclopedia()", "Encyclopedia") );<br />
citemore.appendChild( addOption("citePressRelease()", "Press release") );<br />
citemore.appendChild( addOption("citeMap()", "Map") );<br />
citemore.appendChild( addOption("showRefSectionOptions()", "Ref Section") );<br />
citemain.appendChild(citemore);<br />
<br />
$( citemain ).insertAfter( $( toolbar ) );<br />
}<br />
else {<br />
toolbar.appendChild(button);<br />
var citeselect = document.createElement('div');<br />
citeselect.id = 'citeselect';<br />
citeselect.style.display = "none";<br />
citeselect.innerHTML = '<input type="button" value="Web" onclick="citeWeb()" />'+<br />
'<input type="button" value="News" onclick="citeNews()" />'+<br />
'<input type="button" value="Book" onclick="citeBook()" />'+<br />
'<input type="button" value="Journal" onclick="citeJournal()" />'+<br />
'<input type="button" value="Named references" onclick="citeNamedRef()" />'+<br />
'<input type="button" value="Error check" onclick="dispErrors()" />'+<br />
'<input type="button" value="More" onclick="showMore()" />'+<br />
'<input type="button" value="Cancel" onclick="hideInitial()" />'+<br />
'<div id="citemore" style="display:none">\<br />
<input type="button" value="Encyclopedia" onclick="citeEncyclopedia()" />\<br />
<input type="button" value="Press release" onclick="citePressRelease()" />\<br />
<input type="button" value="Map" onclick="citeMap()" />\<br />
<input type="button" value="Ref Section" onclick="showRefSectionOptions()" />\<br />
</div>';<br />
document.getElementById('editform').insertBefore(citeselect, document.getElementById('editform').firstChild ) ;<br />
}<br />
var reftoolformarea = document.createElement( 'span' );<br />
reftoolformarea.id = 'refToolFormArea';<br />
document.getElementById('citeselect').appendChild( reftoolformarea );<br />
}<br />
if (typeof EditTools == "object") {<br />
var placeholder = document.getElementById("editpage-specialchars");<br />
EditTools.createEditTools (placeholder);<br />
}<br />
}<br />
<br />
function addOption(script, text) {<br />
var option = document.createElement('input');<br />
option.setAttribute('type', 'button');<br />
option.setAttribute('onclick', script);<br />
option.setAttribute("value", text);<br />
return option;<br />
}<br />
<br />
function hideInitial() {<br />
document.getElementById('citeselect').style.display = 'none';<br />
oldFormHide();<br />
}<br />
<br />
function oldFormHide() {<br />
//if (numforms != 0) {<br />
// document.getElementById('citediv'+numforms).style.display = 'none';<br />
//}<br />
document.getElementById('refToolFormArea').innerHTML = '';<br />
if (document.getElementById('errorform') !== null) {<br />
document.getElementById('citeselect').removeChild(document.getElementById('errorform'));<br />
}<br />
}<br />
<br />
function easyCiteMain() {<br />
document.getElementById('citeselect').style.display = '';<br />
document.getElementById('citemore').style.display = 'none';<br />
}<br />
<br />
function showMore() {<br />
document.getElementById('citemore').style.display = '';<br />
}<br />
<br />
var months = ['January', 'February', 'March', 'April', 'May', 'June',<br />
'July', 'August', 'September', 'October', 'November', 'December'];<br />
var citeGlobalDateFormat = "<date> <monthname> <year>";<br />
function getTime() {<br />
var datestr = '';<br />
if (citeUserDateFormat) {<br />
datestr = citeUserDateFormat;<br />
} else {<br />
datestr = citeGlobalDateFormat;<br />
}<br />
var DT = new Date();<br />
var zmonth = '';<br />
var month = DT.getUTCMonth()+1;<br />
if (month < 10) {<br />
zmonth = "0"+month.toString();<br />
} else {<br />
zmonth = month.toString();<br />
}<br />
month = month.toString();<br />
var zdate = '';<br />
var date = DT.getUTCDate();<br />
if (date < 10) {<br />
zdate = "0"+date.toString();<br />
} else {<br />
zdate = date.toString();<br />
}<br />
date = date.toString();<br />
datestr = datestr.replace('<date>', date);<br />
datestr = datestr.replace('<month>', month);<br />
datestr = datestr.replace('<zdate>', zdate);<br />
datestr = datestr.replace('<zmonth>', zmonth);<br />
datestr = datestr.replace('<monthname>', months[DT.getUTCMonth()]);<br />
datestr = datestr.replace('<year>', DT.getUTCFullYear().toString());<br />
return (datestr);<br />
}<br />
<br />
function lastNameToRefname() {<br />
//Note: This only works if field 'refname' comes after field 'last', but it always does<br />
var lastName;<br />
var fields = document.getElementById('citediv'+numforms).getElementsByTagName('input');<br />
for (var i=0; i<fields.length; i++) {<br />
if(fields[i].id == 'last') {<br />
lastName = fields[i].value;<br />
}<br />
else if(fields[i].id == 'refname') {<br />
fields[i].value = lastName.replace(/^\s*(.*?)\s*$/, "$1");<br />
return;<br />
}<br />
}<br />
}<br />
<br />
function setAccessDateToday() {<br />
document.getElementById('accessdate').value = getTime();<br />
/* var fields = document.getElementById('citediv'+numforms).getElementsByTagName('input');<br />
for (var i=0; i<fields.length; i++) {<br />
if(fields[i].id == 'accessdate') {<br />
fields[i].value = getTime();<br />
return;<br />
}<br />
}<br />
*/<br />
}<br />
<br />
function getLastName(authornum) {<br />
if (/\S/.test(document.getElementById('last'+authornum).value)) {<br />
return document.getElementById('last'+authornum).value;<br />
}<br />
else {<br />
var author = document.getElementById('author'+authornum).value;<br />
var match = /(\S+)\s*$/.exec(author);<br />
if (match) {<br />
return match[1];<br />
}<br />
else {<br />
return '';<br />
}<br />
}<br />
}<br />
<br />
function makeRefname() {<br />
var refname;<br />
if (document.getElementById('last1')) {<br />
refname = document.getElementById('last1').value + document.getElementById('last2').value;<br />
}<br />
else{<br />
refname = document.getElementById('last').value;<br />
}<br />
if (/\S/.test(refname)) {<br />
var date = document.getElementById('date').value;<br />
var match = /[0-9]{4}/.exec(date);<br />
if (match) {<br />
refname += match[0];<br />
}<br />
}<br />
else {<br />
refname = document.getElementById('title').value;<br />
}<br />
document.getElementById('refname').value = refname;<br />
}<br />
<br />
function citeWeb() {<br />
citeNewsWeb("cite web");<br />
}<br />
function citeNews() {<br />
citeNewsWeb("cite news");<br />
}<br />
<br />
function citeNewsWeb(templatename) {<br />
oldFormHide();<br />
var template = templatename;<br />
var legend;<br />
if (template == "cite web") {<br />
legend = "Cite web source";<br />
} else {<br />
legend = "Cite news source";<br />
}<br />
var newtime = getTime();<br />
numforms++;<br />
var form = '<div id="citediv'+numforms+'">'+<br />
'<fieldset><legend>'+legend+'</legend>'+<br />
'<table cellspacing="5">'+<br />
'<input type="hidden" value="'+template+'" id="template">'+<br />
'<tr><td width="120"><label for="url">&nbsp;URL: </label></td>'+<br />
'<td width="400"><input type="image" src="//upload.wikimedia.org/wikipedia/commons/6/62/Arrow_out_condensed.png" tabindex=1 alt="Fetch" title="' + ((template == 'cite news') ? 'For a New York Times article URL, fetch article data and fill in the fields. For other URLs, fetch the page title.' : 'Fetch the page title. Irrelevant parts often have to be removed manually afterwards.') + '" onClick="pullURL(); return false;" style="float:right"><span style="display: block;overflow: hidden;"><input type="text" tabindex=1 style="width:97%" id="url"></span></td>'+<br />
'<td width="120"><label for="title">&nbsp;Title: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="title"></td></tr>'+<br />
'<tr><td width="120"><label for="last">&nbsp;Last name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="last"></td>'+<br />
'<td width="120"><label for="first">&nbsp;First name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="first"></td></tr>'+<br />
'<tr><td width="120"><label for="coauthors">&nbsp;Coauthors: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="coauthors"></td>'+<br />
'<td width="120"><label for="date">&nbsp;Publication date: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="date"></td></tr>'+<br />
'<tr><td width="120"><label for="work">&nbsp;' + ((template == 'cite news') ? 'Newspaper' : 'Work') + ': </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="work"></td>'+<br />
'<td width="120"><label for="publisher">&nbsp;Publisher: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="publisher"></td></tr>'+<br />
'<tr><td width="120"><label for="pages">&nbsp;Pages: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="pages"></td>'+<br />
'<td width="120"><label for="language">&nbsp;Language: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="language"></td></tr>'+<br />
'<tr><td width="120"><label for="accessdate">&nbsp;Access date: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="accessdate" value="'+ newtime +'"></td>'+<br />
'<td width="120"><label for="location">&nbsp;Location: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="location"></td></tr>';<br />
if (template == 'cite web') {<br />
form += '<tr><td width="120"><label for="archiveurl">&nbsp;Archive URL: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="archiveurl"></td>'+<br />
'<td width="120"><label for="archivedate">&nbsp;Archive date: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="archivedate"></td></tr>';<br />
}<br />
form += '<tr><td width="120"><label for="refname">&nbsp;Reference name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:60%" id="refname"><input type="button" value="<Last name" onClick="lastNameToRefname()"></td></tr>'+<br />
'</table>'+<br />
' <input type="button" value="Add citation" onClick="addcites()">'+<br />
' <input type="button" value="Preview citation" onClick="previewCitationDefault()"> \<br />
<img id="progress" src="//upload.wikimedia.org/wikipedia/commons/5/59/RefToolbar_spinning_throbber.gif" style="visibility: hidden" />'+<br />
'<input type="checkbox" tabindex=1 name="verbose" id="verbose" value="verbose"><label for="verbose">Vertical form</label>'+<br />
'<span style="float:right"><a href="//en.wikipedia.org/wiki/Template:'+template.replace(/ /g, '_')+'" target="_blank">[Template documentation]</a></span>'+<br />
'</fieldset><span id="previewSpan"></span></div>';<br />
document.getElementById('refToolFormArea').innerHTML = form;<br />
}<br />
<br />
function citeBook() {<br />
oldFormHide();<br />
var template = "cite book";<br />
numforms++;<br />
var form = '<div id="citediv'+numforms+'">'+<br />
'<fieldset><legend>Cite book source</legend>';<br />
<br />
form += '<table cellspacing="5" width="100%"> \<br />
<tr><td><label for="title">Title: </label></td> \<br />
<td colspan=5><input type="text" tabindex=1 style="width:100%" id="title"></td></tr>';<br />
for (var i=1;i<=3;i++) {<br />
var i_str = i == 1 ? '': ' '+i;<br />
form += '<tr> \<br />
<td width="130"><label for="last'+i+'">Author'+i_str+' last&nbsp;name: </label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="last'+i+'"></td> \<br />
<td><label for="first'+i+'">&nbsp;first&nbsp;name: </label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="first'+i+'"></td> \<br />
<td><label for="authorlink'+i+'">&nbsp;Authorlink: </label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="authorlink'+i+'"> \<br />
<!--<a id="authorLinkAnchor'+i+'"><img id="authorLinkButton'+i+'" src="static/progress.gif" border="0" style="visibility: hidden" /></a> \<br />
<a href="//en.wikipedia.org/wiki/%s" target="_blank"><img id="authorTryLink'+i+'" src="static/external.png" border="0" style="visibility: hidden" /></a> --> \<br />
</td> \<br />
</tr>';<br />
}<br />
form += '<tr><td><label for="coauthors">Coauthors: </label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="coauthors"></td> \<br />
<td><label for="editor">&nbsp;Editor: </label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="editor"></td> \<br />
<td><label for="others">&nbsp;Others: </label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="others"></td></tr> \<br />
</table> \<br />
<table cellspacing="5" width="100%"> \<br />
<tr><td width="130"><label for="publisher">Publisher: </label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="publisher"></td> \<br />
<td><label for="location">&nbsp;Location: </label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="location"></td></tr> \<br />
\<br />
<tr><td><label for="date">Publication&nbsp;date or&nbsp;year: </label></td> \<br />
<td><input type="text" tabindex=1 style="width:140px" id="date"> \<br />
<input id="dmy" name="dateformat" value="dmy" type="radio" tabindex=1 onclick="reformatDates()"><label for="dmy">dmy</label> \<br />
<input id="mdy" name="dateformat" value="mdy" type="radio" tabindex=1 onclick="reformatDates()"><label for="mdy">md, y</label> \<br />
<input id="ymd" name="dateformat" value="ymd" type="radio" tabindex=1 onclick="reformatDates()"><label for="ymd">y-m-d</label> \<br />
</td> \<br />
<td><label for="edition">&nbsp;Edition: </label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="edition"></td></tr> \<br />
\<br />
<tr><td><label for="series">Series: </label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="series"></td> \<br />
<td><label for="volume">&nbsp;Volume: </label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="volume"></td></tr> \<br />
\<br />
<tr><td><label for="pages">Page number(s):</label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="pages" name="pages" onFocus="this.style.backgroundColor=\'\';"></td> \<br />
<td><label for="chapter">&nbsp;Chapter: </label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="chapter"></td></tr> \<br />
\<br />
<tr><td><label for="isbn">ISBN: </label></td> \<br />
<td><input type="image" src="//upload.wikimedia.org/wikipedia/commons/6/62/Arrow_out_condensed.png" tabindex=1 alt="Fetch" title="Fill in citation data based on ISBN from Diberri\'s tool." onClick="pullISBN(); return false;" style="float:right"><span style="display: block;overflow: hidden;"><input type="text" tabindex=1 style="width:97%" id="isbn"></span></td> \<br />
<td><label for="language">&nbsp;Language: </label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="language"></td></tr> \<br />
\<br />
<tr><td><label for="url">URL: </label></td> \<br />
<td><input type="image" src="//upload.wikimedia.org/wikipedia/commons/6/62/Arrow_out_condensed.png" tabindex=1 alt="Fetch" title="Fill in citation data based on a Google Books URL." onClick="pullJs(); return false;" style="float:right"><span style="display: block;overflow: hidden;"><input type="text" tabindex=1 style="width:97%" id="url"></span></td> \<br />
<td><label for="accessdate">&nbsp;Access&nbsp;date:</label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="accessdate"></td></tr> \<br />
\<br />
<tr><td><label for="otherfields">Other&nbsp;fields:</label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="otherfields"></td> \<br />
<td><label for="refname">&nbsp;Ref&nbsp;name: </label></td> \<br />
<td><input type="text" tabindex=1 style="width:100%" id="refname"></td> \<br />
</tr> \<br />
</table> \<br />
\<br />
<input type="radio" tabindex=1 name="template" id="cite_book" value="cite_book" checked="1"><label for="cite_book">\{\{cite book}}</label> <sup><a href="//en.wikipedia.org/wiki/Template:Cite_book" target="_blank">[doc]</a></sup> \<br />
<input type="radio" tabindex=1 name="template" id="citation" value="citation"><label for="citation">\{\{citation}}</label> <sup><a href="//en.wikipedia.org/wiki/Template:Citation" target="_blank">[doc]</a></sup> \<br />
<input type="radio" tabindex=1 name="template" id="plain" value="plain"><label for="plain">plain wikicode (experimental)</label> \<br />
<input type="checkbox" tabindex=1 name="verbose" id="verbose" value="verbose"><label for="verbose">Vertical form</label> \<br />
<input type="checkbox" tabindex=1 name="extraparams" id="extraparams" value="extraparams"><label for="extraparams">Extra parameters</label> \<br />
<br /><input type="button" value="Add citation" onClick="makeCiteBook()"> \<br />
<input type="button" value="Preview citation" onClick="previewCitationBook()"> \<br />
<img id="progress" src="//upload.wikimedia.org/wikipedia/commons/5/59/RefToolbar_spinning_throbber.gif" style="visibility: hidden" /> \<br />
\<br />
</fieldset><span id="previewSpan"></span></div>';<br />
document.getElementById('refToolFormArea').innerHTML = form;<br />
}<br />
<br />
function citeJournal() {<br />
oldFormHide();<br />
var template = "cite journal";<br />
numforms++;<br />
var form = '<div id="citediv'+numforms+'">'+<br />
'<fieldset><legend>Cite journal</legend>'+<br />
'<table cellspacing="5">'+<br />
'<input type="hidden" value="'+template+'" id="template">'+<br />
'<tr><td width="120"><label for="last">&nbsp;Last name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="last"></td>'+<br />
'<td width="120"><label for="first">&nbsp;First name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="first"></td></tr>'+<br />
'<tr><td width="120"><label for="coauthors">&nbsp;Coauthors: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="coauthors"></td>'+<br />
'<td width="120"><label for="date">&nbsp;Publication date: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="date"></td></tr>'+<br />
'<tr><td width="120"><label for="title">&nbsp;Title: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="title"></td>'+<br />
'<td width="120"><label for="journal">&nbsp;Journal: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="journal"></td></tr>'+<br />
'<tr><td width="120"><label for="publisher">&nbsp;Publisher: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="publisher"></td>'+<br />
'<td width="120"><label for="location">&nbsp;Location: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="location"></td></tr>'+<br />
'<tr><td width="120"><label for="volume">&nbsp;Volume: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="volume"></td>'+<br />
'<td width="120"><label for="issue">&nbsp;Issue: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="issue"></td></tr>'+<br />
'<tr><td width="120"><label for="pages">&nbsp;Pages: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="pages"></td>'+<br />
'<td width="120"><label for="issn">&nbsp;ISSN: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="issn"></td></tr>'+<br />
'<tr><td width="120"><label for="oclc">&nbsp;OCLC: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="oclc"></td>'+<br />
'<td width="120"><label for="doi">&nbsp;DOI: </label></td>'+<br />
'<td width="400"><input type="image" src="//upload.wikimedia.org/wikipedia/commons/6/62/Arrow_out_condensed.png" tabindex=1 alt="Fetch" title="Fetch citation data for a DOI from crossref.org and fill in the other fields." onClick="pullDOI(); return false;" style="float:right"><span style="display: block;overflow: hidden;"><input type="text" tabindex=1 style="width:97%" id="doi"></span></td></tr>'+<br />
'<tr><td width="120"><label for="pmid">&nbsp;PMID: </label></td>'+<br />
'<td width="400"><input type="image" src="//upload.wikimedia.org/wikipedia/commons/6/62/Arrow_out_condensed.png" tabindex=1 alt="Fetch" title="Fetch citation data for a PMID" onClick="pullPMID(); return false;" style="float:right;visibility:hidden"><span style="display: block;overflow: hidden;"><input type="text" tabindex=1 style="width:97%" id="pmid"></span></td>'+<br />
'<td width="120"><label for="quote">&nbsp;Quote: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="quote"></td></tr>'+<br />
'<tr><td width="120"><label for="url">&nbsp;URL: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="url"></td>'+<br />
'<td width="120"><label for="accessdate">&nbsp;Access date: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="accessdate"></td></tr>'+<br />
'<tr><td width="120"><label for="language">&nbsp;Language: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="language"></td>'+<br />
'<td width="120"><label for="refname">&nbsp;Reference name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:60%" id="refname"><input type="button" value="<Last name" onClick="lastNameToRefname()"></td></tr>'+<br />
'</table>'+<br />
'<input type="button" value="Add citation" onClick="addcites()">'+<br />
' <input type="button" value="Preview citation" onClick="previewCitationDefault()"> \<br />
<img id="progress" src="//upload.wikimedia.org/wikipedia/commons/5/59/RefToolbar_spinning_throbber.gif" style="visibility: hidden" />'+<br />
'<input type="checkbox" tabindex=1 name="verbose" id="verbose" value="verbose"><label for="verbose">Vertical form</label>'+<br />
'<span style="float:right"><a href="//en.wikipedia.org/wiki/Template:'+template.replace(/ /g, '_')+'" target="_blank">[Template documentation]</a></span>'+<br />
'</fieldset><span id="previewSpan"></span></div>';<br />
document.getElementById('refToolFormArea').innerHTML = form;<br />
}<br />
<br />
function citeEncyclopedia() {<br />
oldFormHide();<br />
var template = "cite encyclopedia";<br />
numforms++;<br />
var form = '<div id="citediv'+numforms+'">'+<br />
'<fieldset><legend>Cite encyclopedia source</legend>'+<br />
'<table cellspacing="5">'+<br />
'<input type="hidden" value="'+template+'" id="template">'+<br />
'<tr><td width="120"><label for="last">&nbsp;Last name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="last"></td>'+<br />
'<td width="120"><label for="first">&nbsp;First name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="first"></td></tr>'+<br />
'<tr><td width="120"><label for="coauthors">&nbsp;Coauthors: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="coauthors"></td>'+<br />
'<td width="120"><label for="editors">&nbsp;Editors: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="editors"></td></tr>'+<br />
'<tr><td width="120"><label for="title">&nbsp;Entry title: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="title"></td>'+<br />
'<td width="120"><label for="encyclopedia">&nbsp;Encyclopedia: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="encyclopedia"></td></tr>'+<br />
'<tr><td width="120"><label for="publisher">&nbsp;Publisher: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="publisher"></td>'+<br />
'<td width="120"><label for="location">&nbsp;Location: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="location"></td></tr>'+<br />
'<tr><td width="120"><label for="year">&nbsp;Year: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="year"></td>'+<br />
'<td width="120"><label for="volume">&nbsp;Volume: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="volume"></td></tr>'+<br />
'<tr><td width="120"><label for="pages">&nbsp;Pages: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="pages"></td>'+<br />
'<td width="120"><label for="isbn">&nbsp;ISBN: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="isbn"></td></tr>'+<br />
'<tr><td width="120"><label for="url">&nbsp;URL: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="url"></td>'+<br />
'<td width="120"><label for="accessdate">&nbsp;Access date: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="accessdate"></td></tr>'+<br />
'<tr><td width="120"><label for="language">&nbsp;Language: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="language"></td>'+<br />
'<td width="120"><label for="refname">&nbsp;Reference name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="refname"></td></tr>'+<br />
'</table>'+<br />
'<input type="button" value="Add citation" onClick="addcites()">'+<br />
' <input type="button" value="Preview citation" onClick="previewCitationDefault()"> \<br />
<img id="progress" src="//upload.wikimedia.org/wikipedia/commons/5/59/RefToolbar_spinning_throbber.gif" style="visibility: hidden" />'+<br />
'<input type="checkbox" tabindex=1 name="verbose" id="verbose" value="verbose"><label for="verbose">Vertical form</label>'+<br />
'<span style="float:right"><a href="//en.wikipedia.org/wiki/Template:'+template.replace(/ /g, '_')+'" target="_blank">[Template documentation]</a></span>'+<br />
'</fieldset><span id="previewSpan"></span></div>';<br />
document.getElementById('refToolFormArea').innerHTML = form;<br />
}<br />
<br />
function citePressRelease() {<br />
oldFormHide();<br />
var template = "cite press release";<br />
numforms++;<br />
var form = '<div id="citediv'+numforms+'">'+<br />
'<fieldset><legend>Cite press release</legend>'+<br />
'<table cellspacing="5">'+<br />
'<input type="hidden" value="'+template+'" id="template">'+<br />
'<tr><td width="120"><label for="title">&nbsp;Title: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="title"></td>'+<br />
'<td width="120"><label for="publisher">&nbsp;Publisher: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="publisher"></td></tr>'+<br />
'<tr><td width="120"><label for="date">&nbsp;Date: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="date"></td>'+<br />
'<td width="120"><label for="language">&nbsp;Language: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="language"></td></tr>'+<br />
'<tr><td width="120"><label for="url">&nbsp;URL: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="url"></td>'+<br />
'<td width="120"><label for="accessdate">&nbsp;Access date: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="accessdate" value="'+ getTime() +'"></td></tr>'+<br />
'<tr><td width="120"><label for="refname">&nbsp;Reference name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="refname"></td></tr>'+<br />
'</table>'+<br />
'<input type="button" value="Add citation" onClick="addcites()">'+<br />
' <input type="button" value="Preview citation" onClick="previewCitationDefault()"> \<br />
<img id="progress" src="//upload.wikimedia.org/wikipedia/commons/5/59/RefToolbar_spinning_throbber.gif" style="visibility: hidden" />'+<br />
'<input type="checkbox" tabindex=1 name="verbose" id="verbose" value="verbose"><label for="verbose">Vertical form</label>'+<br />
'<span style="float:right"><a href="//en.wikipedia.org/wiki/Template:'+template.replace(/ /g, '_')+'" target="_blank">[Template documentation]</a></span>'+<br />
'</fieldset><span id="previewSpan"></span></div>';<br />
document.getElementById('refToolFormArea').innerHTML = form;<br />
}<br />
<br />
function citeMap() {<br />
oldFormHide();<br />
var template = "cite map";<br />
numforms++;<br />
var form = '<div id="citediv'+numforms+'">'+<br />
'<fieldset><legend>Cite map</legend>'+<br />
'<table cellspacing="5">'+<br />
'<input type="hidden" value="'+template+'" id="template">'+<br />
'<tr><td width="120"><label for="publisher">&nbsp;Publisher: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="publisher"></td>'+<br />
'<td width="120"><label for="title">&nbsp;Title: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="title"></td></tr>'+<br />
'<tr><td width="120"><label for="url">&nbsp;URL: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="url"></td>'+<br />
'<td width="120"><label for="accessdate">&nbsp;Access date: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="accessdate"></td></tr>'+<br />
'<tr><td width="120"><label for="edition">&nbsp;Edition: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="edition"></td>'+<br />
'<td width="120"><label for="date">&nbsp;Date or year: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="date"></td></tr>'+<br />
'<tr><td width="120"><label for="cartography">&nbsp;Cartography: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="cartography"></td>'+<br />
'<td width="120"><label for="scale">&nbsp;Scale: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="scale"></td></tr>'+<br />
'<tr><td width="120"><label for="series">&nbsp;Series: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="series"></td>'+<br />
'<td width="120"><label for="page">&nbsp;Page: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="page"></td></tr>'+<br />
'<tr><td width="120"><label for="section">&nbsp;Section: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="section"></td>'+<br />
'<td width="120"><label for="inset">&nbsp;Inset: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="inset"></td></tr>'+<br />
'<tr><td width="120"><label for="isbn">&nbsp;ISBN: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="isbn"></td>'+<br />
'<td width="120"><label for="refname">&nbsp;Reference name: </label></td>'+<br />
'<td width="400"><input type="text" tabindex=1 style="width:100%" id="refname"></td></tr>'+<br />
'</table>'+<br />
'<input type="button" value="Add citation" onClick="addcites()">'+<br />
' <input type="button" value="Preview citation" onClick="previewCitationDefault()"> \<br />
<img id="progress" src="//upload.wikimedia.org/wikipedia/commons/5/59/RefToolbar_spinning_throbber.gif" style="visibility: hidden" />'+<br />
'<input type="checkbox" tabindex=1 name="verbose" id="verbose" value="verbose"><label for="verbose">Vertical form</label>'+<br />
'<span style="float:right"><a href="//en.wikipedia.org/wiki/Template:'+template.replace(/ /g, '_')+'" target="_blank">[Template documentation]</a></span>'+<br />
'</fieldset><span id="previewSpan"></span></div>';<br />
document.getElementById('refToolFormArea').innerHTML = form;<br />
}<br />
<br />
function showRefSectionOptions() {<br />
oldFormHide();<br />
var template = "cite encyclopedia";<br />
numforms++;<br />
var form = '<div id="citediv'+numforms+'">'+<br />
'<fieldset><legend>Add references section</legend>\<br />
Headline:<br />\<br />
<input id="references" name="headline" type="radio" tabindex=1 checked="checked"><label for="references">== References ==</label><br /> \<br />
<input id="notes" name="headline" type="radio" tabindex=1><label for="notes">== Notes ==</label><br /> \<br />
Type:<br /> \<br />
<input id="type-references" name="type" type="radio" tabindex=1><label for="type-references">&lt;references/&gt;</label><br /> \<br />
<input id="type-reflist" name="type" type="radio" tabindex=1 checked="checked"><label for="type-reflist">\{\{Reflist}}</label><br /> \<br />
<input id="type-reflist2" name="type" type="radio" tabindex=1><label for="type-reflist2">\{\{Reflist|2}}</label><br /> \<br />
<input type="checkbox" tabindex=1 id="ldr"><label for="ldr">List-defined references</label> (<a href="//en.wikipedia.org/wiki/Wikipedia:Footnotes#List-defined_references" target="_blank">Info 1</a>, <a href="//en.wikipedia.org/wiki/Help:Footnotes#List-defined_references" target="_blank">Info 2</a>)<br />\<br />
<input type="button" value="Add references section" onClick="addRefSection()">'+<br />
'</fieldset></div>';<br />
document.getElementById('citeselect').innerHTML += form;<br />
}<br />
<br />
function makeCiteCode() {<br />
cites = document.getElementById('citediv'+numforms).getElementsByTagName('input');<br />
var template = '';<br />
var citebegin = '<ref';<br />
var citename = '';<br />
var citeinner = '';<br />
for (var i=0; i<cites.length; i++) {<br />
var citeid = cites[i].id;<br />
var citevalue = cites[i].value;<br />
citevalue = citevalue.trim(); //Trim leading and trailing whitespace<br />
if (citeid == "verbose") {<br />
if (cites[i].checked) {<br />
citeinner = citeinner.replace(/\|/g, "\n|");<br />
}<br />
}<br />
else if (citevalue !== '' && cites[i].type !== 'button' && cites[i].type !== 'image') {<br />
if (citeid === "refname") {<br />
citebegin += ' name="' + citevalue + '"';<br />
}<br />
else if (citeid == "template") {<br />
citename = '>\{\{' + citevalue;<br />
template = citevalue;<br />
}<br />
else {<br />
if (citeid === "pages") {<br />
if (citevalue.match(/^\w+$/) && template != 'cite encyclopedia') {<br />
citeid = "page"; //Use page= instead of pages= if only one page. Makes p. 5 instead of pp. 5.<br />
}<br />
else {<br />
citevalue = citevalue.replace(/-/g, "–"); //Replace hyphens with en dashes [[WP:ENDASH]]<br />
}<br />
}<br />
else if (citeid == "date" && citevalue.match(/^\d\d\d\d$/)) {<br />
citeid = "year"; // Use year= instead of date= if only the year is specified<br />
}<br />
citeinner += "|" + citeid + "=" + citevalue;<br />
}<br />
}<br />
}<br />
cite = citebegin + citename + citeinner + "}}</ref>";<br />
return cite;<br />
}<br />
<br />
function addcites(template) {<br />
var cite = makeCiteCode();<br />
$("#wpTextbox1").focus();<br />
insertTags(cite, '', '');<br />
//document.getElementById('citediv'+numforms).style.display = 'none';<br />
oldFormHide();<br />
}<br />
<br />
function addRefSection() {<br />
var wikicode = "\n";<br />
if (document.getElementById('references').checked) {<br />
wikicode += "== References ==\n";<br />
}<br />
else if (document.getElementById('notes').checked) {<br />
wikicode += "== Notes ==\n";<br />
}<br />
else {alert('No headline selected!');}<br />
<br />
if (document.getElementById('type-references').checked) {<br />
if (document.getElementById('ldr').checked) {<br />
wikicode += "<references>\n\n</references>\n";<br />
}<br />
else {<br />
wikicode += "<references/>\n";<br />
}<br />
}<br />
else if (document.getElementById('type-reflist').checked || document.getElementById('type-reflist2').checked) {<br />
var col2 = document.getElementById('type-reflist2').checked ? '|2' : '' ;<br />
if (document.getElementById('ldr').checked) {<br />
wikicode += "\{\{Reflist" + col2 + "|refs=\n\n}}\n";<br />
}<br />
else {<br />
wikicode += "\{\{Reflist" + col2 + "}}\n";<br />
}<br />
}<br />
else {alert('No type selected!');}<br />
$("#wpTextbox1").focus();<br />
insertTags(wikicode, '', '');<br />
document.getElementById('citediv'+numforms).innerHTML = '';<br />
}<br />
<br />
function getNamedRefs(calls) {<br />
if (typeof(wikEdUseWikEd) != 'undefined') {<br />
if (wikEdUseWikEd == true) {<br />
WikEdUpdateTextarea();<br />
}<br />
}<br />
text = document.getElementById('wpTextbox1').value;<br />
var regex;<br />
if (calls) {<br />
regex = /< *?ref +?name *?= *?(('([^']*?)')|("([^"]*?)")|([^'"\s]*?[^\/]\b)) *?\/ *?>/gi //'<br />
} else {<br />
regex = /< *?ref +?name *?= *?(('([^']*?)')|("([^"]*?)")|([^'"\s]*?[^\/]\b)) *?>/gi //'<br />
}<br />
var namedrefs = new Array();<br />
var i=0;<br />
var nr=true;<br />
do {<br />
ref = regex.exec(text);<br />
if(ref != null){<br />
if (ref[5]) {<br />
namedrefs[i] = ref[5];<br />
} else if (ref[3]) {<br />
namedrefs[i] = ref[3];<br />
} else {<br />
namedrefs[i] = ref[6];<br />
}<br />
i++;<br />
} else {<br />
nr=false;<br />
}<br />
} while (nr==true);<br />
return namedrefs;<br />
}<br />
<br />
function citeNamedRef() {<br />
var namedrefs = getNamedRefs(false);<br />
if (namedrefs == '') {<br />
oldFormHide();<br />
numforms++;<br />
var out = '<div id="citediv'+numforms+'"><fieldset>'+<br />
'<legend>References in text</legend>There are no named refs (<tt>&lt;ref name="Name"&gt;</tt>) in the text</fieldset></div>';<br />
document.getElementById('citeselect').innerHTML += out;<br />
}<br />
else {<br />
oldFormHide();<br />
numforms++;<br />
var form = '<div id="citediv'+numforms+'">'+<br />
'<fieldset><legend>References in article</legend>'+<br />
'<table cellspacing="5">'+<br />
'<tr><td><label for="namedrefs">&nbsp;Named references in text</label></td>'+<br />
'<td><select name="namedrefs" id="namedrefs">';<br />
for (var i=0;i<namedrefs.length;i++) {<br />
form+= '<option value="'+namedrefs[i]+'">'+namedrefs[i]+'</option>';<br />
}<br />
form+= '</select>'+<br />
'</td></tr></table>'+<br />
'<input type="button" value="Add citation" onClick="addnamedcite()">'+<br />
'</fieldset></div>';<br />
document.getElementById('citeselect').innerHTML += form;<br />
}<br />
}<br />
<br />
function addnamedcite() {<br />
var name = document.getElementById('citediv'+numforms).getElementsByTagName('select')[0].value;<br />
var ref = '<ref name="'+name+'" />';<br />
$("#wpTextbox1").focus();<br />
insertTags(ref, '', '');<br />
document.getElementById('citediv'+numforms).style.display = 'none';<br />
}<br />
<br />
function getAllRefs() {<br />
if (typeof(wikEdUseWikEd) != 'undefined') {<br />
if (wikEdUseWikEd == true) {<br />
WikEdUpdateTextarea();<br />
}<br />
}<br />
var text = document.getElementById('wpTextbox1').value;<br />
var regex = /< *?ref( +?name *?= *?(('([^']*?)')|("([^"]*?)")|([^'"\s]*?[^\/]\b)))? *?>((.|\n)*?)< *?\/? *?ref *?>/gim //"<br />
var allrefs = new Array();<br />
var i=0;<br />
var nr=true;<br />
do {<br />
ref = regex.exec(text);<br />
if(ref != null){<br />
if (ref[0].search(/[^\s]{150}/) != -1) {<br />
ref[0] = ref[0].replace(/\|([^\s])/g, "| $1");<br />
}<br />
ref[0] = ref[0].replace(/</g, "&lt;");<br />
ref[0] = ref[0].replace(/>/g, "&gt;");<br />
allrefs[i] = ref[0];<br />
i++;<br />
} else {<br />
nr=false;<br />
}<br />
} while (nr==true);<br />
return allrefs;<br />
}<br />
<br />
function NRcallError(namedrefs, refname) {<br />
for (var i=0; i<namedrefs.length; i++) {<br />
if (namedrefs[i] == refname) {<br />
return true;<br />
}<br />
}<br />
return false;<br />
}<br />
<br />
function errorCheck() {<br />
var allrefs = getAllRefs();<br />
var allrefscontent = new Array();<br />
var samecontentexclude = new Array();<br />
var sx=0;<br />
var templateexclude = new Array();<br />
var tx=0;<br />
var skipcheck = false;<br />
var namedrefcalls = getNamedRefs(true);<br />
for (var i=0; i<allrefs.length; i++) {<br />
allrefscontent[i] = allrefs[i].replace(/&lt; *?ref( +?name *?= *?(('([^']*?)')|("([^"]*?)")|([^'"\s]*?[^\/]\b)))? *?&gt;((.|\n)*?)&lt; *?\/? *?ref *?&gt;/gim, "$8"); //"<br />
}<br />
var namedrefs = getNamedRefs(false);<br />
var errorlist = new Array();<br />
var q=0;<br />
var unclosed = document.getElementById('unclosed').checked;<br />
var samecontent = document.getElementById('samecontent').checked;<br />
var templates = document.getElementById('templates').checked;<br />
var repeated = document.getElementById('repeated').checked;<br />
var undef = document.getElementById('undef').checked;<br />
for (var i=0; i<allrefs.length; i++) {<br />
if (allrefs[i].search(/&lt; *?\/ *?ref *?&gt;/) == -1 && unclosed) {<br />
errorlist[q] = '<tr><td width="75%"><tt>'+allrefs[i]+'</tt></td>';<br />
errorlist[q] += '<td width="25%">Unclosed <tt>&lt;ref&gt;</tt> tag</td></tr>';<br />
q++;<br />
}<br />
if (samecontent) {<br />
for (var d=0; d<samecontentexclude.length; d++) {<br />
if (allrefscontent[i] == samecontentexclude[d]) {<br />
skipcheck = true;<br />
}<br />
}<br />
var p=0;<br />
while (p<allrefs.length && !skipcheck) {<br />
if (allrefscontent[i] == allrefscontent[p] && i != p) {<br />
errorlist[q] = '<tr><td width="75%"><tt>'+allrefscontent[i]+'</tt></td>';<br />
errorlist[q] += '<td width="25%">Multiple refs contain this content, a <a href="//en.wikipedia.org/wiki/Wikipedia:Footnotes#Naming_a_ref_tag_so_it_can_be_used_more_than_once">named reference</a> should be used instead</td></tr>';<br />
q++;<br />
samecontentexclude[sx] = allrefscontent[i]<br />
sx++;<br />
break;<br />
}<br />
p++;<br />
}<br />
skipcheck=false;<br />
}<br />
if (templates) {<br />
if (allrefscontent[i].search(/\{\{cite/i) == -1 && allrefscontent[i].search(/\{\{citation/i) == -1 && allrefscontent[i].search(/\{\{Comic (book|strip) reference/i) == -1 && allrefscontent[i].search(/\{\{Editorial cartoon reference/i) == -1 && allrefscontent[i].search(/\{\{harv/i) == -1) {<br />
for (var x=0; x<templateexclude.length; x++) {<br />
if (allrefscontent[i] == templateexclude[x]) {<br />
skipcheck = true;<br />
}<br />
}<br />
if (!skipcheck) {<br />
errorlist[q] = '<tr><td width="75%"><tt>'+allrefs[i]+'</tt></td>';<br />
errorlist[q] += '<td width="25%">Does not use a <a href="//en.wikipedia.org/wiki/Wikipedia:Citation_templates">citation template</a></td></tr>';<br />
q++;<br />
templateexclude[tx] = allrefscontent[i];<br />
tx++;<br />
}<br />
skipcheck = false;<br />
}<br />
}<br />
}<br />
if (repeated) {<br />
var repeatnameexclude = new Array();<br />
var rx=0;<br />
for (var k=0; k<namedrefs.length; k++) {<br />
for (var d=0; d<repeatnameexclude.length; d++) {<br />
if (namedrefs[k] == repeatnameexclude[d]) {<br />
skipcheck = true;<br />
}<br />
}<br />
var z=0;<br />
while (z<namedrefs.length && !skipcheck) {<br />
if (namedrefs[k] == namedrefs[z] && k != z) {<br />
errorlist[q] = '<tr><td width="75%"><tt>'+namedrefs[k]+'</tt></td>';<br />
errorlist[q] += '<td width="25%">Multiple references are given the same <a href="//en.wikipedia.org/wiki/Wikipedia:Footnotes#Naming_a_ref_tag_so_it_can_be_used_more_than_once">name</a></td></tr>';<br />
q++;<br />
repeatnameexclude[rx] = namedrefs[z];<br />
rx++;<br />
break;<br />
}<br />
z++;<br />
}<br />
skipcheck = false;<br />
}<br />
}<br />
if (undef) {<br />
var undefexclude = new Array();<br />
var ux=0;<br />
for (var p=0; p<namedrefcalls.length; p++) {<br />
for (var d=0; d<undefexclude.length; d++) {<br />
if (allrefscontent[i] == undefexclude[d]) {<br />
skipcheck = true;<br />
}<br />
}<br />
if (!skipcheck) {<br />
if (!NRcallError(namedrefs, namedrefcalls[p])) {<br />
errorlist[q] = '<tr><td width="75%"><tt>'+namedrefcalls[p]+'</tt></td>';<br />
errorlist[q] += '<td width="25%">A <a href="//en.wikipedia.org/wiki/Wikipedia:Footnotes#Naming_a_ref_tag_so_it_can_be_used_more_than_once">named reference</a> is used but not defined</td></tr>';<br />
q++;<br />
undefexclude[ux] = namedrefs[p];<br />
ux++;<br />
}<br />
}<br />
skipcheck = false;<br />
}<br />
}<br />
if (q > 0) {<br />
return errorlist;<br />
} else {<br />
return 0;<br />
}<br />
}<br />
<br />
function dispErrors() {<br />
oldFormHide();<br />
var form = '<div id="errorform"><fieldset>'+<br />
'<legend>Error checking</legend>'+<br />
'<b>Check for:</b><br/>'+<br />
'<input type="checkbox" id="unclosed" /> Unclosed <tt>&lt;ref&gt;</tt> tags<br/>'+<br />
'<input type="checkbox" id="samecontent" /> References with the same content<br/>'+<br />
'<input type="checkbox" id="templates" /> References not using a <a href="//en.wikipedia.org/wiki/Wikipedia:Citation_templates">citation template</a><br/>'+<br />
'<input type="checkbox" id="repeated" /> Multiple references with the same name<br/>'+<br />
'<input type="checkbox" id="undef" /> Usage of undefined named references<br/>'+<br />
'<input type="button" id="errorchecksubmit" value="Check for selected errors" onclick="doErrorCheck()"/>'+<br />
'</fieldset></div>';<br />
document.getElementById('citeselect').innerHTML += form;<br />
}<br />
<br />
function doErrorCheck() {<br />
var errors = errorCheck();<br />
document.getElementById('citeselect').removeChild(document.getElementById('errorform'));<br />
if (errors == 0) {<br />
if (numforms != 0) {<br />
document.getElementById('citediv'+numforms).style.display = 'none';<br />
}<br />
numforms++;<br />
out = '<div id="citediv'+numforms+'"><fieldset>'+<br />
'<legend>Error checking</legend>No errors found.</fieldset></div>';<br />
document.getElementById('citeselect').innerHTML += out;<br />
}<br />
else {<br />
if (numforms != 0) {<br />
document.getElementById('citediv'+numforms).style.display = 'none';<br />
}<br />
numforms++;<br />
form = '<div id="citediv'+numforms+'">'+<br />
'<fieldset><legend>Error checking</legend>'+<br />
'<table border="1px">';<br />
for (var i=0; i<errors.length; i++) {<br />
form+=errors[i];<br />
}<br />
form+= '</table>'+<br />
'</fieldset></div>';<br />
document.getElementById('citeselect').innerHTML += form;<br />
}<br />
}<br />
<br />
function makeBookCitationCode(callback) {<br />
var cite = '<ref';<br />
var refname = document.getElementById('refname').value;<br />
if (/\S/.test(refname)) {<br />
cite += ' name="' + refname + '"';<br />
}<br />
cite += '>\{\{';<br />
<br />
if (document.getElementById('cite_book').checked || document.getElementById('plain').checked) {<br />
cite += 'cite book';<br />
}<br />
else if (document.getElementById('citation').checked) {<br />
cite += 'citation';<br />
}<br />
else {alert('No template selected.');}<br />
<br />
var authorcite = '';<br />
var prevauthor = 0;<br />
for (var i=3;i>=1;i--) {<br />
//var author = document.getElementById('author' + i).value;<br />
var last = document.getElementById('last' + i).value;<br />
var first = document.getElementById('first' + i).value;<br />
var authorlink = document.getElementById('authorlink' + i).value;<br />
if (i==1 && !prevauthor) { i = ''; }<br />
if (/\S/.test(authorlink)) {<br />
authorcite = '|authorlink' + i + '=' + authorlink + authorcite;<br />
}<br />
if (/\S/.test(last)) {<br />
authorcite = '|last' + i + '=' + last + '|first' + i + '=' + first + authorcite;<br />
prevauthor = 1;<br />
}<br />
/*else if (/\S/.test(author)) {<br />
authorcite = '|author' + i + '=' + author + authorcite;<br />
prevauthor = 1;<br />
}*/<br />
}<br />
cite += authorcite;<br />
<br />
var simplefields = ["coauthors", "editor", "others", "title", "url", "accessdate","edition","series","volume","date","publisher","location","language","isbn","pages","chapter"];<br />
for (var i=0;i<simplefields.length;i++) {<br />
var fieldname = simplefields[i];<br />
var value = document.getElementById(fieldname).value;<br />
if (/\S/.test(value) || fieldname == "title") {<br />
if (fieldname == "pages") {<br />
if (/^\w+$/.test(value)) {<br />
fieldname = "page"; //Use page= instead of pages= if only one page. Makes p. 5 instead of pp. 5.<br />
}<br />
else {<br />
value = value.replace(/-/g, "–"); //Replace hyphens with en dashes [[WP:ENDASH]]<br />
value = value.replace(/,\s*\s?/g, ", "); //One space after each comma<br />
}<br />
}<br />
else if (fieldname == "date" && /^\d\d\d\d$/.test(value)) {<br />
fieldname = "year"; // Use year= instead of date= if only the year is specified<br />
}<br />
cite += '|' + fieldname + '=' + value;<br />
}<br />
}<br />
<br />
<br />
var otherfields = document.getElementById('otherfields').value;<br />
if (/\S/.test(otherfields)) {<br />
cite += '|' + otherfields;<br />
}<br />
<br />
if (document.getElementById('extraparams').checked) {<br />
cite += '|authormask=';<br />
if (!document.getElementById('citation').checked) {<br />
cite += '|trans_title=';<br />
}<br />
cite += '|format=';<br />
cite += '|origyear=';<br />
cite += '|oclc=';<br />
cite += '|doi=';<br />
cite += '|bibcode=';<br />
cite += '|id=';<br />
if (/\S/.test(document.getElementById('chapter').value)) {<br />
if (!document.getElementById('citation').checked) {<br />
cite += '|trans_chapter=';<br />
} <br />
cite += '|chapterurl=';<br />
}<br />
cite += '|quote=';<br />
cite += '|laysummary=';<br />
cite += '|laydate=';<br />
}<br />
<br />
cite += "}}</ref>";<br />
<br />
<br />
if (document.getElementById('plain').checked) {<br />
var match = /^(.*?)(\{\{.*}})(.*?)$/.exec(cite);<br />
if (match) {<br />
var citebeg = match[1];<br />
var citemid = match[2];<br />
var citeend = match[3];<br />
citemid = citemid.replace(/cite book/, "Vancite book");<br />
//alert(citebeg + ':::' + citemid + ':::' + citeend);<br />
//document.getElementById('fullcite').value = 'Updating...';<br />
var url = 'api.php?action=expandtemplates&format=xml&text=' + encodeURIComponent(citemid);<br />
document.getElementById('progress').style.visibility = "visible";<br />
var xmlhttpExpand = new XMLHttpRequest();<br />
xmlhttpExpand.onreadystatechange=function() {<br />
if(xmlhttpExpand.readyState==4) { <br />
if(xmlhttpExpand.status==200) {<br />
document.getElementById('progress').style.visibility = "hidden";<br />
var xmlDoc=xmlhttpExpand.responseXML.documentElement;<br />
var expanded = xmlDoc.getElementsByTagName("expandtemplates")[0].textContent;<br />
if (expanded == undefined) {<br />
expanded = xmlDoc.getElementsByTagName("expandtemplates")[0].childNodes[0].nodeValue;<br />
}<br />
expanded = expanded.replace(/<span.*?>/ig, '');<br />
expanded = expanded.replace(/<\/span>/ig, '');<br />
expanded = expanded.replace(/<nowiki\/?>/ig, '');<br />
expanded = expanded.replace(/\&\#32\;/ig, ' ');<br />
expanded = expanded.replace(/\&\#59\;/ig, ';');<br />
expanded = expanded.replace(/\&\#91\;/ig, '[');<br />
expanded = expanded.replace(/\&\#93\;/ig, ']');<br />
<br />
plaincite = citebeg + expanded + citeend;<br />
//alert(plaincite);<br />
callback(plaincite);<br />
}<br />
else<br />
alert('The query returned an error.');<br />
}<br />
}<br />
xmlhttpExpand.open("GET",url,true);<br />
xmlhttpExpand.send(null);<br />
}<br />
else {alert('Error A1');}<br />
}<br />
else {<br />
if (document.getElementById('verbose').checked) {<br />
cite = cite.replace(/\|/g, "\n|");<br />
}<br />
callback(cite);<br />
}<br />
}<br />
<br />
function makeCiteBook() {<br />
makeBookCitationCode(function(cite) { <br />
$("#wpTextbox1").focus();<br />
insertTags(cite, '', ''); <br />
if (!refToolDebug) { oldFormHide(); }<br />
});<br />
}<br />
<br />
function formatDate(datein, dateformat) {<br />
if (dateformat == '') {return (datein);}<br />
datein = datein.replace(/^\s*(.*?)\s*$/, "$1"); //Trim whitespace<br />
var year = -1;<br />
var month = -1;<br />
var date = -1;<br />
var match = /^(\d\d\d\d)-(\d\d?)(-(\d\d?))?$/.exec(datein);<br />
if(match) {<br />
//alert(' match[1]=' + match[1] + ' match[2]=#' + match[2] + '# match[3]=' + match[3] + ' match[4]=' + match[4] );<br />
year = parseInt(match[1], 10); //10 forces decimal conversion<br />
month = parseInt(match[2], 10);<br />
if (match[4]) {<br />
date = parseInt(match[4], 10);<br />
}<br />
}<br />
else if (/^\d\d? \w+ \d\d\d\d$/.test(datein) || /^\w+ \d\d?, \d\d\d\d$/.test(datein)) {<br />
var DT = new Date(datein);<br />
year = DT.getUTCFullYear();<br />
month = DT.getUTCMonth()+1;<br />
date = DT.getUTCDate()+1;<br />
}<br />
else if (datein == 'today') {<br />
var DT = new Date();<br />
year = DT.getUTCFullYear();<br />
month = DT.getUTCMonth()+1;<br />
date = DT.getUTCDate();<br />
}<br />
else {return (datein);}<br />
//alert('datein=' + datein + ', y=' + year + ', m=' + month + ', d=' + date);<br />
<br />
var zmonth = '';<br />
if (month < 10) {<br />
zmonth = "0"+month.toString();<br />
} else {<br />
zmonth = month.toString();<br />
}<br />
month = month.toString();<br />
var zdate = '';<br />
if (date > -1) {<br />
if (date < 10) {<br />
zdate = "0"+date.toString();<br />
} else {<br />
zdate = date.toString();<br />
}<br />
date = date.toString()<br />
}<br />
else { date = ''; }<br />
<br />
var datestr = dateformat;<br />
datestr = datestr.replace('<date>', date);<br />
datestr = datestr.replace('<month>', month);<br />
datestr = datestr.replace('<zdate>', zdate);<br />
datestr = datestr.replace('<zmonth>', zmonth);<br />
datestr = datestr.replace('<monthname>', months[month-1]);<br />
datestr = datestr.replace('<year>', year.toString());<br />
datestr = datestr.replace(/\s+/, ' ').replace(/^\s+/, '').replace(/(\D),/, '$1').replace(/-$/, '');<br />
return (datestr);<br />
}<br />
<br />
<br />
function getDateFormat() {<br />
var dateformat = '';<br />
if (document.getElementById('dmy')){<br />
if (document.getElementById('dmy').checked) {dateformat = '<date> <monthname> <year>'}<br />
else if (document.getElementById('mdy').checked) {dateformat = '<monthname> <date>, <year>'}<br />
else if (document.getElementById('ymd').checked) {dateformat = '<year>-<zmonth>-<zdate>'}<br />
}<br />
else if (citeUserDateFormat) {<br />
dateformat = citeUserDateFormat;<br />
} else {<br />
dateformat = citeGlobalDateFormat;<br />
}<br />
return (dateformat);<br />
}<br />
<br />
function reformatDates() {<br />
var dateformat = getDateFormat();<br />
//alert(':' + dateformat + ':');<br />
document.getElementById('accessdate').value = formatDate(document.getElementById('accessdate').value, dateformat);<br />
document.getElementById('date').value = formatDate(document.getElementById('date').value, dateformat);<br />
//document.getElementById('dateformat_hidden').value = getDateFormatShort();<br />
}<br />
<br />
/*function updateGetButton() {<br />
document.getElementById('urlget').disabled = document.getElementById('url').value == '';<br />
}*/<br />
<br />
function preview(wikitext) {<br />
document.getElementById('progress').style.visibility = "visible";<br />
wikitext += '<references />';<br />
var url = "api.php?action=parse&format=xml&prop=text&text=" + encodeURIComponent(wikitext);<br />
var xmlhttp = new XMLHttpRequest();<br />
xmlhttp.onreadystatechange = function () {<br />
if (xmlhttp.readyState==4) {<br />
if(xmlhttp.status==200) {<br />
document.getElementById('progress').style.visibility = "hidden";<br />
var xmlDoc=xmlhttp.responseXML.documentElement;<br />
var previewHTML = xmlDoc.getElementsByTagName("text")[0].textContent;<br />
if (previewHTML == undefined) {<br />
previewHTML = xmlDoc.getElementsByTagName("text")[0].childNodes[0].nodeValue;<br />
}<br />
//alert(previewHTML);<br />
previewHTML = previewHTML.replace(/href="\//gi, 'href="//en.wikipedia.org/');<br />
document.getElementById('previewSpan').innerHTML = '<fieldset><legend>Citation preview</legend>' + previewHTML + '</fieldset>';<br />
}<br />
else<br />
alert('The query returned an error.');<br />
}<br />
};<br />
xmlhttp.open("GET", url, true);<br />
xmlhttp.send(null)<br />
}<br />
<br />
function previewCitationBook() {<br />
makeBookCitationCode(preview);<br />
}<br />
<br />
function previewCitationDefault() {<br />
var wikitext = makeCiteCode();<br />
preview(wikitext);<br />
}<br />
<br />
function pullJs() {<br />
var book_url = document.getElementById('url').value;<br />
if (book_url) {<br />
document.getElementById('progress').style.visibility = "visible";<br />
var book_url_enc = encodeURIComponent(book_url);<br />
if(!refTagURL) {refTagURL = defaultRefTagURL;}<br />
var baseurl = refTagURL + 'googlebooksjs.py';<br />
var url = baseurl + '?book_url=' + book_url_enc + '&callback=setFormValues';<br />
/*var script = document.createElement("script"); <br />
script.setAttribute("src",url);<br />
script.setAttribute("type","text/javascript"); <br />
document.body.appendChild(script);*/<br />
JsonRequest(url);<br />
}else{<br />
alert('No URL.');<br />
}<br />
}<br />
<br />
function pullISBN() {<br />
var isbn = document.getElementById('isbn').value;<br />
isbn = isbn.replace(/[^0-9]/g,""); //Digits only<br />
if (isbn) {<br />
document.getElementById('progress').style.visibility = "visible";<br />
if(!refTagURL) {refTagURL = defaultRefTagURL;}<br />
var baseurl = refTagURL + 'getdiberri.py';<br />
var url = baseurl + '?isbn=' + isbn + '&callback=useDiberriData';<br />
/*var script = document.createElement("script");<br />
script.setAttribute("src",url);<br />
script.setAttribute("type","text/javascript");<br />
document.body.appendChild(script);*/<br />
JsonRequest(url);<br />
}else{<br />
alert('No ISBN.');<br />
}<br />
}<br />
<br />
function pullDOI() {<br />
var doi = document.getElementById('doi').value;<br />
if (doi) {<br />
document.getElementById('progress').style.visibility = "visible";<br />
if(!refTagURL) {refTagURL = defaultRefTagURL;}<br />
var baseurl = refTagURL + 'doifetchjs.py';<br />
var url = baseurl + '?doi=' + encodeURIComponent(doi) + '&callback=useDoiData';<br />
JsonRequest(url);<br />
}else{<br />
alert('No DOI.');<br />
}<br />
}<br />
<br />
function pullPMID() {<br />
alert('Not implemented yet...');<br />
/*var doi = document.getElementById('doi').value;<br />
if (doi) {<br />
document.getElementById('progress').style.visibility = "visible";<br />
if(!refTagURL) {refTagURL = defaultRefTagURL;}<br />
var baseurl = refTagURL + 'doifetchjs.py';<br />
var url = baseurl + '?doi=' + encodeURIComponent(doi) + '&callback=useDoiData';<br />
JsonRequest(url);<br />
}else{<br />
alert('No DOI.');<br />
}*/<br />
}<br />
<br />
function pullURL() {<br />
var url = document.getElementById('url').value;<br />
if (url) {<br />
document.getElementById('progress').style.visibility = "visible";<br />
if(!refTagURL) {refTagURL = defaultRefTagURL;}<br />
var baseurl = refTagURL + 'urlfetchjs.py';<br />
var url = baseurl + '?url=' + encodeURIComponent(url) + '&callback=useUrlData';<br />
JsonRequest(url);<br />
}else{<br />
alert('No URl.');<br />
}<br />
}<br />
<br />
function JsonRequest(url) {<br />
//importScriptURI(url) //Bad: does not import the same script more than once<br />
var script = document.createElement("script"); <br />
script.setAttribute("src",url);<br />
script.setAttribute("type","text/javascript"); <br />
//document.body.appendChild(script);<br />
document.getElementsByTagName('head')[0].appendChild(script);<br />
}<br />
<br />
function setFormValues(bookdata) {<br />
document.getElementById('progress').style.visibility = "hidden";<br />
//alert(bookdata);<br />
//alert(bookdata.page);<br />
if (bookdata.title.length != 0) { document.getElementById('title').value = bookdata.title; }<br />
if (bookdata.isbn.length != 0) { document.getElementById('isbn').value = bookdata.isbn; }<br />
if (bookdata.publisher.length != 0) { document.getElementById('publisher').value = bookdata.publisher; }<br />
if (bookdata.pages.length != 0) { <br />
document.getElementById('pages').value = bookdata.pages; <br />
document.getElementById('pages').style.backgroundColor = '#FFFF99';<br />
}<br />
if (bookdata.url.length != 0) { document.getElementById('url').value = bookdata.url; }<br />
if (bookdata.date.length != 0) { document.getElementById('date').value = bookdata.date; }<br />
<br />
for (var i=0;i<bookdata.authors.length && i<=2;i++) {<br />
authorn = i+1;<br />
var author = bookdata.authors[i];<br />
var match = /(.+)\s+(.+)/.exec(author);<br />
if (match) {<br />
document.getElementById('first' + authorn).value = match[1];<br />
document.getElementById('last' + authorn).value = match[2];<br />
}<br />
else {<br />
document.getElementById('last' + authorn).value = author;<br />
}<br />
}<br />
document.getElementById('coauthors').value = bookdata.authors.splice(3).join(', ')<br />
setAccessDateToday()<br />
makeRefname()<br />
}<br />
<br />
function useDiberriData(bookdata) {<br />
document.getElementById('progress').style.visibility = "hidden";<br />
if (bookdata.title.length != 0) { document.getElementById('title').value = bookdata.title; }<br />
if (bookdata.isbn.length != 0) { document.getElementById('isbn').value = bookdata.isbn; }<br />
if (bookdata.publisher.length != 0) { document.getElementById('publisher').value = bookdata.publisher; }<br />
if (bookdata.location.length != 0) { document.getElementById('location').value = bookdata.location; }<br />
if (bookdata.year.length != 0) { document.getElementById('date').value = bookdata.year; }<br />
if (bookdata.authors.length != 0) {<br />
authors = bookdata.authors.split(';', 4);<br />
for (var i=0;i<authors.length && i<=2;i++) {<br />
authorn = i+1;<br />
nameparts = authors[i].split(',', 2);<br />
document.getElementById('last' + authorn).value = nameparts[0].trim();<br />
if (nameparts.length == 2) {<br />
document.getElementById('first' + authorn).value = nameparts[1].trim();<br />
}<br />
}<br />
if (authors[3]) { document.getElementById('coauthors').value = authors[3].trim(); }<br />
}<br />
makeRefname() <br />
}<br />
<br />
function useDoiData(bookdata) {<br />
document.getElementById('progress').style.visibility = "hidden";<br />
if (bookdata.title) { document.getElementById('title').value = bookdata.title; }<br />
//if (bookdata.isbn.length != 0) { document.getElementById('isbn').value = bookdata.isbn; }<br />
//if (bookdata.publisher.length != 0) { document.getElementById('publisher').value = bookdata.publisher; }<br />
//if (bookdata.location.length != 0) { document.getElementById('location').value = bookdata.location; }<br />
if (bookdata.year) { document.getElementById('date').value = bookdata.year; }<br />
if (bookdata.issn) { document.getElementById('issn').value = bookdata.issn; }<br />
if (bookdata.journal) { document.getElementById('journal').value = bookdata.journal; }<br />
if (bookdata.volume) { document.getElementById('volume').value = bookdata.volume; }<br />
if (bookdata.issue) { document.getElementById('issue').value = bookdata.issue; }<br />
if (bookdata.pages) { document.getElementById('pages').value = bookdata.pages; }<br />
<br />
if (bookdata.authors) {<br />
var coauthors = [];<br />
for (var i=0;i<bookdata.authors.length;i++) {<br />
var authorn = i+1;<br />
var author = bookdata.authors[i];<br />
if (authorn == 1) {<br />
if (author.last) { document.getElementById('last').value = author.last.trim(); }<br />
if (author.first) { document.getElementById('first').value = author.first.trim(); }<br />
}<br />
else {<br />
var authorparts = [];<br />
if (author.first) { authorparts.push( author.first.trim() ); }<br />
if (author.last) { authorparts.push( author.last.trim() ); }<br />
coauthors.push(authorparts.join(' '));<br />
}<br />
}<br />
if (coauthors[0]) { document.getElementById('coauthors').value = coauthors.join(', '); }<br />
}<br />
makeRefname();<br />
}<br />
<br />
function useUrlData(data) {<br />
document.getElementById('progress').style.visibility = "hidden";<br />
if (data.title) { document.getElementById('title').value = data.title; }<br />
if (data.work) { document.getElementById('work').value = data.work; }<br />
if (data.page) { document.getElementById('pages').value = data.page; }<br />
if (data.date) {<br />
document.getElementById('date').value = formatDate(data.date, getDateFormat());<br />
}<br />
/*if (data.author) {<br />
var authors = data.author.replace(/ [Aa]nd /, ', ');<br />
var match = /(.+),\s*(.+)/.exec(authors);<br />
var firstauthor = '';<br />
if (match) {<br />
firstauthor = match[1];<br />
var coauthors = match[2];<br />
document.getElementById('coauthors').value = coauthors;<br />
}<br />
else {<br />
firstauthor = data.author;<br />
}<br />
var match = /(.+)\s+(.+)/.exec(firstauthor);<br />
if (match) {<br />
document.getElementById('first').value = match[1];<br />
document.getElementById('last').value = match[2];<br />
}<br />
else {<br />
document.getElementById('last').value = author;<br />
}<br />
}*/<br />
if (data.authors) {<br />
var coauthors = [];<br />
for (var i=0;i<data.authors.length;i++) {<br />
var authorn = i+1;<br />
var author = data.authors[i];<br />
if (authorn == 1) {<br />
var match = /(.+)\s+(.+)/.exec(author);<br />
if (match) {<br />
document.getElementById('first').value = match[1].trim();<br />
document.getElementById('last').value = match[2].trim();<br />
}<br />
else {<br />
document.getElementById('last').value = author.trim();<br />
}<br />
}<br />
else {<br />
coauthors.push(author);<br />
}<br />
}<br />
if (coauthors[0]) { document.getElementById('coauthors').value = coauthors.join(', '); }<br />
}<br />
}<br />
<br />
$( refbuttons );</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=MediaWiki:RefToolbarConfig.js&diff=12942
MediaWiki:RefToolbarConfig.js
2017-06-09T08:44:56Z
<p>Nicolas Brouard: From https://en.wikipedia.org/w/index.php?title=MediaWiki:RefToolbarConfig.js&oldid=695089025</p>
<hr />
<div>/* Sitewide options for the the Cite toolbar button:<br />
* All options should be specified<br />
*<br />
* "date format" sets the date format used for the function to insert the current date<br />
* Current available options:<br />
* date - the day of the month<br />
* zdate - day of the month, zero padded to 2 digits<br />
* monthname - The month name<br />
* month - The numberic month (1-12)<br />
* zmonth - numeric month, zero padded to 2 digits<br />
* year - The full year (4 digits)<br />
*<br />
* "autodate fields" is a list of template fields that should have a button to insert the current date<br />
* <br />
* "months" is a list of localized month names<br />
*<br />
* "modal" - if true, the dialogs will be modal windows, blocking access to the rest of the window.<br />
* See http://en.wikipedia.org/wiki/Modal_window<br />
* All dialogs in the toolbar are modal by default<br />
*<br />
* "autoparse" - if true, previewing a ref will automatically trigger a preview of the parsed wikitext.<br />
* It is not recommended to set this to true as a global setting as it may slow the script down for<br />
* people with slow connections.<br />
*<br />
* "expandtemplates" - if true, templates and parser functions will be expanded when getting page text<br />
* (templates inside of ref tags will not be expanded). This will allow references inside of templates or<br />
* references using {{#tag:ref}} to be listed in the named refs dialog and searched by error checks.<br />
* This may slow loading the named refs and error check dialogs.<br />
*/<br />
<br />
CiteTB.Options = {<br />
"date format" : "<date> <monthname> <year>",<br />
"autodate fields" : ['accessdate'],<br />
"months" : ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],<br />
"modal" : true,<br />
"autoparse" : true,<br />
"expandtemplates" : false<br />
};<br />
<br />
// Cite template definitions<br />
new citeTemplate('cite web', 'web',<br />
[ // Basic fields<br />
{"field": "last<N>", "autofillprop":"last-incr", 'increment_group':'author'},<br />
{"field": "first<N>", "autofillprop":"first-incr", 'increment_group':'author', 'increment_button':true}, <br />
{"field": "title", "autofillprop":"title"},<br />
{"field": "url", "autofillid":"url"},<br />
{"field": "website", "autofillprop":"journal"},<br />
{"field": "publisher", "autofillprop":"publisher"},<br />
{"field": "accessdate"},<br />
{"field": "ref", "tooltip":"cite-ref-tooltip"}<br />
],<br />
[ // Expanded fields<br />
{"field": "author<N>", 'increment_group':'author_alt', 'increment_button':true},<br />
{"field": "authorlink<N>", "tooltip":"cite-authorlink-tooltip", 'increment_group':'authorlink', 'increment_button':true},<br />
{"field": "archiveurl"},<br />
{"field": "archivedate"},<br />
{"field": "location"},<br />
{"field": "page", "tooltip":"cite-page-tooltip"},<br />
{"field": "pages", "autofillprop":"pages", "tooltip":"cite-pages-tooltip"},<br />
{"field": "language", "autofillprop":"language"},<br />
{"field": "format"},<br />
{"field": "doi", "autofillid":"doi", "autofillprop":"doi"},<br />
{"field": "date", "autofillprop":"date"},<br />
{"field": "quote"}<br />
]);<br />
<br />
new citeTemplate('cite news', 'news',<br />
[ // Basic fields<br />
{"field": "last<N>", "autofillprop":"last-incr", 'increment_group':'author'},<br />
{"field": "first<N>", "autofillprop":"first-incr", 'increment_group':'author', 'increment_button':true}, <br />
{"field": "title", "autofillprop":"title"},<br />
{"field": "url", "autofillid":"url"},<br />
{"field": "accessdate"},<br />
{"field": "work", "tooltip":"cite-work-tooltip", "autofillprop":"journal"},<br />
{"field": "agency"},<br />
{"field": "issue"},<br />
{"field": "publisher", "autofillprop":"publisher"},<br />
{"field": "date", "autofillprop":"date"},<br />
{"field": "ref", "tooltip":"cite-ref-tooltip"}<br />
],<br />
[ // Expanded fields<br />
{"field": "author<N>", 'increment_group':'author_alt', 'increment_button':true},<br />
{"field": "authorlink<N>", "tooltip":"cite-authorlink-tooltip", 'increment_group':'authorlink', 'increment_button':true},<br />
{"field": "archiveurl"},<br />
{"field": "archivedate"},<br />
{"field": "location"},<br />
{"field": "page", "tooltip":"cite-page-tooltip"},<br />
{"field": "pages", "autofillprop":"pages", "tooltip":"cite-pages-tooltip"},<br />
{"field": "language", "autofillprop":"language"},<br />
{"field": "format"},<br />
{"field": "doi", "autofillid":"doi", "autofillprop":"doi"},<br />
{"field": "quote"}<br />
]);<br />
<br />
new citeTemplate('cite book', 'book',<br />
[ // Basic fields<br />
{"field": "last<N>", "autofillprop":"last-incr", 'increment_group':'author'},<br />
{"field": "first<N>", "autofillprop":"first-incr", 'increment_group':'author', 'increment_button':true}, <br />
{"field": "title", "autofillprop":"title"},<br />
{"field": "date", "autofillprop":"year"},<br />
{"field": "publisher", "autofillprop":"publisher"},<br />
{"field": "location", "autofillprop":"location"},<br />
{"field": "isbn", "autofillid":"isbn", "autofillprop":"isbn"},<br />
{"field": "page", "tooltip":"cite-page-tooltip"},<br />
{"field": "pages", "autofillprop":"pages", "tooltip":"cite-pages-tooltip"},<br />
{"field": "edition", "autofillprop":"edition"},<br />
{"field": "url", "autofillid":"url"},<br />
{"field": "accessdate"},<br />
{"field": "ref", "tooltip":"cite-ref-tooltip"}<br />
<br />
],<br />
[ // Expanded fields<br />
{"field": "author<N>", 'increment_group':'author_alt', 'increment_button':true},<br />
{"field": "authorlink<N>", "tooltip":"cite-authorlink-tooltip", 'increment_group':'authorlink', 'increment_button':true},<br />
{"field": "editor<N>-last", "increment_group":"editor"},<br />
{"field": "editor<N>-first", "increment_group":"editor", "increment_button":true},<br />
{"field": "editor<N>-link", 'increment_group':'editorlink', 'increment_button':true},<br />
{"field": "archiveurl"},<br />
{"field": "archivedate"},<br />
{"field": "language", "autofillprop":"language"},<br />
{"field": "format"},<br />
{"field": "chapter", "autofillprop":"chapter"},<br />
{"field": "quote"}<br />
]);<br />
<br />
new citeTemplate('cite journal', 'journal',<br />
[ // Basic fields<br />
{"field": "last<N>", "autofillprop":"last-incr", 'increment_group':'author'},<br />
{"field": "first<N>", "autofillprop":"first-incr", 'increment_group':'author', 'increment_button':true}, <br />
{"field": "title", "autofillprop":"title"},<br />
{"field": "journal", "autofillprop":"journal"},<br />
{"field": "date", "autofillprop":"date"},<br />
{"field": "volume", "autofillprop":"volume"},<br />
{"field": "issue", "autofillprop":"issue"},<br />
{"field": "page", "tooltip":"cite-page-tooltip"},<br />
{"field": "pages", "autofillprop":"pages", "tooltip":"cite-pages-tooltip"},<br />
{"field": "doi", "autofillid":"doi", "autofillprop":"doi"},<br />
{"field": "pmid", "autofillid":"pmid"},<br />
{"field": "url", "autofillid":"url"},<br />
{"field": "accessdate"},<br />
{"field": "ref", "tooltip":"cite-ref-tooltip"},<br />
],<br />
[ // Expanded fields<br />
{"field": "author<N>", 'increment_group':'author_alt', 'increment_button':true},<br />
{"field": "authorlink<N>", "tooltip":"cite-authorlink-tooltip", 'increment_group':'authorlink', 'increment_button':true},<br />
{"field": "editor<N>-last", "increment_group":"editor"},<br />
{"field": "editor<N>-first", "increment_group":"editor", "increment_button":true},<br />
{"field": "editor<N>-link", 'increment_group':'editorlink', 'increment_button':true},<br />
{"field": "series"},<br />
{"field": "at", "tooltip":"cite-at-tooltip"},<br />
{"field": "trans-title"},<br />
{"field": "publisher", "autofillprop":"publisher"},<br />
{"field": "location"},<br />
{"field": "language", "autofillprop":"language"},<br />
{"field": "format"},<br />
{"field": "issn", "autofillprop":"issn"},<br />
{"field": "pmc"},<br />
{"field": "oclc"},<br />
{"field": "bibcode"},<br />
{"field": "id"},<br />
{"field": "quote"},<br />
{"field": "postscript", "tooltip":"cite-postscript-tooltip"}<br />
]);<br />
<br />
new citeErrorCheck({'type':'reflist', 'testname':'samecontent', 'desc': 'cite-samecontent-desc',<br />
'func': function(reflist) {<br />
var errors = [];<br />
var refs2 = [];<br />
for(var i=0; i<reflist.length; i++) {<br />
if (!reflist[i].shorttag) {<br />
if ($.inArray(reflist[i].content, refs2) != -1) {<br />
if ($.inArray(reflist[i].content, errors) == -1) {<br />
errors.push(reflist[i].content);<br />
}<br />
} else {<br />
refs2.push(reflist[i].content);<br />
}<br />
}<br />
}<br />
ret = [];<br />
for(var j=0; j<errors.length; j++) {<br />
ret.push({'msg':'cite-samecontent-error', 'err':errors[j]});<br />
}<br />
return ret;<br />
}}<br />
);<br />
<br />
new citeErrorCheck({'type':'reflist', 'testname':'repeated', 'desc':'cite-repeated-desc',<br />
'func': function(reflist) {<br />
var errors = [];<br />
var refs2 = [];<br />
for(var i=0; i<reflist.length; i++) {<br />
if (!reflist[i].shorttag && reflist[i].refname) {<br />
if ($.inArray(reflist[i].refname, refs2) != -1) {<br />
if ($.inArray(reflist[i].refname, errors) == -1) {<br />
errors.push(reflist[i].refname);<br />
}<br />
} else {<br />
refs2.push(reflist[i].refname);<br />
}<br />
}<br />
}<br />
ret = [];<br />
for(var j=0; j<errors.length; j++) {<br />
ret.push({'msg':'cite-repeated-error', 'err':errors[j]});<br />
}<br />
return ret;<br />
}}<br />
);<br />
<br />
new citeErrorCheck({'type':'reflist', 'testname':'undefined', 'desc':'cite-undefined-desc',<br />
'func': function(reflist) {<br />
var errors = [];<br />
var longrefs = [];<br />
for(var i=0; i<reflist.length; i++) {<br />
if (!reflist[i].shorttag && reflist[i].refname) {<br />
longrefs.push(reflist[i].refname);<br />
}<br />
}<br />
for(var j=0; i<reflist.length; j++) {<br />
if (reflist[i].shorttag && $.inArray(reflist[i].refname, errors) == -1 && $.inArray(reflist[i].refname, longrefs) == -1) {<br />
errors.push(reflist[i].refname);<br />
}<br />
}<br />
ret = [];<br />
for(var j=0; j<errors.length; j++) {<br />
ret.push({'msg':'cite-undefined-error', 'err':errors[j]});<br />
}<br />
return ret;<br />
}}<br />
);<br />
<br />
CiteTB.init();</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=Kategorie:To_be_checked&diff=12935
Kategorie:To be checked
2013-09-06T09:57:54Z
<p>Nicolas Brouard: Obsah stránky nahrazen textem „<!--'''Category:To be checked'''-->
{{:en-ii:Template:Harmonization procedure}}“</p>
<hr />
<div><!--'''Category:To be checked'''--><br />
<br />
{{:en-ii:Template:Harmonization procedure}}</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=Kategorie:Coherent_with_the_1985-standard_(Spanish)&diff=12934
Kategorie:Coherent with the 1985-standard (Spanish)
2013-06-12T18:30:56Z
<p>Nicolas Brouard: Založena nová stránka: List of pages which have been modified in order to be compliant with the Spanish-1985 standard.</p>
<hr />
<div>List of pages which have been modified in order to be compliant with the Spanish-1985 standard.</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=Kategorie:Missing_Spanish_term&diff=12933
Kategorie:Missing Spanish term
2013-06-12T18:29:00Z
<p>Nicolas Brouard: Založena nová stránka: <!--'''Category:Missing Spanish term'''--> List of pages having missing or untranslated terms, which were "text terms" of the Spanish second edition of 1985. * Please l...</p>
<hr />
<div><!--'''Category:Missing Spanish term'''--><br />
List of pages having missing or untranslated terms, which were "text terms" of the Spanish second edition of 1985.<br />
<br />
* Please let this page be compliant with the 1985-standard (Spanish) by looking at the talk page. <br />
<br />
*A language which has been translated uniquely from the English second edition of 1982 is not compliant with the Spanish standard in the sense that many terms or sentences have not been translated into Spanish, either by omission or because it can't be translated or because the expression is not used in English. <br />
<br />
<br />
*However if it has not been translated in the English edition, the expression has been translated in other languages but not yours.<br />
<br />
* To add a page to this category, please add in ''the talk page of the page'' this template:<br />
:* <nowiki>{{missing French term|page|section|section-note or comment}} for example {{translated Spanish term|15|152|152-5}}</nowiki><br />
<br />
If you think that the term can't be translated, again please discuss this point in the Talk page of the page. And change the template name ''missing'' in for example <nowiki>{{missing Spanish term|15|152|152-5}}</nowiki> by:<br />
* ''translated'': <nowiki>{{translated Spanish term</nowiki>...<br />
* ''untranslatable'': <nowiki>{{untranslatable Spanish term</nowiki>...<br />
<br />
In both cases, the page will be added into the category [[:Category:Coherent with the 1985-standard (Spanish)]] because our goal is to detect omissions, not to impose a translation.<br />
<br />
<br />
[[Category:Missing Spanish term]]<br />
[[Category:Coherent with the 1985-standard (Spanish)]]<br />
[[Category:To be checked]]</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=%C5%A0ablona:Missing_Spanish_term&diff=12932
Šablona:Missing Spanish term
2013-06-12T18:23:46Z
<p>Nicolas Brouard: </p>
<hr />
<div><!--'''Template:missing Spanish term'''-->'''[[fr-ii:{{{1}}}#{{{2}}}|Español {{{3}}}]]''' ''[[:cs-ii:{{{1}}}#{{{2}}}|{{Lang name -cs}} {{{3}}}]]'' ([[:Category:Missing Spanish term|help?]]) '''Missing Spanish term''':<br />
:*[[:fr-ii:{{{SpanishTextTerm}}}|Español: {{{SpanishTextTerm}}}]] ([http://translate.google.cz/translate?js=y&prev=_t&hl={{CONTENTLANGUAGE}}&ie=UTF-8&layout=1&eotf=0&u=http%3A%2F%2Fes-ii.demopaedia.org{{localurl:{{{SpanishTextTerm}}}}}&sl=en&tl={{CONTENTLANGUAGE}} if not already translated to English or French])<br />
[[Category:Missing Spanish term]]</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=%C5%A0ablona:Missing_Spanish_term&diff=12931
Šablona:Missing Spanish term
2013-06-12T18:23:27Z
<p>Nicolas Brouard: From missing French</p>
<hr />
<div><!--'''Template:missing Spanish term'''-->'''[[fr-ii:{{{1}}}#{{{2}}}|Español {{{3}}}]]''' ''[[:cs-ii:{{{1}}}#{{{2}}}|{{Lang name -cs}} {{{3}}}]]'' ([[:Category:Missing French term|help?]]) '''Missing Spanish term''':<br />
:*[[:fr-ii:{{{SpanishTextTerm}}}|Español: {{{SpanishTextTerm}}}]] ([http://translate.google.cz/translate?js=y&prev=_t&hl={{CONTENTLANGUAGE}}&ie=UTF-8&layout=1&eotf=0&u=http%3A%2F%2Fes-ii.demopaedia.org{{localurl:{{{SpanishTextTerm}}}}}&sl=en&tl={{CONTENTLANGUAGE}} if not already translated to English or French])<br />
[[Category:Missing Spanish term]]</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=%C5%A0ablona:Missing_French_term&diff=12930
Šablona:Missing French term
2013-06-12T18:19:50Z
<p>Nicolas Brouard: </p>
<hr />
<div><!--'''Template:missing French term'''-->'''[[fr-ii:{{{1}}}#{{{2}}}|Français {{{3}}}]]''' ''[[:cs-ii:{{{1}}}#{{{2}}}|{{Lang name -cs}} {{{3}}}]]'' ([[:Category:Missing French term|help?]]) '''Missing French term''':<br />
:*[[:fr-ii:{{{FrenchTextTerm}}}|Français: {{{FrenchTextTerm}}}]] ([http://translate.google.cz/translate?js=y&prev=_t&hl={{CONTENTLANGUAGE}}&ie=UTF-8&layout=1&eotf=0&u=http%3A%2F%2Ffr-ii.demopaedia.org{{localurl:{{{FrenchTextTerm}}}}}&sl=fr&tl={{CONTENTLANGUAGE}} if not already translated to English or Spanish])<br />
[[Category:Missing French term]]</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=Diskuse:51&diff=12929
Diskuse:51
2013-06-12T18:18:44Z
<p>Nicolas Brouard: Adding Joseph note which was overwritten by the bot</p>
<hr />
<div><!--'''Talk:51'''--><br />
{{To be checked}}<br />
<br />
<br />
== 515-9 ==<br />
<br />
Note number 9 (§515) doesn't correspond to a TextTerm. This note should be move to another number.--[[Uživatel:Joseph Larmarange|Joseph Larmarange]] 07:56, 12 June 2012<br />
<br />
== Chapter 5 ==<br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/51#514 514-5] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/51#514 محيط] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/51#514 Bekanntenkreis] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/51#514 círculos de relaciones] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/51#514 cercle de relations] <br />
* {{missing French term|51|514|514-5|FrenchTextTerm=cercle de relations}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/51#514 cerchia di relazioni] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/51#514 514-10] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/51#514 مرتبة الزواج] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/51#514 Ordnungszahl der Ehe] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/51#514 order of marriage] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/51#514 orden de matrimonio] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/51#514 rang du mariage] <br />
* {{missing French term|51|514|514-10|FrenchTextTerm=rang du mariage}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/51#514 ordine di matrimonio] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/51#514 婚姻回数] <br />
* pl-ii: [http://pl-ii.demopaedia.org/wiki/51#514 kolejność małżeństwa] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/51#514 ordem dos casamentos] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/51#514 порядковый счет браков] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/51#514 婚次]</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=Diskuse:35&diff=12928
Diskuse:35
2013-06-12T18:16:59Z
<p>Nicolas Brouard: Adding Joseph note which was overwritten by the bot</p>
<hr />
<div><!--'''Talk:35'''--><br />
{{To be checked}}<br />
<br />
== 353-7 ==<br />
<br />
Note number 7 (§353) doesn't correspond to a TextTerm. This note should be move to another number.--[[Uživatel:Joseph Larmarange|Joseph Larmarange]] 07:55, 12 June 2012<br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/35#351 351-8] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/35#351 Erwerbstätigenquote] <br />
* {{missing German term|35|351|351-8|GermanNewTextTerm=Erwerbstätigenquote}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/35#351 proportion d’actifs occupés] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/35#351 tasso di occupazione] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/35#351 351-9] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/35#351 Nichterwerbspersonen] <br />
* {{missing German term|35|351|351-9|GermanNewTextTerm=Nichterwerbspersonen}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/35#351 inactif] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/35#351 inattivo] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/35#351 persona inattiva] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/35#351 351-10] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/35#351 stille Reserve] <br />
* {{missing German term|35|351|351-10|GermanNewTextTerm=stille Reserve}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/35#351 réserve de main d'œuvre] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/35#351 riserva di manodopera] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/35#351 351-11] ===<br />
* es-ii: [http://es-ii.demopaedia.org/wiki/35#351 buscan trabajo por primera vez] <br />
* {{missing Spanish term|35|351|351-11|SpanishTextTerm=buscan trabajo por primera vez}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/35#351 recherche d'un premier emploi] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/35#351 in cerca di lavoro per la prima volta] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/35#355 355-4] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/35#355 Beamten im einfachen Dienst] <br />
* {{missing German term|35|355|355-4|GermanNewTextTerm=Beamten im einfachen Dienst}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/35#355 employé de la fonction publique] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/35#355 355-5] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/35#355 Beamten im mittleren Dienst] <br />
* {{missing German term|35|355|355-5|GermanNewTextTerm=Beamten im mittleren Dienst}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/35#355 profession intermédiaire de la fonction publique] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/35#355 funzione ausiliaria] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/35#355 355-6] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/35#355 Beamten im gehobenen Dienst] <br />
* {{missing German term|35|355|355-6|GermanNewTextTerm=Beamten im gehobenen Dienst}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/35#355 cadre de la fonction publique] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/35#355 funzione di concetto] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/35#355 funzione esecutiva] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/35#355 355-7] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/35#355 Beamten im höheren Dienst] <br />
* {{missing German term|35|355|355-7|GermanNewTextTerm=Beamten im höheren Dienst}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/35#355 cadre supérieur de la fonction publique] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/35#355 funzione direttiva] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/35#358 358-3] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/35#358 سند] <br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/35#358 معيل] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/35#358 Erhalter (A)] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/35#358 Ernährer] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/35#358 breadwinner] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/35#358 earner] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/35#358 sostén] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/35#358 soutien] <br />
* {{missing French term|35|358|358-3|FrenchTextTerm=soutien}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/35#358 fonte di entrata] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/35#358 sostegno economico] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/35#358 生計維持者] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/35#358 稼得者] <br />
* pl-ii: [http://pl-ii.demopaedia.org/wiki/35#358 utrzymujący] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/35#358 provedor] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/35#358 Кормильцы] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/35#358 供养者] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/35#358 有工资收入的人] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/35#358 358-4] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/35#358 طفل المعال] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/35#358 abhängige Kinder] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/35#358 unterhaltsberechtigte Kinder] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/35#358 dependent child] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/35#358 dependientes] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/35#358 enfant à charge] <br />
* {{missing French term|35|358|358-4|FrenchTextTerm=enfant à charge}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/35#358 bambino a carico] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/35#358 扶養されている子供] <br />
* pl-ii: [http://pl-ii.demopaedia.org/wiki/35#358 niesamodzielne dziecko] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/35#358 crianças dependentes] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/35#358 дети-иждивенцы] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/35#358 尚未独立生活的子女]</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=Diskuse:93&diff=12927
Diskuse:93
2013-06-12T18:12:51Z
<p>Nicolas Brouard: Nicolas Brouard - Harmonization 2013</p>
<hr />
<div><!--'''Talk:93'''--><br />
{{To be checked}}<br />
<br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/93#930 930-7] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/93#930 Wanderungspolitik] <br />
* {{missing German term|93|930|930-7|GermanNewTextTerm=Wanderungspolitik}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/93#930 politique migratoire] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/93#930 politica migratoria] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/93#930 930-8] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/93#930 Gesundheitspolitik] <br />
* {{missing German term|93|930|930-8|GermanNewTextTerm=Gesundheitspolitik}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/93#930 politique sanitaire] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/93#930 politica sanitaria] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/93#933 933-11] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/93#933 Population Education] <br />
* {{missing German term|93|933|933-11|GermanNewTextTerm=Population Education}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/93#933 Population Education] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/93#933 educazione demografica]</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=Diskuse:90&diff=12926
Diskuse:90
2013-06-12T18:12:50Z
<p>Nicolas Brouard: Nicolas Brouard - Harmonization 2013</p>
<hr />
<div><!--'''Talk:90'''--><br />
{{To be checked}}<br />
<br />
<br />
== Chapter 9 ==<br />
=== [http://cs-ii.demopaedia.org/wiki/90#901 901-6] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/90#901 Arbeitsmarkt] <br />
* {{missing German term|90|901|901-6|GermanNewTextTerm=Arbeitsmarkt}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/90#901 marché du travail] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/90#901 mercato del lavoro] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/90#905 905-10] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/90#905 Überschußbevölkerung] <br />
* {{missing German term|90|905|905-10|GermanNewTextTerm=Überschußbevölkerung}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* en-ii: [http://en-ii.demopaedia.org/wiki/90#905 surplus population] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/90#905 excédent de population] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/90#905 eccesso di popolazione]</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=Diskuse:81&diff=12925
Diskuse:81
2013-06-12T18:12:49Z
<p>Nicolas Brouard: Nicolas Brouard - Harmonization 2013</p>
<hr />
<div><!--'''Talk:81'''--><br />
{{To be checked}}<br />
<br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/81#812 812-6] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/81#812 سجل المساكن] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/81#812 Adreßbücher] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/81#812 registros de viviendas] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/81#812 fichier de logements] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/81#812 scheda degli alloggi] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/81#812 listas de passageiros] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/81#812 registro de passageiros] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/81#814 814-4] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/81#814 Geburtsortstatistiken] <br />
* {{missing German term|81|814|814-4|GermanNewTextTerm=Geburtsortstatistiken}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/81#814 statistique sur le lieu de naissance] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/81#814 statistica sul luogo di nascita] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/81#814 estatísticas de local de nascimento] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/81#816 816-7] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/81#816 اصطفاء الهجرة] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/81#816 Selektivität der Wanderungen] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/81#816 selectivity of migration] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/81#816 selectividad de la migración] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/81#816 migration sélective] <br />
* {{missing German term|81|816|816-7|GermanNewTextTerm=migration sélective}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/81#816 migrazione selettiva] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/81#816 移動選択性] <br />
* pl-ii: [http://pl-ii.demopaedia.org/wiki/81#816 selektywność migracji] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/81#816 migração seletiva] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/81#816 Селективность миграции] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/81#816 迁移的选择性] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/81#816 816-8] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/81#816 تفاضل الهجرة] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/81#816 differentielle Wanderungsverhalten] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/81#816 migration différentielle] <br />
* {{missing German term|81|816|816-8|GermanNewTextTerm=migration différentielle}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/81#816 migrazione differenziale] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/81#817 817-5] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/81#817 جدول تعمير المقيمين] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/81#817 Abgangsordnungen der Nicht-Wanderer] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/81#817 survivirship schedule of non-migrants] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/81#817 tabla de mortalidad de los no migrantes] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/81#817 table de survie des sédentaires] <br />
* {{missing French term|81|817|817-5|FrenchTextTerm=table de survie des sédentaires}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/81#817 tavola di sopravvivenza dei sedentari] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/81#817 移動未経験者生残スケジュール表] <br />
* pl-ii: [http://pl-ii.demopaedia.org/wiki/81#817 harmonogram przeżycia nie-migrantów] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/81#817 tábua de sobrevivência de não-migrantes] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/81#817 функции дожития с двойным выбытием для немигрировавших индивидов] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/81#817 非迁移尚存表] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/81#818 818-3] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/81#818 دليل شدة الهجرة الصافية] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/81#818 Wanderungsgeschwindigkeit] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/81#818 index of net velocity] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/81#818 índice de intensidad migratoria] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/81#818 indice d’intensité migratoire nette] <br />
* {{missing French term|81|818|818-3|FrenchTextTerm=indice d’intensité migratoire nette}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/81#818 indice d’intensità netta] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/81#818 地域間交流率指標] <br />
* pl-ii: [http://pl-ii.demopaedia.org/wiki/81#818 wskaźnikiem szybkości netto] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/81#818 índice de intensidade migratória] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/81#818 Чистой скорости, показатель] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/81#818 净周转率指数] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/81#818 818-4] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/81#818 دليل المعاوضة في تيارات الهجرة] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/81#818 Effektivität von Wanderungsströmen] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/81#818 effectiveness of migration streams] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/81#818 índice de compensación de las corrientes migratorias] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/81#818 índice de efectividad de la corriente migratoria] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/81#818 indice de compensation des courants migratoires] <br />
* {{missing French term|81|818|818-4|FrenchTextTerm=indice de compensation des courants migratoires}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/81#818 indice di equilibrio delle correnti migratorie] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/81#818 移動流の効率性] <br />
* pl-ii: [http://pl-ii.demopaedia.org/wiki/81#818 Efektywność strumieni migracji] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/81#818 índice de efetividade da corrente migratória líquida] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/81#818 Эффективность миграционных потоков] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/81#818 迁移流效率]</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=Diskuse:80&diff=12924
Diskuse:80
2013-06-12T18:12:48Z
<p>Nicolas Brouard: Nicolas Brouard - Harmonization 2013</p>
<hr />
<div><!--'''Talk:80'''--><br />
{{To be checked}}<br />
<br />
<br />
== Chapter 8 ==<br />
=== [http://cs-ii.demopaedia.org/wiki/80#802 802-12] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/80#802 Emigranten] <br />
* {{missing German term|80|802|802-12|GermanNewTextTerm=Emigranten}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/80#802 émigrant pour raison politique, religieuse ou éthique] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/80#802 emigrante per motivi politici, religiosi o etici] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/80#802 immigrante per motivi politici, religiosi o etici] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/80#802 802-13] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/80#802 Immigranten] <br />
* {{missing German term|80|802|802-13|GermanNewTextTerm=Immigranten}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/80#802 immigrant pour raison politique, religieuse ou éthique] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/80#803 803-7] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/80#803 وفادة داخلبة] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/80#803 Binnenzuwanderung] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/80#803 in-migration] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/80#803 inmigración interna] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/80#803 immigration interne] <br />
* {{missing French term|80|803|803-7|FrenchTextTerm=immigration interne}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/80#803 immigrazione interna] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/80#803 転入(流入)] <br />
* pl-ii: [http://pl-ii.demopaedia.org/wiki/80#803 migracje wewnętrzne] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/80#803 mobilidade residencial] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/80#803 Прибытие] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/80#803 迁入] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/80#803 803-8] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/80#803 اغتراب داخلي] <br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/80#803 ظعن داخلي] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/80#803 Binnenabwanderung] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/80#803 out-migration] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/80#803 emigración interna] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/80#803 émigration interne] <br />
* {{missing French term|80|803|803-8|FrenchTextTerm=émigration interne}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/80#803 emigrazione interna] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/80#803 転出(流出)] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/80#803 emigração] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/80#803 Выбытие] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/80#803 迁出] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/80#803 803-11] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/80#803 تيار العكسي] <br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/80#803 تيار المقابل] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/80#803 Gegenstrom] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/80#803 counterstream] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/80#803 contracorriente] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/80#803 contre-courant] <br />
* {{missing French term|80|803|803-11|FrenchTextTerm=contre-courant}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/80#803 controcorrente] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/80#803 反流(逆流)] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/80#803 contra-corrente] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/80#803 Встречный поток] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/80#803 Поток встречный] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/80#803 逆流] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/80#804 804-7] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/80#804 هجرة متسلسلة] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/80#804 migration en chaîne] <br />
* {{missing French term|80|804|804-7|FrenchTextTerm=migration en chaîne}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/80#804 migrazione a catena] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/80#805 805-9] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/80#805 صافي التيار] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/80#805 Nettoaustausch] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/80#805 richtungsspezifischer Wanderungssaldo] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/80#805 net interchange] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/80#805 net stream] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/80#805 corriente neta] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/80#805 courant net] <br />
* {{missing French term|80|805|805-9|FrenchTextTerm=courant net}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/80#805 corrente netta] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/80#805 純移動流] <br />
* pl-ii: [http://pl-ii.demopaedia.org/wiki/80#805 Strumień netto] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/80#805 corrente migratória líquida] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/80#805 troca líquida] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/80#805 нетто-обмен] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/80#805 нетто-поток] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/80#805 迁移净流量] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/80#805 805-10] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/80#805 تيار الكلي] <br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/80#805 حركة المرور] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/80#805 Bruttoaustausch] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/80#805 richtungsspezifische Wanderungsvolumen] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/80#805 gross interchange] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/80#805 corriente total] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/80#805 courant total] <br />
* {{missing French term|80|805|805-10|FrenchTextTerm=courant total}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/80#805 trafic] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/80#805 corrente totale] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/80#805 traffico] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/80#805 総移動流] <br />
* pl-ii: [http://pl-ii.demopaedia.org/wiki/80#805 strumień brutto] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/80#805 corrente migratória total] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/80#805 брутто-обмен] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/80#805 总流量] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/80#806 806-8] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/80#806 Kettenwanderung] <br />
* {{missing German term|80|806|806-8|GermanNewTextTerm=Kettenwanderung}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/80#806 chaîne migratoire] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/80#806 catena migratoria] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/80#806 806-9] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/80#806 Familiennachzug] <br />
* {{missing German term|80|806|806-9|GermanNewTextTerm=Familiennachzug}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/80#806 regroupement familial] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/80#806 familiare]</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=Diskuse:72&diff=12923
Diskuse:72
2013-06-12T18:12:47Z
<p>Nicolas Brouard: Nicolas Brouard - Harmonization 2013</p>
<hr />
<div><!--'''Talk:72'''--><br />
{{To be checked}}<br />
<br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/72#721 721-5] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/72#721 Bevölkerungsfortschreibung] <br />
* {{missing German term|72|721|721-5|GermanNewTextTerm=Bevölkerungsfortschreibung}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/72#721 Fortschreibung des Bevölkerungsstandes] <br />
* {{missing German term|72|721|721-5|GermanNewTextTerm=Fortschreibung des Bevölkerungsstandes}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/72#721 extrapolation annuelle des effectifs de la population] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/72#721 mise à jour annuelle des effectifs de la population] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/72#721 aggiornamento della popolazione] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/72#721 aggiornamento dello stato della popolazione]</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=Diskuse:70&diff=12922
Diskuse:70
2013-06-12T18:12:46Z
<p>Nicolas Brouard: Nicolas Brouard - Harmonization 2013</p>
<hr />
<div><!--'''Talk:70'''--><br />
{{To be checked}}<br />
<br />
<br />
== Chapter 7 ==<br />
=== [http://cs-ii.demopaedia.org/wiki/70#701 701-9] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/70#701 Geburtendefizit] <br />
* {{missing German term|70|701|701-9|GermanNewTextTerm=Geburtendefizit}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/70#701 déficit des naissances sur les décès] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/70#701 deficit delle nascite sui decessi] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/70#701 701-10] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/70#701 Nullwachstum] <br />
* {{missing German term|70|701|701-10|GermanNewTextTerm=Nullwachstum}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/70#701 croissance nulle] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/70#701 crescita zero] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/70#701 701-11] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/70#701 Wachstumseffekte] <br />
* {{missing German term|70|701|701-11|GermanNewTextTerm=Wachstumseffekte}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/70#701 effet en termes de croissance] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/70#701 effetto in termini di crescita] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/70#701 701-12] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/70#701 Struktureffekte] <br />
* {{missing German term|70|701|701-12|GermanNewTextTerm=Struktureffekte}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/70#701 effet en termes de structure] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/70#701 effetto in termini di struttura] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/70#703 703-8] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/70#703 مجتمع نصف المستقر] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/70#703 pseudo-stabile Bevölkerung] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/70#703 poblaciones semi-estables] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/70#703 population semi-stable] <br />
* {{missing French term|70|703|703-8|FrenchTextTerm=population semi-stable}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/70#703 popolazione semi stabile] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/70#703 703-11] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/70#703 demographische Eigendynamik] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/70#703 demographische Momentum] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/70#703 demographische Schwung] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/70#703 Trägheitsmoment] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/70#703 inertie d’une population] <br />
* {{missing German term|70|703|703-11|GermanNewTextTerm=inertie d’une population}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/70#703 impulso demografico] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/70#703 momento demografico] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/70#703 momento di inerzia] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/70#703 slancio demografico]</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=Diskuse:63&diff=12921
Diskuse:63
2013-06-12T18:12:45Z
<p>Nicolas Brouard: Nicolas Brouard - Harmonization 2013</p>
<hr />
<div><!--'''Talk:63'''--><br />
{{To be checked}}<br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/63#633 633-3] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/63#633 سنون النسوية] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/63#633 Frauenjahre] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/63#633 woman years] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/63#633 años-mujer] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/63#633 femme-année] <br />
* {{missing French term|63|633|633-3|FrenchTextTerm=femme-année}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/63#633 donne-anno] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/63#633 女子年数] <br />
* pl-ii: [http://pl-ii.demopaedia.org/wiki/63#633 kobieto-rok] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/63#633 anos-mulher] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/63#633 Число человеко-лет жизни женщин] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/63#633 妇女年数] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/63#636 636-3] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/63#636 ذرية الحالية] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/63#636 bisher erreichter Geburtenzahl] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/63#636 bisher erreichter Kinderzahl] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/63#636 descendencia actual] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/63#636 descendance actuelle] <br />
* {{missing French term|63|636|636-3|FrenchTextTerm=descendance actuelle}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/63#636 discendenza attuale] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/63#636 descendência completa] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/63#636 descendência final] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/63#636 fecundidade ao longo da vida] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/63#636 Fecundidade completa] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/63#636 636-6] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/63#636 ذرية الحالية الصافية] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/63#636 bisher erreichte Netto-Kinderzahl] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/63#636 descendencia actual neta] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/63#636 descendance actuelle nette] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/63#636 discendenza attuale netta] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/63#636 636-7] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/63#636 ذرية النهائية الصافية] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/63#636 endgültige Netto-Kinderzahl] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/63#636 descendencia final neta] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/63#636 descendance finale nette] <br />
* {{missing French term|63|636|636-7|FrenchTextTerm=descendance finale nette}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/63#636 discendenza finale netta] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/63#637 637-9] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/63#637 تكرار الحبل قبل الزواج] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/63#637 Häufigkeit vorehelicher Empfängnisse] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/63#637 frecuencia de las concepciones prenupciales] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/63#637 fréquence des conceptions prénuptiales] <br />
* {{missing French term|63|637|637-9|FrenchTextTerm=fréquence des conceptions prénuptiales}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/63#637 frequenza dei concepimenti prematrimoniali] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/63#638 638-8] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/63#638 إحتمال الحبل الفعلي] <br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/63#638 إحتمال الحبل بمواليد أحياء] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/63#638 effektiven Empfängniswahrscheinlichkeit] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/63#638 effective fecundability] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/63#638 fecundabilidad efectiva] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/63#638 fécondabilité effective] <br />
* {{missing French term|63|638|638-8|FrenchTextTerm=fécondabilité effective}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/63#638 fecondabilità effettiva] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/63#638 有効受胎能力] <br />
* pl-ii: [http://pl-ii.demopaedia.org/wiki/63#638 efektywan zdolność poczęcia] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/63#638 fecundabilidade residual] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/63#638 Фактическая оплодотворяемость] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/63#638 有效生育能力] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/63#638 638-10] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/63#638 دليل بورل] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/63#638 Pearl-Index] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/63#638 índice de pearl] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/63#638 indice de Pearl] <br />
* {{missing French term|63|638|638-10|FrenchTextTerm=indice de Pearl}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/63#638 indice di Pearl] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/63#638 Índice de Pearl] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/63#638 taxa de concepção] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/63#639 639-7] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/63#639 نسبة المواليد الى عقود الزواج] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/63#639 Geburten-Eheschließungen-Proportion] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/63#639 ratio of births to marriages] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/63#639 relación nacimientos-matrimonios] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/63#639 rapport des naissances aux mariages] <br />
* {{missing French term|63|639|639-7|FrenchTextTerm=rapport des naissances aux mariages}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/63#639 matrimonio] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/63#639 出生結婚比] <br />
* pl-ii: [http://pl-ii.demopaedia.org/wiki/63#639 Wskaźnik urodzeń do małżeństw] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/63#639 razão nascimentos /casamentos] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/63#639 Отношение числа рождений к численности браков] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/63#639 出生结婚比] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/63#640 640-4] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/63#640 altersspezifischen Schwangerschaftsabbruchsziffern] <br />
* {{missing German term|64|640|640-4|GermanNewTextTerm=altersspezifischen Schwangerschaftsabbruchsziffern}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/63#640 taux d'avortement par âge] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/63#640 tasso specificiodi abortività] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/63#640 Taxa Global de Aborto] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/63#640 640-5] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/63#640 alters- und familienstandsspezifische Schwangerschaftsabbruchsziffern] <br />
* {{missing German term|64|640|640-5|GermanNewTextTerm=alters- und familienstandsspezifische Schwangerschaftsabbruchsziffern}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/63#640 taux d'avortement par âge et statut matrimonial] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/63#640 tasso specifico di abortività per età e stato civile] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/63#640 640-6] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/63#640 alters- und familienstandsspezifische Schwangerschaftsabbruchswahrscheinlichkeiten] <br />
* {{missing German term|64|640|640-6|GermanNewTextTerm=alters- und familienstandsspezifische Schwangerschaftsabbruchswahrscheinlichkeiten}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/63#640 probabilité qu'une grossesse donne lieu à un avortement selon l'âge et l'état matrimonial] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/63#640 probabilità d'aborto per età e stato civile]</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=Diskuse:62&diff=12920
Diskuse:62
2013-06-12T18:12:44Z
<p>Nicolas Brouard: Nicolas Brouard - Harmonization 2013</p>
<hr />
<div><!--'''Talk:62'''--><br />
{{To be checked}}<br />
<br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/62#621 621-4] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/62#621 إعقام الوقتي] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/62#621 zeitweise Empfängnisunfähigkeit] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/62#621 infecundabilidad temporal] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/62#621 infécondabilité temporaire] <br />
* {{missing French term|62|621|621-4|FrenchTextTerm=infécondabilité temporaire}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/62#621 infecondabilità temporanea] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/62#621 esterilidade temporária] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/62#621 621-6] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/62#621 إعقام النهائي] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/62#621 dauernden (vollständigen) Empfängnisunfähigkeit] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/62#621 infecundabilidad definitiva] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/62#621 infécondabilité définitive] <br />
* {{missing French term|62|621|621-6|FrenchTextTerm=infécondabilité définitive}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/62#621 infecondabilità definitiva] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/62#621 esterilidade primária] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/62#621 621-10] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/62#621 Zeugungsunfähigkeit] <br />
* {{missing German term|62|621|621-10|GermanNewTextTerm=Zeugungsunfähigkeit}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/62#621 incapacité à procréer] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/62#621 infertilità] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/62#623 623-3] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/62#623 بوار كلي] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/62#623 infecundidad total] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/62#623 infécondité totale] <br />
* {{missing French term|62|623|623-3|FrenchTextTerm=infécondité totale}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/62#623 infecondità totale] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/62#623 capacidade reprodutiva] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/62#623 623-4] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/62#623 بوار نهائي] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/62#623 Dauernde endgültige Kinderlosigkeit] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/62#623 Permanent infertility] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/62#623 infecundidad definitiva] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/62#623 infécondité définitive] <br />
* {{missing French term|62|623|623-4|FrenchTextTerm=infécondité définitive}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/62#623 infecondità definitiva] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/62#623 永久無出生] <br />
* pl-ii: [http://pl-ii.demopaedia.org/wiki/62#623 niepłodności trwałej] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/62#623 infecundidade permanente] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/62#623 Постоянное бесплодие] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/62#623 永久性不育] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/62#623 623-5] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/62#623 بوار إختياري] <br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/62#623 عقم اختياري] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/62#623 freiwillige Kinderlosigkeit] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/62#623 infecundidad voluntaria] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/62#623 infécondité volontaire] <br />
* {{missing French term|62|623|623-5|FrenchTextTerm=infécondité volontaire}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/62#623 infecondità volontaria] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/62#623 infecundidade voluntária] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/62#626 626-5] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/62#626 معدل المثابرة] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/62#626 Weiterbeteiligungsquote] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/62#626 continuation rate] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/62#626 tasa de permanencia] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/62#626 taux de persévérance] <br />
* {{missing French term|62|626|626-5|FrenchTextTerm=taux de persévérance}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/62#626 tasso di perseveranza] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/62#626 避妊継続率] <br />
* pl-ii: [http://pl-ii.demopaedia.org/wiki/62#626 wskaźnik kontynuacji] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/62#626 taxa de continuação] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/62#626 taxa de permanência] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/62#626 Доля продолжающих (использование контрацепции)] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/62#626 续用率] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/62#626 626-6] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/62#626 معدل النكوص] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/62#626 Abbrecherquote] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/62#626 drop-out-Quote] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/62#626 dropout rate] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/62#626 termination rate] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/62#626 proporción de abandonos] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/62#626 proportion d’abandons] <br />
* {{missing French term|62|626|626-6|FrenchTextTerm=proportion d’abandons}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/62#626 proporzione di abbandoni] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/62#626 避妊放棄率] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/62#626 避妊終了率] <br />
* pl-ii: [http://pl-ii.demopaedia.org/wiki/62#626 wskaźnik zaniechania stosowania] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/62#626 taxa de abandono] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/62#626 taxa de desistência] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/62#626 Доля прекративших (использование контрацепции)] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/62#626 Прекративших (использование контрацепции), доля] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/62#626 停用率] <br />
<br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/62#631 631-3] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/62#631 سد الأسهر] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/62#631 oclusión] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/62#631 occlusion] <br />
* {{missing French term|63|631|631-3|FrenchTextTerm=occlusion}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/62#631 occlusione] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/62#631 laqueadura] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/62#631 ligação tubária]</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=Diskuse:60&diff=12919
Diskuse:60
2013-06-12T18:12:43Z
<p>Nicolas Brouard: Nicolas Brouard - Harmonization 2013</p>
<hr />
<div><!--'''Talk:60'''--><br />
{{To be checked}}<br />
<br />
<br />
== Chapter 6 ==<br />
=== [http://cs-ii.demopaedia.org/wiki/60#601 601-4] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/60#601 المولود الحي] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/60#601 Lebendgeburten] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/60#601 live birth] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/60#601 nacimientos vivos] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/60#601 naissance vivante] <br />
* {{missing French term|60|601|601-4|FrenchTextTerm=naissance vivante}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/60#601 nascita vivente] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/60#601 出生] <br />
* pl-ii: [http://pl-ii.demopaedia.org/wiki/60#601 urodzenie żywe] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/60#601 nascido vivo] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/60#601 Живорождения] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/60#601 活产] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/60#604 604-8] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/60#604 إجهاض ببضع الرحم] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/60#604 Hysterotomie (vaginale, abdominale)] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/60#604 hysterotomy] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/60#604 histerotomías] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/60#604 hystérotomie] <br />
* {{missing French term|60|604|604-8|FrenchTextTerm=hystérotomie}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/60#604 isterotomia] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/60#604 子宮切開による中絶] <br />
* pl-ii: [http://pl-ii.demopaedia.org/wiki/60#604 zabieg] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/60#604 histerotomias] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/60#604 Гистеромия] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/60#604 子宫切开术流产] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/60#604 604-9] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/60#604 إجهـاض بـطرق طبيـة تحريضية] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/60#604 medikamentösen Abbruch] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/60#604 abortion by medical induction procedure] <br />
* {{missing English term|60|604|604-9|EnglishTextTerm=abortion by medical induction procedure}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* es-ii: [http://es-ii.demopaedia.org/wiki/60#604 abortos inducidos con medicamentos] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/60#604 avortement médicamenteux] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/60#604 aborto indotto tramite procedure mediche] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/60#604 分娩誘導法による中絶] <br />
* pl-ii: [http://pl-ii.demopaedia.org/wiki/60#604 metoda farmakologiczna] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/60#604 abortos através de procedimentos médicos de indução] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/60#604 аборты с использованием инъекций] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/60#604 人工流产] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/60#604 药物引产] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/60#605 605-5] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/60#605 خداج] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/60#605 Vorzeitigkeit der Geburt] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/60#605 prematurity] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/60#605 prematuridad] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/60#605 prématurité] <br />
* {{missing French term|60|605|605-5|FrenchTextTerm=prématurité}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/60#605 prematurità] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/60#605 月足らずの出産] <br />
* pl-ii: [http://pl-ii.demopaedia.org/wiki/60#605 wcześniactwo] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/60#605 prematuridade] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/60#605 Недонашивание] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/60#605 早熟]</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=Diskuse:52&diff=12918
Diskuse:52
2013-06-12T18:12:42Z
<p>Nicolas Brouard: Nicolas Brouard - Harmonization 2013</p>
<hr />
<div><!--'''Talk:52'''--><br />
{{To be checked}}<br />
<br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/52#521 521-8] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/52#521 abgeleitetes Durchschnittsalter bei der Erstheirat] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/52#521 singulate mean age at marriage] <br />
* {{missing English term|52|521|521-8|EnglishTextTerm=singulate mean age at marriage}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/52#521 âge moyen des célibataires au mariage] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/52#521 singulate mean age at marriage] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/52#521 静態平均初婚年齢] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/52#521 Условный средний возраст вступления в первый брак] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/52#521 单身法平均结婚年龄]</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=Diskuse:51&diff=12917
Diskuse:51
2013-06-12T18:12:41Z
<p>Nicolas Brouard: Nicolas Brouard - Harmonization 2013 *** existing text overwritten ***</p>
<hr />
<div><!--'''Talk:51'''--><br />
{{To be checked}}<br />
<br />
== Chapter 5 ==<br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/51#514 514-5] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/51#514 محيط] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/51#514 Bekanntenkreis] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/51#514 círculos de relaciones] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/51#514 cercle de relations] <br />
* {{missing French term|51|514|514-5|FrenchTextTerm=cercle de relations}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/51#514 cerchia di relazioni] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/51#514 514-10] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/51#514 مرتبة الزواج] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/51#514 Ordnungszahl der Ehe] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/51#514 order of marriage] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/51#514 orden de matrimonio] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/51#514 rang du mariage] <br />
* {{missing French term|51|514|514-10|FrenchTextTerm=rang du mariage}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/51#514 ordine di matrimonio] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/51#514 婚姻回数] <br />
* pl-ii: [http://pl-ii.demopaedia.org/wiki/51#514 kolejność małżeństwa] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/51#514 ordem dos casamentos] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/51#514 порядковый счет браков] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/51#514 婚次]</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=Diskuse:43&diff=12916
Diskuse:43
2013-06-12T18:12:40Z
<p>Nicolas Brouard: Nicolas Brouard - Harmonization 2013</p>
<hr />
<div><!--'''Talk:43'''--><br />
{{To be checked}}<br />
<br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/43#431 431-5] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/43#431 إحتمال الوفيات المتوقع] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/43#431 prospektiven Sterbewahrscheinlichkeiten] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/43#431 quotient perspectif de mortalité] <br />
* {{missing French term|43|431|431-5|FrenchTextTerm=quotient perspectif de mortalité}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/43#431 quoziente prospettico di mortalità] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/43#433 433-2] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/43#433 وفيات الجدول] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/43#433 Gestorbenen der Sterbetafel] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/43#433 Tafelsterbefälle] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/43#433 defunciones de la tabla] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/43#433 décès de la table] <br />
* {{missing French term|43|433|433-2|FrenchTextTerm=décès de la table}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/43#433 decesso della tavola] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/43#435 435-5] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/43#435 Modell-Sterbetafeln] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/43#435 model life table] <br />
* {{missing English term|43|435|435-5|EnglishTextTerm=model life table}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* es-ii: [http://es-ii.demopaedia.org/wiki/43#435 tabla modelo de mortalidad] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/43#435 table-type de mortalité] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/43#435 tavola tipo di mortalità] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/43#435 モデル生命表] <br />
* pl-ii: [http://pl-ii.demopaedia.org/wiki/43#435 modelowymi tablicami trwania życia] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/43#435 tábuas de vida modelo] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/43#435 Типовые таблицы смертности] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/43#435 模型生命表]</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=Diskuse:42&diff=12915
Diskuse:42
2013-06-12T18:12:39Z
<p>Nicolas Brouard: Nicolas Brouard - Harmonization 2013</p>
<hr />
<div><!--'''Talk:42'''--><br />
{{To be checked}}<br />
<br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/42#421 421-12] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/42#421 Todesursachenstruktur] <br />
* {{missing German term|42|421|421-12|GermanNewTextTerm=Todesursachenstruktur}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/42#421 structure des décès par cause] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/42#421 struttura delle cause di morte] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/42#426 426-7] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/42#426 Berufsunfähigkeit] <br />
* {{missing German term|42|426|426-7|GermanNewTextTerm=Berufsunfähigkeit}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/42#426 incapacité professionnelle] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/42#426 disabilità] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/42#426 426-8] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/42#426 Erwerbsunfähigkeit] <br />
* {{missing German term|42|426|426-8|GermanNewTextTerm=Erwerbsunfähigkeit}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/42#426 incapacité de travail] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/42#426 incapacità]</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=Diskuse:41&diff=12914
Diskuse:41
2013-06-12T18:12:38Z
<p>Nicolas Brouard: Nicolas Brouard - Harmonization 2013</p>
<hr />
<div><!--'''Talk:41'''--><br />
{{To be checked}}<br />
<br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/41#410 410-6] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/41#410 Spätneonatalsterblichkeit] <br />
* {{missing German term|41|410|410-6|GermanNewTextTerm=Spätneonatalsterblichkeit}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/41#410 Spätsterblichkeit] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/41#410 mortalité néonatale tardive] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/41#410 mortalità neonatale tardiva] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/41#411 411-7] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/41#411 feto-infantile Sterblichkeit] <br />
* {{missing German term|41|411|411-7|GermanNewTextTerm=feto-infantile Sterblichkeit}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/41#411 mortalité fœto-infantile] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/41#411 mortalità feto-infantile] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/41#413 413-7] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/41#413 feto-infantile Sterbeziffer] <br />
* {{missing German term|41|413|413-7|GermanNewTextTerm=feto-infantile Sterbeziffer}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/41#413 taux de mortalité fœto-infantile] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/41#413 tasso di mortalità feto-infantile]</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=Diskuse:40&diff=12913
Diskuse:40
2013-06-12T18:12:37Z
<p>Nicolas Brouard: Nicolas Brouard - Harmonization 2013</p>
<hr />
<div><!--'''Talk:40'''--><br />
{{To be checked}}<br />
<br />
<br />
== Chapter 4 ==<br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/40#402 402-3] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/40#402 دليل زيادة الوفيات المفرطة] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/40#402 Übersterblichkeitsquotienten] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/40#402 índice de sobremortalidad] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/40#402 indice de surmortalité] <br />
* {{missing French term|40|402|402-3|FrenchTextTerm=indice de surmortalité}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/40#402 indicatore di sopramortalità]</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=Diskuse:35&diff=12912
Diskuse:35
2013-06-12T18:12:36Z
<p>Nicolas Brouard: Nicolas Brouard - Harmonization 2013 *** existing text overwritten ***</p>
<hr />
<div><!--'''Talk:35'''--><br />
{{To be checked}}<br />
<br />
<br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/35#351 351-8] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/35#351 Erwerbstätigenquote] <br />
* {{missing German term|35|351|351-8|GermanNewTextTerm=Erwerbstätigenquote}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/35#351 proportion d’actifs occupés] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/35#351 tasso di occupazione] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/35#351 351-9] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/35#351 Nichterwerbspersonen] <br />
* {{missing German term|35|351|351-9|GermanNewTextTerm=Nichterwerbspersonen}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/35#351 inactif] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/35#351 inattivo] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/35#351 persona inattiva] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/35#351 351-10] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/35#351 stille Reserve] <br />
* {{missing German term|35|351|351-10|GermanNewTextTerm=stille Reserve}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/35#351 réserve de main d'œuvre] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/35#351 riserva di manodopera] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/35#351 351-11] ===<br />
* es-ii: [http://es-ii.demopaedia.org/wiki/35#351 buscan trabajo por primera vez] <br />
* {{missing Spanish term|35|351|351-11|SpanishTextTerm=buscan trabajo por primera vez}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/35#351 recherche d'un premier emploi] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/35#351 in cerca di lavoro per la prima volta] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/35#355 355-4] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/35#355 Beamten im einfachen Dienst] <br />
* {{missing German term|35|355|355-4|GermanNewTextTerm=Beamten im einfachen Dienst}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/35#355 employé de la fonction publique] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/35#355 355-5] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/35#355 Beamten im mittleren Dienst] <br />
* {{missing German term|35|355|355-5|GermanNewTextTerm=Beamten im mittleren Dienst}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/35#355 profession intermédiaire de la fonction publique] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/35#355 funzione ausiliaria] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/35#355 355-6] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/35#355 Beamten im gehobenen Dienst] <br />
* {{missing German term|35|355|355-6|GermanNewTextTerm=Beamten im gehobenen Dienst}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/35#355 cadre de la fonction publique] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/35#355 funzione di concetto] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/35#355 funzione esecutiva] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/35#355 355-7] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/35#355 Beamten im höheren Dienst] <br />
* {{missing German term|35|355|355-7|GermanNewTextTerm=Beamten im höheren Dienst}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/35#355 cadre supérieur de la fonction publique] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/35#355 funzione direttiva] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/35#358 358-3] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/35#358 سند] <br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/35#358 معيل] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/35#358 Erhalter (A)] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/35#358 Ernährer] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/35#358 breadwinner] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/35#358 earner] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/35#358 sostén] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/35#358 soutien] <br />
* {{missing French term|35|358|358-3|FrenchTextTerm=soutien}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/35#358 fonte di entrata] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/35#358 sostegno economico] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/35#358 生計維持者] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/35#358 稼得者] <br />
* pl-ii: [http://pl-ii.demopaedia.org/wiki/35#358 utrzymujący] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/35#358 provedor] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/35#358 Кормильцы] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/35#358 供养者] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/35#358 有工资收入的人] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/35#358 358-4] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/35#358 طفل المعال] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/35#358 abhängige Kinder] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/35#358 unterhaltsberechtigte Kinder] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/35#358 dependent child] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/35#358 dependientes] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/35#358 enfant à charge] <br />
* {{missing French term|35|358|358-4|FrenchTextTerm=enfant à charge}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/35#358 bambino a carico] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/35#358 扶養されている子供] <br />
* pl-ii: [http://pl-ii.demopaedia.org/wiki/35#358 niesamodzielne dziecko] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/35#358 crianças dependentes] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/35#358 дети-иждивенцы] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/35#358 尚未独立生活的子女]</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=Diskuse:34&diff=12911
Diskuse:34
2013-06-12T18:12:35Z
<p>Nicolas Brouard: Nicolas Brouard - Harmonization 2013</p>
<hr />
<div><!--'''Talk:34'''--><br />
{{To be checked}}<br />
<br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/34#344 344-7] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/34#344 مراكز التدريب] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/34#344 Schulen für Behinderte] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/34#344 Sonderschulen] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/34#344 centros de aprendizaje] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/34#344 centre d’apprentissage] <br />
* {{missing French term|34|344|344-7|FrenchTextTerm=centre d’apprentissage}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/34#344 istituto professionale] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/34#344 344-8] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/34#344 مدارس تقنية] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/34#344 escuelas agrícolas] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/34#344 escuelas industriales] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/34#344 escuelas técnicas] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/34#344 école technique] <br />
* {{missing French term|34|344|344-8|FrenchTextTerm=école technique}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/34#344 344-9] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/34#344 مدارس تقنية عالية] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/34#344 escuelas técnicas superiores] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/34#344 école supérieure technique] <br />
* {{missing French term|34|344|344-9|FrenchTextTerm=école supérieure technique}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/34#344 344-10] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/34#344 معاهد تقنية] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/34#344 institutos técnicos] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/34#344 institut technique] <br />
* {{missing French term|34|344|344-10|FrenchTextTerm=institut technique}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/34#344 istituto tecnico] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/34#344 344-11] ===<br />
* es-ii: [http://es-ii.demopaedia.org/wiki/34#344 institutos pedagógicos] <br />
* {{missing Spanish term|34|344|344-11|SpanishTextTerm=institutos pedagógicos}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/34#344 institut pédagogique] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/34#344 istituto magistrale] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/34#344 scuola magistrale] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/34#347 347-7] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/34#347 تكرار الرسوب] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/34#347 Wiederholungshäufigkeit] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/34#347 frecuencia de repitentes] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/34#347 reprobados] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/34#347 fréquence de redoublement] <br />
* {{missing French term|34|347|347-7|FrenchTextTerm=fréquence de redoublement}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/34#347 frequenza delle ripetenze]</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=Diskuse:32&diff=12910
Diskuse:32
2013-06-12T18:12:34Z
<p>Nicolas Brouard: Nicolas Brouard - Harmonization 2013</p>
<hr />
<div><!--'''Talk:32'''--><br />
{{To be checked}}<br />
<br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/32#323 323-6] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/32#323 طفل الصغير] <br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/32#323 طفل الصغير السن] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/32#323 Baby] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/32#323 infant] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/32#323 bebés] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/32#323 infante] <br />
* es-ii: [http://es-ii.demopaedia.org/wiki/32#323 niños pequeños] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/32#323 bébé] <br />
* {{missing French term|32|323|323-6|FrenchTextTerm=bébé}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/32#323 enfant en bas âge] <br />
* {{missing French term|32|323|323-6|FrenchTextTerm=enfant en bas âge}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/32#323 Infante] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/32#323 乳児] <br />
* pl-ii: [http://pl-ii.demopaedia.org/wiki/32#323 niemowlę] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/32#323 infantil] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/32#323 Младенец] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/32#323 婴儿]</div>
Nicolas Brouard
http://cs-ii.demopaedia.org/w/index.php?title=Diskuse:30&diff=12909
Diskuse:30
2013-06-12T18:12:32Z
<p>Nicolas Brouard: Nicolas Brouard - Harmonization 2013</p>
<hr />
<div><!--'''Talk:30'''--><br />
{{To be checked}}<br />
<br />
== Chapter 3 ==<br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/30#303 303-1] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/30#303 بلدية] <br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/30#303 عمادة] <br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/30#303 ناحية] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/30#303 Gemeinden] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/30#303 parish] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/30#303 township] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/30#303 commune] <br />
* {{missing French term|30|303|303-1|FrenchTextTerm=commune}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/30#303 comune] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/30#303 教区] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/30#303 町] <br />
* pl-ii: [http://pl-ii.demopaedia.org/wiki/30#303 województwo] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/30#303 municípios] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/30#303 paróquias] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/30#303 Населенные пункты] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/30#303 Пункты населенные] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/30#303 教区] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/30#303 镇] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/30#303 303-2] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/30#303 إمارة] <br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/30#303 عمالة] <br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/30#303 لواء] <br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/30#303 محافظة] <br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/30#303 ولاية] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/30#303 Bundesländer] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/30#303 Bundesstaaten] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/30#303 Provinzen] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/30#303 province] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/30#303 state] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/30#303 province] <br />
* {{missing French term|30|303|303-2|FrenchTextTerm=province}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/30#303 provincia] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/30#303 州] <br />
* pl-ii: [http://pl-ii.demopaedia.org/wiki/30#303 powiat] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/30#303 estados] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/30#303 províncias] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/30#303 Провинции] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/30#303 Штаты] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/30#303 州] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/30#303 省] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/30#303 303-3] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/30#303 دائرة] <br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/30#303 قضاء] <br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/30#303 معتمدية] <br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/30#303 مقاطعة] <br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/30#303 منطقة] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/30#303 Departements] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/30#303 département] <br />
* {{missing French term|30|303|303-3|FrenchTextTerm=département}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/30#303 dipartimento] <br />
* pl-ii: [http://pl-ii.demopaedia.org/wiki/30#303 gmina] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/30#303 303-4] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/30#303 مديرية] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/30#303 Kantone] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/30#303 canton] <br />
* {{missing French term|30|303|303-4|FrenchTextTerm=canton}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/30#303 cantone] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/30#303 303-5] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/30#303 إقليم] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/30#303 Counties] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/30#303 Grafschaften] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/30#303 county] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/30#303 canton] <br />
* {{missing French term|30|303|303-5|FrenchTextTerm=canton}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/30#303 cantoni] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/30#303 郡] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/30#303 condados] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/30#303 Графства] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/30#303 县] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/30#303 303-6] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/30#303 دائرة] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/30#303 Bezirke] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/30#303 district] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/30#303 arrondissement] <br />
* {{missing French term|30|303|303-6|FrenchTextTerm=arrondissement}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/30#303 arrondissement] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/30#303 地区] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/30#303 distritos] <br />
* ru-ii: [http://ru-ii.demopaedia.org/wiki/30#303 Округа] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/30#303 区] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/30#303 303-7] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/30#303 منطقة] <br />
* de-ii: [http://de-ii.demopaedia.org/wiki/30#303 Distrikte] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/30#303 district] <br />
* {{missing French term|30|303|303-7|FrenchTextTerm=district}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/30#303 distretto] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/30#303 303-8] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/30#303 بلديات] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/30#303 township] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/30#303 municipalité] <br />
* {{missing French term|30|303|303-8|FrenchTextTerm=municipalité}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/30#303 municipalità] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/30#303 町] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/30#303 município] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/30#303 镇] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/30#303 303-9] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/30#303 أقضية] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/30#303 county] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/30#303 comté] <br />
* {{missing French term|30|303|303-9|FrenchTextTerm=comté}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/30#303 contea] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/30#303 contea] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/30#303 郡] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/30#303 condado] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/30#303 县] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/30#303 303-10] ===<br />
* ar-ii: [http://ar-ii.demopaedia.org/wiki/30#303 محافظة] <br />
* en-ii: [http://en-ii.demopaedia.org/wiki/30#303 province] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/30#303 province] <br />
* {{missing French term|30|303|303-10|FrenchTextTerm=province}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* it-ii: [http://it-ii.demopaedia.org/wiki/30#303 provincia] <br />
* ja-ii: [http://ja-ii.demopaedia.org/wiki/30#303 州] <br />
* pt-ii: [http://pt-ii.demopaedia.org/wiki/30#303 províncias] <br />
* zh-ii: [http://zh-ii.demopaedia.org/wiki/30#303 省] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/30#303 303-11] ===<br />
* de-ii: [http://de-ii.demopaedia.org/wiki/30#303 Kreise] <br />
* {{missing German term|30|303|303-11|GermanNewTextTerm=Kreise}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/30#303 cercle] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/30#303 circoscrizione] <br />
<br />
=== [http://cs-ii.demopaedia.org/wiki/30#307 307-6] ===<br />
* es-ii: [http://es-ii.demopaedia.org/wiki/30#307 áreas metropolitanas] <br />
* {{missing Spanish term|30|307|307-6|SpanishTextTerm=áreas metropolitanas}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* es-ii: [http://es-ii.demopaedia.org/wiki/30#307 regiones metropolitanas] <br />
* {{missing Spanish term|30|307|307-6|SpanishTextTerm=regiones metropolitanas}}--[[Uživatel:Nicolas Brouard|Nicolas Brouard]] 12. 6. 2013, 20:12 (CEST)<br />
<br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/30#307 aire métropolitaine] <br />
* fr-ii: [http://fr-ii.demopaedia.org/wiki/30#307 région métropolitaine] <br />
* it-ii: [http://it-ii.demopaedia.org/wiki/30#307 area metropolitana]</div>
Nicolas Brouard