MediaWiki:Common.js
Notă: După publicare, trebuie să treceți peste memoria cache a navigatorului pentru a putea vedea modificările:
- Firefox / Safari: Țineți apăsat pe Shift în timp ce faceți clic pe Reîncărcare ori apăsați Ctrl-F5 sau Ctrl-R (⌘-R pe un sistem Mac);
- Google Chrome: Apăsați Ctrl-Shift-R (⌘-Shift-R pe un sistem Mac);
- Internet Explorer / Edge: Țineți apăsat pe Ctrl în timp ce faceți clic pe Reîmprosptare sau apăsați Ctrl-F5;
- Opera: Apăsați Ctrl-F5.
function LegAF()
{
// iterate over all <span>-elements
for(var i=0; a = document.getElementsByTagName("span")[i]; i++) {
// if found a AF span
if(a.className == "AF") {
// iterate over all <li>-elements
for(var j=0; b = document.getElementsByTagName("li")[j]; j++) {
// if found a AF link
if(b.className == "interwiki-" + a.id) {
b.style.padding = "0 0 0 16px";
b.style.backgroundImage = "url('//upload.wikimedia.org/wikipedia/ro/5/53/Pictograma-LegAF.png')";
b.style.backgroundRepeat = "no-repeat";
b.title = "Acest articol este considerat a fi de calitate";
}
}
}
}
}
$(LegAF);
/*AICI începe codul funcțional pentru "metacasete"*/
/* Funcționarea Format:Metacasetă */
function MetaCasetaInit(){
//Se execută la încărcarea paginii dacă există metacesete,
// sunt atașate evenimentele la butoane
//alert("MetaCasetaInit");
var i=0 //Inițializare contor casete
for (i=0;i<=9;i++){
var vMc = document.getElementById("mc"+i);
if (!vMc) break;
//alert("MetaCasetaInit, gasit MetaCasetaInit mc"+i);
var j=1 //Inițializare contor butoane din casetă
var vFilaIni = 0 //Filă vizibilă inițial
for (j=1;j<=9;j++){
var vBt = document.getElementById("mc"+i+"bt"+j);
if (!vBt) break;
//alert("MetaCasetaInit, gasit buton mc"+i+"bt"+j);
vBt.onclick = MetaCasetaAfisareFila; //La fiecare buton sunt atașate evenimentele onclick
//alert (vBt.className);
if (vBt.className=="mcButoSel") vFilaIni=j; //Dacă este selecționat un buton, vizualizăm indexul
}
//alert ("mc="+i+", fila="+j+", filaini="+vFilaIni );
if (vFilaIni == 0) { //Dacă niciun buton nu este selecționat, atunci afișarea este aleatorie
vFilaIni = 1+Math.floor((j-1)*Math.random()) ;
//alert ("Activare Fila; _mc"+i+"bt"+vFilaIni +"_");
document.getElementById("mc"+i+"fila"+vFilaIni).style.display = "block";
document.getElementById("mc"+i+"fila"+vFilaIni).style.visibility = "visible";
document.getElementById("mc"+i+"bt"+vFilaIni).className="mcButoSel";
}
}
}
function MetaCasetaAfisareFila(){
//Se execută la apăsarea unei file,
//aceea este vizibilă, iar celelalte se ascund
var vMcNume = this.id.substr(0,3); //pornind de la numele butonului, se deduce numele casetei
var vIndex = this.id.substr(5,1); //Și indexul
var i=1
for (i=1;i<=9;i++){ //se caută toate butoanele acelei file
//alert(vMcNume+"fila"+i);
var vFilaElem = document.getElementById(vMcNume+"fila"+i);
if (!vFilaElem) break;
if (vIndex==i){ //Dacă este fila bună aceasta este afișată și se schimbă clasa butonului
vFilaElem.style.display = "block";
vFilaElem.style.visibility = "visible";
document.getElementById(vMcNume+"bt"+i).className="mcButoSel";
} else { //Dacă nu, este ascunsă și se schimbă clasa butonului
vFilaElem.style.display = "none";
vFilaElem.style.visibility = "hidden";
document.getElementById(vMcNume+"bt"+i).className="mcButo";
}
}
return false; //evitarea reîncărcării paginii
}
$(document).ready(MetaCasetaInit);
/*AICI se termină codul funcțional pentru "metacasete"*/
/* ************************************************************** */
//
// Ajustări pentru pagina principală
//
//
/* ************************************************************** */
var isMainPage = mw.config.get( 'wgIsMainPage' )
mw.loader.using('mediawiki.util').then(function () {
var isDiff = (mw.util.getParamValue('diff') != null);
if (isMainPage) {
$( function() {
try {
/*
* Adaugă o legătură către lista completă de Wikipedii sub legăturile interwiki selecționate
*/
mw.util.addPortletLink(
'p-lang',
'//meta.wikimedia.org/wiki/List_of_Wikipedias',
'Lista completă'
);
/*
* Dispariție titlu din pagina principală
*/
if (!isDiff) {
mw.util.addCSS( '#lastmod, #siteSub, #contentSub, h1.firstHeading { display: none !important; }' );
}
} catch(e) {
// lets just ignore what's happened
}
});
}
});
/* ************************************************************** */
//
// AICI se termină ajustările pentru pagina principală
//
//
/* ************************************************************** */
// ============================================================
// BEGIN Dynamic Navigation Bars
// adds show/hide-button to navigation bars
function createNavigationBarToggleButton()
{
var indexNavigationBar = 0;
// iterate over all <div>-elements
for(
var i=0;
NavFrame = document.getElementsByTagName("div")[i];
i++
) {
// if found a navigation bar
if (NavFrame.className == "NavFrame") {
indexNavigationBar++;
var NavToggle = document.createElement("a");
NavToggle.className = 'NavToggle';
NavToggle.setAttribute('id', 'NavToggle' + indexNavigationBar);
NavToggle.setAttribute('href', 'javascript:toggleNavigationBar(' + indexNavigationBar + ');');
var NavToggleText = document.createTextNode(NavigationBarHide);
NavToggle.appendChild(NavToggleText);
// add NavToggle-Button as first div-element
// in <div class="NavFrame">
NavFrame.insertBefore(
NavToggle,
NavFrame.firstChild
);
NavFrame.setAttribute('id', 'NavFrame' + indexNavigationBar);
}
}
// if more Navigation Bars found than Default: hide all
if (NavigationBarShowDefault < indexNavigationBar) {
for(
var i=1;
i<=indexNavigationBar;
i++
) {
toggleNavigationBar(i);
}
}
}
$(createNavigationBarToggleButton);
var NavigationBarHide = '[ ascundere ]';
var NavigationBarShow = '[ extindere ]';
var NavigationBarShowDefault = 1;
function toggleNavigationBar(indexNavigationBar)
{
var NavToggle = document.getElementById("NavToggle" + indexNavigationBar);
var NavFrame = document.getElementById("NavFrame" + indexNavigationBar);
if (!NavFrame || !NavToggle) {
return false;
}
// if shown now
if (NavToggle.firstChild.data == NavigationBarHide) {
for (
var NavChild = NavFrame.firstChild;
NavChild != null;
NavChild = NavChild.nextSibling
) {
if (NavChild.className == 'NavPic') {
NavChild.style.display = 'none';
}
if (NavChild.className == 'NavContent') {
NavChild.style.display = 'none';
}
if (NavChild.className == 'NavToggle') {
NavChild.firstChild.data = NavigationBarShow;
}
}
// if hidden now
} else if (NavToggle.firstChild.data == NavigationBarShow) {
for (
var NavChild = NavFrame.firstChild;
NavChild != null;
NavChild = NavChild.nextSibling
) {
if (NavChild.className == 'NavPic') {
NavChild.style.display = 'block';
}
if (NavChild.className == 'NavContent') {
NavChild.style.display = 'block';
}
if (NavChild.className == 'NavToggle') {
NavChild.firstChild.data = NavigationBarHide;
}
}
}
}
// END Dynamic Navigation Bars
// ============================================================
//============================================================
// SFÂRȘIT dispariție titlu din pagina principală
//============================================================
//============================================================
//
// ÎNCEPUT previzualizare rapidă
//
//============================================================
/**
* Script de ajoutant une option de prévisualisation rapide.
*
*
* English: Add a Quick View option on the Edit pages.
* This script add 2 new buttons into the "editButtons" div.
* When QuickPrev button is press, the content of edit window
* is retreived and parsed using regular expressions.
*
* @author: fr:user:aoineko
* @version: 0.2
*/
function addQuickPreview()
{
var QuickPreviewBtnTitle = "Previzualizare rapidă a modificărilor dumneavoastră [Alt + Q]";
var QuickPreviewBtnValue = "Previzualizare rapidă";
var QuickPrevHideBtnTitle = "Ascundeți previzualizarea rapidă [Alt + H]";
var QuickPrevHideBtnValue = "Ascundeți";
var div = document.getElementsByTagName('div');
for(var i = 0; i < div.length ; i++)
{
if(div[i].className == "editButtons") // search "editButtons" div
{
div[i].appendChild(document.createElement("br")); // add a <br/>
var wpQuick = document.createElement("input"); // create and set the "QuickPrev" button
wpQuick.setAttribute("id", "wpQuick");
wpQuick.setAttribute("name", "wpQuick");
wpQuick.setAttribute("title", QuickPreviewBtnTitle);
wpQuick.setAttribute("value", QuickPreviewBtnValue);
wpQuick.setAttribute("type", "button");
wpQuick.setAttribute("onclick", "doQuickPreview();");
wpQuick.setAttribute("tabindex", "8");
wpQuick.setAttribute("accesskey", "Q");
div[i].appendChild(wpQuick);
var wpHide = document.createElement("input"); // create and set the "Hide" button
wpHide.setAttribute("id", "wpHide");
wpHide.setAttribute("name", "wpHide");
wpHide.setAttribute("title", QuickPrevHideBtnTitle);
wpHide.setAttribute("value", QuickPrevHideBtnValue);
wpHide.setAttribute("type", "button");
wpHide.setAttribute("onclick", "hideQuickPreview();");
wpHide.setAttribute("tabindex", "9");
wpHide.setAttribute("accesskey", "H");
div[i].appendChild(wpHide);
}
}
}
/// Retreive current code and parse it
function doQuickPreview()
{
var wpQuickPreview = document.getElementById("wpQuickPreview");
if(!wpQuickPreview)
{
/*var l = document.getElementsByTagName('div');
for(var i = 0; i < l.length ; i++)
if(l[i].className == "previewnote")
wpQuickPreview = l;
if(!wpQuickPreview)*/
{
wpQuickPreview = document.createElement("div");
wpQuickPreview.setAttribute("style", "border:solid 1px gray; width:100%; margin-top:1em; margin-bottom:1em; padding:0.5em;");
var wpSummaryLabel = document.getElementById("wpSummaryLabel");
wpSummaryLabel.parentNode.insertBefore(wpQuickPreview, wpSummaryLabel);
}
wpQuickPreview.setAttribute("id", "wpQuickPreview");
}
wpQuickPreview.style.display = "block";
wpTextbox1 = document.getElementById("wpTextbox1");
var str = "=Previzualizare rapidă=\n" + wpTextbox1.value;
var qp = new QuickPreview(str);
wpQuickPreview.innerHTML = qp.Parse();
}
function QuickPreview(wiki)
{
this.line = wiki.split(/\n/);
this.html = new String;
this.list = 0; // current list depth
this.tab = 0; // current tabulation depth
this.pre = false; /// inside a <pre> tag
this.para = false; /// inside a paragraph
this.HandlePre = function(i)
{
if(this.line[i][0] == ' ')
{
if(this.para)
{
this.para = false;
this.html += "</p>\n";
}
if(!this.pre)
{
this.pre = true;
this.html += "<pre>\n";
}
this.html += this.line[i] + "\n";
return true;
}
else if(this.pre)
{
this.pre = false;
this.html += "</pre>\n";
}
return false;
};
this.HandleH = function(i)
{
if(res = this.line[i].match(/^(={1,6})(.*)\1(.*)$/))
{
this.line[i] = "<h" + res[1].length + ">" + res[2] + "</h" + res[1].length + ">" + res[3];
return true;
}
return false;
};
this.Parse = function()
{
this.html = "";
for(var i = 0; i < this.line.length ; i++)
{
var p = true;
if(this.HandlePre(i))
continue;
if(this.HandleH(i))
p = false;
if(p && !this.para)
{
this.para = true;
this.html += "<p>";
}
this.html += this.line[i]
// Sign //
.replace(/~{5}/g, Date())
.replace(/~{4}/g, "<span style='padding:0.2em; margin:0.5em; border:dashed 1px yellow;'>Semnătură</span> "+Date())
.replace(/~{3}/g, "<span style='padding:0.2em; margin:0.5em; border:dashed 1px yellow;'>Semnătură</span>")
// Style //
.replace(/'''''(.*?)''(.*?)'''/g, "<strong><em>$1</em>$2</strong>")
.replace(/'''''(.*?)'''(.*?)''/g, "<em><strong>$1</strong>$2</em>")
.replace(/'''(.*?)''(.*?)'''''/g, "<strong>$1<em>$2</em></strong>")
.replace(/'''''(.*?)''''/g, "<strong><em>\'$1</em></strong>")
.replace(/''''(.*?)''''/g, "<strong><em>$1</em></strong>")
.replace(/''''(.*?)'''/g, "<strong>\'$1</strong>")
.replace(/'''(.*?)'''/g, "<strong>$1</strong>")
.replace(/'''(.*?)''/g, "<em>\'$1</em>")
.replace(/''(.*?)''/g, "<em>$1</em>")
// List //
.replace(/^\*(.*)/g, "<li>$1</li>")
.replace(/^#(.*)/g, "<li>$1</li>")
.replace(/^:(.*)/g, "<li>$1</li>")
// Link //
.replace(/\{\{([^\|]*).*}}/g, "<span style='padding:0.2em; margin:0.5em; border:dashed 1px lightgreen;'>Format : $1</span>")
.replace(/\[\[[Ii]magine:([^\|]*)[^\[]*\]\]/g, "<span style='padding:0.2em; margin:0.5em; border:dashed 1px lightblue;'>Imagine : $1</span>")
.replace(/\[\[[Cc]ategorie:([^\|]*)[^\[]*\]\]/g, "<span style='padding:0.2em; margin:0.5em; border:dashed 1px #FF8080;'><a href='/wiki/Categorie:$1' title='$1'>Categorie : $1</a></span>")
.replace(/\[\[([^\[.]*)\|([^\[.]*)\]\]/g, "<a href='/wiki/$1' title='$1'>$2</a>")
.replace(/\[\[([^\[.]*)\]\]/g, "<a href='/wiki/$1' title='$1'>$1</a>")
/*
// Special //
.replace(/\n\n/g, "\n\n<br/>")
.replace(/(^|\n)-{4}(?!~)/g, "<hr/>")
// Table //
.replace(/(^|\n)\{\|(.*)/g, "$1<table $2>")
.replace(/(^|\n)\|}/g, "$1</table>")
.replace(/(^|\n)(\|.*)\|\|/g, "$1$2</td><td>")
.replace(/(^|\n)\|[^-}](.*)/g, "$1</td>$2<td>")
.replace(/(^|\n)(!.*)!!/g, "$1$2</th><th>")
.replace(/(^|\n)![^-](.*)/g, "$1</th>$2<th>")
*/
;
this.html += "\n";
}
return this.html;
};
};
/// Hide
function hideQuickPreview()
{
var wpQuickPreview = document.getElementById("wpQuickPreview");
if(wpQuickPreview)
{
wpQuickPreview.style.display = 'none';
}
}
$(addQuickPreview);
//============================================================
// SFÂRȘIT previzualizare rapidă
//============================================================
//============================================================
// ÎNCEPUT repararea titlurilor cu inițială mică
//============================================================
// For pages that have something like Template:Lowercase, replace the title, but only if it is cut-and-pasteable as a valid wikilink.
// (for instance [[iPod]]'s title is updated. <nowiki>But [[C#]] is not an equivalent wikilink, so [[C Sharp]] doesn't have its main title changed)</nowiki>
//
// The function looks for a banner like this: <nowiki>
// <div id="RealTitleBanner"> <!-- div that gets hidden -->
// <span id="RealTitle">title</span>
// </div>
// </nowiki>An element with id=DisableRealTitle disables the function.
var disableRealTitle = 0; // users can disable this by making this true from their monobook.js
if (wgIsArticle) { // don't display the RealTitle when editing, since it is apparently inconsistent (doesn't show when editing sections, doesn't show when not previewing)
$(function() {
try {
var realTitleBanner = document.getElementById("RealTitleBanner");
if (realTitleBanner && !document.getElementById("DisableRealTitle") && !disableRealTitle) {
var realTitle = document.getElementById("RealTitle");
if (realTitle) {
var realTitleHTML = realTitle.innerHTML;
realTitleText = $(realTitle).text();
var isPasteable = 0;
//var containsHTML = /</.test(realTitleHTML); // contains ANY HTML
var containsTooMuchHTML = /</.test( realTitleHTML.replace(/<\/?(sub|sup|small|big)>/gi, "") ); // contains HTML that will be ignored when cut-n-pasted as a wikilink
// calculate whether the title is pasteable
var verifyTitle = realTitleText.replace(/^ +/, ""); // trim left spaces
verifyTitle = verifyTitle.charAt(0).toUpperCase() + verifyTitle.substring(1, verifyTitle.length); // uppercase first character
// if the namespace prefix is there, remove it on our verification copy. If it isn't there, add it to the original realValue copy.
if (mw.config.get('wgNamespaceNumber') != 0) {
if (mw.config.get('wgCanonicalNamespace') == verifyTitle.substr(0, mw.config.get('wgCanonicalNamespace').length).replace(/ /g, "_") && verifyTitle.charAt(mw.config.get('wgCanonicalNamespace').length) == ":") {
verifyTitle = verifyTitle.substr(mw.config.get('wgCanonicalNamespace').length + 1);
} else {
realTitleText = mw.config.get('wgCanonicalNamespace').replace(/_/g, " ") + ":" + realTitleText;
realTitleHTML = mw.config.get('wgCanonicalNamespace').replace(/_/g, " ") + ":" + realTitleHTML;
}
}
// verify whether wgTitle matches
verifyTitle = verifyTitle.replace(/^ +/, "").replace(/ +$/, ""); // trim left and right spaces
verifyTitle = verifyTitle.replace(/_/g, " "); // underscores to spaces
verifyTitle = verifyTitle.charAt(0).toUpperCase() + verifyTitle.substring(1, verifyTitle.length); // uppercase first character
isPasteable = (verifyTitle == mw.config.get('wgTitle'));
var h1 = document.getElementsByTagName("h1")[0];
if (h1 && isPasteable) {
h1.innerHTML = containsTooMuchHTML ? realTitleText : realTitleHTML;
if (!containsTooMuchHTML)
realTitleBanner.style.display = "none";
}
document.title = realTitleText + " - Wikipedia";
}
}
} catch (e) {
/* Something went wrong. */
}
});
}
//============================================================
// SFÂRȘIT repararea titlurilor cu inițială mică
//============================================================
/**
* WikiMiniAtlas is a popup click and drag world map.
* See [[meta:WikiMiniAtlas]] for more information.
* Maintainers: [[w:User:Dschwen]]
*/
mw.loader.load( '//meta.wikimedia.org/w/index.php?title=MediaWiki:Wikiminiatlas.js&action=raw&ctype=text/javascript' );
/** Funcție care adaugă [[Format:Informații]] în cutia pentru trimitere fișiere**************
*
* Writen by [[commons:User:Yonidebest|User:Yonidebest]]
*/
function loadAutoInfomationTemplate()
{
uploadDescription = document.getElementById('wpUploadDescription');
if (uploadDescription==null) {
return null;
}
var tripleTilda = '~~' + '~';
var doubleBracket = '{' + '{';
if (
wgUserLanguage != 'fromflickr' &&
wgUserLanguage != 'fromwikimedia' &&
wgUserLanguage != 'fromgov'
) {
uploadDescription.focus();
switch(wgUserLanguage) {
case "ownwork":
uploadDescription.value =
doubleBracket +
'Informații\n|Descriere=\n|Sursa=self-made\n|Data=\n|'+
'Autor= MyName (' + tripleTilda + ')\n|Permisiune=\n|alte_versiuni=\n}}\n';
break;
case "ro-nuestelibera":
uploadDescription.value =
doubleBracket +
'Material sub drepturi de autor\n|Descriere=\n|Sursa=*OBLIGATORIU*\n|Articol=*OBLIGATORIU*\n|'+
'Secțiune=cât din fișierul original este folosit?\n|Rezoluție joasă=da sau nu?\n|Scop=de ce este cu adevărat necesar?\n|Înlocuibil=da sau nu; explicați\n|Alte informații=\n}}\n';
break;
default:
uploadDescription.value =
doubleBracket +
'Informații\n|Descriere=\n|Sursa=\n|Data=\n|' +
'Autor=\n|Permisiune=\n|alte_versiuni=\n}}\n';
break;
}
}
}
$(loadAutoInfomationTemplate);
// support for project:IRC
$(function () {
mw.loader.load('//ro.wikinews.org/w/index.php?title=mediawiki:Irc.js&action=raw&ctype=text/javascript');
});
// adding language tabs at special:Preferences
if(mw.config.get('wgCanonicalSpecialPageName') == "Preferences") $.when($.ready,mw.loader.using('mediawiki.util')).then(function() {
var langs = ['ro','en','fr','it','es','pt','de'];
for(var i=0;i<langs.length;i++) {
mw.util.addPortletLink('p-cactions', mw.util.getUrl(null, { uselang: langs[i] }), langs[i]);
}
});
/** Collapsible tables
*
* Description: Allows tables to be collapsed, showing only the header. See
* [[Wikipedia:NavFrame]].
* Maintainers: [[User:R. Koot]]
*/
var autoCollapse = 2;
var collapseCaption = "ascunde";
var expandCaption = "arată";
function collapseTable( tableIndex )
{
var Button = document.getElementById( "collapseButton" + tableIndex );
var Table = document.getElementById( "collapsibleTable" + tableIndex );
if ( !Table || !Button ) {
return false;
}
var Rows = Table.rows;
if ( Button.firstChild.data == collapseCaption ) {
for ( var i = 1; i < Rows.length; i++ ) {
Rows[i].style.display = "none";
}
Button.firstChild.data = expandCaption;
} else {
for ( var i = 1; i < Rows.length; i++ ) {
Rows[i].style.display = Rows[0].style.display;
}
Button.firstChild.data = collapseCaption;
}
}
function createCollapseButtons()
{
var tableIndex = 0;
var NavigationBoxes = new Object();
var Tables = document.getElementsByTagName( "table" );
for ( var i = 0; i < Tables.length; i++ ) {
if ( $(Tables[i]).hasClass("collapsible" ) ) {
/* only add button and increment count if there is a header row to work with */
var HeaderRow = Tables[i].getElementsByTagName( "tr" )[0];
if (!HeaderRow) continue;
var Header = HeaderRow.getElementsByTagName( "th" )[0];
if (!Header) continue;
NavigationBoxes[ tableIndex ] = Tables[i];
Tables[i].setAttribute( "id", "collapsibleTable" + tableIndex );
var Button = document.createElement( "span" );
var ButtonLink = document.createElement( "a" );
var ButtonText = document.createTextNode( collapseCaption );
Button.style.styleFloat = "right";
Button.style.cssFloat = "right";
Button.style.fontWeight = "normal";
Button.style.textAlign = "right";
Button.style.width = "6em";
ButtonLink.style.color = Header.style.color;
ButtonLink.setAttribute( "id", "collapseButton" + tableIndex );
ButtonLink.setAttribute( "href", "javascript:collapseTable(" + tableIndex + ");" );
ButtonLink.appendChild( ButtonText );
Button.appendChild( document.createTextNode( "[" ) );
Button.appendChild( ButtonLink );
Button.appendChild( document.createTextNode( "]" ) );
Header.insertBefore( Button, Header.childNodes[0] );
tableIndex++;
}
}
for ( var i = 0; i < tableIndex; i++ ) {
if ( $(NavigationBoxes[i]).hasClass("collapsed" ) || ( tableIndex >= autoCollapse && $(NavigationBoxes[i]).hasClass("autocollapse" ) ) ) {
collapseTable( i );
}
}
}
$( createCollapseButtons );
// Force preview
if( mw.config.get('wgAction') == 'edit' || mw.config.get('wgAction') == 'submit' ) {
importScript( 'MediaWiki:Common.js/edit.js' );
}
/** END Collapsible tables *********************************************************/
/**
* Fără obscenități în schimbări recente
* Vezi //ro.wikipedia.org/w/index.php?title=Wikipedia:Afi%C5%9Fierul_administratorilor&oldid=2457421#Mai_pu.C5.A3ine_obscenit.C4.83.C5.A3i_.C3.AEn_pagina_de_schimb.C4.83ri_recente
*/
var noobscen_previous_content='';
var noobscen_previous_obscen=false;
function noobscen()
{
var select=document.getElementById('wpDeleteReasonList');
if (select==undefined) {
return false;
}
var input=document.getElementById('wpReason');
select.onchange=function() {
if (this.value=="Conținut obscen") {
noobscen_previous_content=input.value;
input.value='';
noobscen_previous_obscen=true;
} else if (noobscen_previous_obscen) {
noobscen_previous_obscen=false;
input.value=noobscen_previous_content;
}
}
}
if (mw.config.get('wgAction')=='delete') {
$(noobscen);
}
/** END noobscen *****************************/
/** Administrare afișare diacritice. Vedeți [[w:ro:Wikipedia:Corectarea diacriticelor]] */
importScript("MediaWiki:Diacritice.js");
/** End administrare diacritice *************/