Karber vaten:Mirzali/Arşiv 4
Request for translation. Yanka Kupala and Yakub Kolas
bıvurneWarm greeting from Belarusian Wikipedia! This year we celebrate 130. birthday of Belarusian great poets en:Yanka Kupala and en:Yakub Kolas Could you help us to translate articles into your unique and honourable language? Thank you in advance!--Rymchonak 06:08, 16 Çele 2012 (UTC)
Şablon an jî Template?
bıvurne- Silav Mirzali,
- çima şûna peyv Şablon de peyv Template tê bi kar anîn?
- Bi min Template ne bi zimanê zazakî ye, an jî?Heke ku ev bibûya şablon bi min wê rindtir bûya û ê bibe.Silav--George Animal
- çima şûna peyv Şablon de peyv Template tê bi kar anîn?
Blocked user complaint
bıvurneHello, Mirzali. The user Gomada was blocked here by you on last October. He has three edits and the reason for blocking is not clear. I am assuming that the block is correct and there is no mistake, but it is hard to understand the reasons for those who doesn't speak local language. So, could you, please, tell me why did you block him? Gomada opened a request for comment on Meta due to this block. You can ask me or you can comment directly on that page at your discretion. Thanks in advance and sorry for speaking in English.” TeleS (T M @ C S) 05:31, 24 Tişrino Peyên 2011 (UTC)
Kategoriye
bıvurneBıra wa kategoriya şablona miyan bê çı kı bahdo hewadayısê cı rehat bo marê. (Tadiranscopus)
Sablona pela seri
bıvurneSablona pela seri sazkerdışê cı hol biyo, çı wext tı dê çekerê pela seri --Tadiranscopus 10:30, 2 Çele 2012 (UTC)
Koreksiyon yerine reversiyon
bıvurneJj korektlı 60px: w:de:J
web.de
bıvurneŞori web.de dı pelada xo kodo newekerdış rışto, uca ra ê kodi ber fayste kodeksi defi de bo ka abyo.Tadiranscopus 12:19, 13 Şıbat 2012 (UTC)
Common.js
bıvurneEna kod
//<syntaxhighlight lang="javascript"> // Map jQuery over to $ // Will be done by ResourceLoader later on // No script here is/should use prototype etc. if (typeof $ == 'undefined') $ = jQuery; /* * Description: Redirects from /User:UserName/skin.js or .css to the user's actual skin page * Maintainer: Cacycle */ if (wgArticleId == 0 && wgUserName) { var slash = wgPageName.indexOf('/'); var norm = wgPageName.substr(0, slash) + wgPageName.substr(slash).toLowerCase(); var test = 'User:' + wgUserName.replace(/ /g, '_') + '/skin.'; var ext = null; if (norm == test + 'js') ext = 'js'; else if (norm == test + 'css') ext = 'css'; if (ext != null) window.location.href = window.location.href.replace(/\/skin.(css|js)/i, '/' + skin + '.' + ext); } /** extract a URL parameter from the current URL ********** * From [[en:User:Lupin/autoedit.js]] * * paramName : the name of the parameter to extract */ function getURLParamValue( paramName, url) { if (typeof (url) == 'undefined' || url === null) url = document.location.href; var cmdRe=RegExp( '[&?]' + paramName + '=([^&#]*)' ); // Stop at hash var m=cmdRe.exec(url); if (m && m.length > 1) return decodeURIComponent(m[1]); return null; } /** &withJS= URL parameter ******* * Allow to try custom scripts from MediaWiki space * without editing [[Special:Mypage/monobook.js]] */ var extraJS = getURLParamValue("withJS"); if ( extraJS && extraJS.match("^MediaWiki:[^&<>=%]*\.js$") ) { importScript(extraJS); } /* Import more specific scripts if necessary */ if (wgAction == "edit" || wgAction == "submit" || wgPageName == "Special:Upload") //scripts specific to editing pages { importScript("MediaWiki:Common.js/edit.js") } else if (wgPageName == "Special:Watchlist") //watchlist scripts { importScript("MediaWiki:Common.js/watchlist.js") } if( wgNamespaceNumber == 6 ) { importScript('MediaWiki:Common.js/file.js'); } /** For sysops and accountcreators ***************************************** * * Description: Allows for sysop-specific Javascript at [[MediaWiki:Sysop.js]], * and accountcreator-specific CSS at [[MediaWiki:Accountcreator.css]]. */ if ( wgUserGroups ) { for ( var g = 0; g < wgUserGroups.length; ++g ) { if ( wgUserGroups[g] == "sysop" ) { importStylesheet("MediaWiki:Sysop.css"); addOnloadHook( function() { if ( !window.disableSysopJS ) { importScript("MediaWiki:Sysop.js"); } } ); } else if ( wgUserGroups[g] == "accountcreator" ) { importStylesheet("MediaWiki:Accountcreator.css"); } } } /** WikiMiniAtlas ******************************************************* * * Description: WikiMiniAtlas is a popup click and drag world map. * This script causes all of our coordinate links to display the WikiMiniAtlas popup button. * The script itself is located on meta because it is used by many projects. * See [[Meta:WikiMiniAtlas]] for more information. * Maintainers: [[User:Dschwen]] */ if (wgServer == "https://secure.wikimedia.org") { var metaBase = "https://secure.wikimedia.org/wikipedia/meta"; } else { var metaBase = "https://meta.wikimedia.org"; } importScriptURI(metaBase+"/w/index.php?title=MediaWiki:Wikiminiatlas.js&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400") /* Scripts specific to Internet Explorer */ if (navigator.appName == "Microsoft Internet Explorer") { /** Internet Explorer bug fix ************************************************** * * Description: Fixes IE horizontal scrollbar bug * Maintainers: [[User:Tom-]]? */ var oldWidth; var docEl = document.documentElement; function fixIEScroll() { if (!oldWidth || docEl.clientWidth > oldWidth) doFixIEScroll(); else setTimeout(doFixIEScroll, 1); oldWidth = docEl.clientWidth; } function doFixIEScroll() { docEl.style.overflowX = (docEl.scrollWidth - docEl.clientWidth < 4) ? "hidden" : ""; } document.attachEvent("onreadystatechange", fixIEScroll); document.attachEvent("onresize", fixIEScroll); // In print IE (7?) does not like line-height appendCSS( '@media print { sup, sub, p, .documentDescription { line-height: normal; }}'); // IE overflow bug appendCSS('div.overflowbugx { overflow-x: scroll !important; overflow-y: hidden !important; } div.overflowbugy { overflow-y: scroll !important; overflow-x: hidden !important; }'); // IE zoomfix // Use to fix right floating div/table inside tables appendCSS('.iezoomfix div, .iezoomfix table { zoom: 1;}'); // Import scripts specific to Internet Explorer 6 if (navigator.appVersion.substr(22, 1) == "6") { importScript("MediaWiki:Common.js/IE60Fixes.js") } } /* Load fixes for Windows font rendering */ if( navigator.platform.indexOf( "Win" ) != -1 ) { importStylesheet( 'MediaWiki:Common.css/WinFixes.css' ); } /* Test if an element has a certain class ************************************** * * Description: Uses regular expressions and caching for better performance. * Maintainers: [[User:Mike Dillon]], [[User:R. Koot]], [[User:SG]] */ var hasClass = (function () { var reCache = {}; return function (element, className) { return (reCache[className] ? reCache[className] : (reCache[className] = new RegExp("(?:\\s|^)" + className + "(?:\\s|$)"))).test(element.className); }; })(); /** Interwiki links to featured articles *************************************** * * Description: Highlights interwiki links to featured articles (or * equivalents) by changing the bullet before the interwiki link * into a star. * Maintainers: [[User:R. Koot]] */ function LinkFA() { if ( document.getElementById( "p-lang" ) ) { var InterwikiLinks = document.getElementById( "p-lang" ).getElementsByTagName( "li" ); for ( var i = 0; i < InterwikiLinks.length; i++ ) { if ( document.getElementById( InterwikiLinks[i].className + "-fa" ) ) { InterwikiLinks[i].className += " FA" InterwikiLinks[i].title = "Bu madde, başka bir dilde seçkin madde statüsündedir."; } else if ( document.getElementById( InterwikiLinks[i].className + "-ga" ) ) { InterwikiLinks[i].className += " GA" InterwikiLinks[i].title = "Eno madde, jewna zuwan de wesiqeyo weşo."; } } } } addOnloadHook( LinkFA ); /** Collapsible tables ********************************************************* * * Description: Allows tables to be collapsed, showing only the header. See * [[Wikipedia:NavFrame]]. * Maintainers: [[User:R. Koot]] */ var autoCollapse = 2; var collapseCaption = "bınımne"; var expandCaption = "bımocne"; 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 ( hasClass( Tables[i], "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.className = "collapseButton"; //Styles are declared in Common.css ButtonLink.style.color = Header.style.color; ButtonLink.setAttribute( "id", "collapseButton" + tableIndex ); ButtonLink.setAttribute( "href", "#" ); addHandler( ButtonLink, "click", new Function( "evt", "collapseTable(" + tableIndex + " ); return killEvt( evt );") ); 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 ( hasClass( NavigationBoxes[i], "collapsed" ) || ( tableIndex >= autoCollapse && hasClass( NavigationBoxes[i], "autocollapse" ) ) ) { collapseTable( i ); } else if ( hasClass( NavigationBoxes[i], "innercollapse" ) ) { var element = NavigationBoxes[i]; while (element = element.parentNode) { if ( hasClass( element, "outercollapse" ) ) { collapseTable ( i ); break; } } } } } addOnloadHook( createCollapseButtons ); /** Dynamic Navigation Bars (experimental) ************************************* * * Description: See [[Wikipedia:NavFrame]]. * Maintainers: UNMAINTAINED */ // set up the words in your language var NavigationBarHide = '[' + collapseCaption + ']'; var NavigationBarShow = '[' + expandCaption + ']'; // shows and hides content and picture (if available) of navigation bars // Parameters: // indexNavigationBar: the index of navigation bar to be toggled 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 (hasClass(NavChild, 'NavContent') || hasClass(NavChild, 'NavPic')) { NavChild.style.display = 'none'; } } NavToggle.firstChild.data = NavigationBarShow; // if hidden now } else if (NavToggle.firstChild.data == NavigationBarShow) { for (var NavChild = NavFrame.firstChild; NavChild != null; NavChild = NavChild.nextSibling) { if (hasClass(NavChild, 'NavContent') || hasClass(NavChild, 'NavPic')) { NavChild.style.display = 'block'; } } NavToggle.firstChild.data = NavigationBarHide; } } // adds show/hide-button to navigation bars function createNavigationBarToggleButton() { var indexNavigationBar = 0; // iterate over all < div >-elements var divs = document.getElementsByTagName("div"); for (var i = 0; NavFrame = divs[i]; i++) { // if found a navigation bar if (hasClass(NavFrame, "NavFrame")) { indexNavigationBar++; var NavToggle = document.createElement("a"); NavToggle.className = 'NavToggle'; NavToggle.setAttribute('id', 'NavToggle' + indexNavigationBar); NavToggle.setAttribute('href', 'javascript:toggleNavigationBar(' + indexNavigationBar + ');'); var isCollapsed = hasClass( NavFrame, "collapsed" ); /* * Check if any children are already hidden. This loop is here for backwards compatibility: * the old way of making NavFrames start out collapsed was to manually add style="display:none" * to all the NavPic/NavContent elements. Since this was bad for accessibility (no way to make * the content visible without JavaScript support), the new recommended way is to add the class * "collapsed" to the NavFrame itself, just like with collapsible tables. */ for (var NavChild = NavFrame.firstChild; NavChild != null && !isCollapsed; NavChild = NavChild.nextSibling) { if ( hasClass( NavChild, 'NavPic' ) || hasClass( NavChild, 'NavContent' ) ) { if ( NavChild.style.display == 'none' ) { isCollapsed = true; } } } if (isCollapsed) { for (var NavChild = NavFrame.firstChild; NavChild != null; NavChild = NavChild.nextSibling) { if ( hasClass( NavChild, 'NavPic' ) || hasClass( NavChild, 'NavContent' ) ) { NavChild.style.display = 'none'; } } } var NavToggleText = document.createTextNode(isCollapsed ? NavigationBarShow : NavigationBarHide); NavToggle.appendChild(NavToggleText); // Find the NavHead and attach the toggle link (Must be this complicated because Moz's firstChild handling is borked) for(var j=0; j < NavFrame.childNodes.length; j++) { if (hasClass(NavFrame.childNodes[j], "NavHead")) { NavToggle.style.color = NavFrame.childNodes[j].style.color; NavFrame.childNodes[j].appendChild(NavToggle); } } NavFrame.setAttribute('id', 'NavFrame' + indexNavigationBar); } } } addOnloadHook( createNavigationBarToggleButton ); /** Main Page layout fixes ********************************************************* * * Description: Adds an additional link to the complete list of languages available. * Maintainers: [[User:AzaToth]], [[User:R. Koot]], [[User:Alex Smotrov]] */ if (wgPageName == 'Pela_Seri' || wgPageName == 'Talk:Pela_Seri') addOnloadHook(function () { addPortletLink('p-lang', '//meta.wikimedia.org/wiki/List_of_Wikipedias', 'Liste pero', 'interwiki-completelist', 'tam listey Wikiya') var nstab = document.getElementById('ca-nstab-main') if (nstab && wgUserLanguage=='diq') { while (nstab.firstChild) nstab = nstab.firstChild nstab.nodeValue = 'Pela Seri' } } ) /** Table sorting fixes ************************************************ * * Description: Disables code in table sorting routine to set classes on even/odd rows * Maintainers: [[User:Random832]] */ ts_alternate_row_colors = false; /***** uploadwizard_newusers ******** * Switches in a message for non-autoconfirmed users at [[Wikipedia:Upload]] * * Maintainers: [[User:Krimpet]] ****/ function uploadwizard_newusers() { if (wgNamespaceNumber == 4 && wgTitle == "bar ke" && wgAction == "view") { var oldDiv = document.getElementById("autoconfirmedusers"), newDiv = document.getElementById("newusers"); if (oldDiv && newDiv) { if (typeof wgUserGroups == "object" && wgUserGroups) { for (i = 0; i < wgUserGroups.length; i++) { if (wgUserGroups[i] == "autoconfirmed") { oldDiv.style.display = "block"; newDiv.style.display = "none"; return; } } } oldDiv.style.display = "none"; newDiv.style.display = "block"; return; } } } addOnloadHook(uploadwizard_newusers); /** IPv6 AAAA connectivity testing **/ var __ipv6wwwtest_factor = 100; var __ipv6wwwtest_done = 0; if ((wgServer != "https://secure.wikimedia.org") && (Math.floor(Math.random()*__ipv6wwwtest_factor)==42)) { importScript("MediaWiki:Common.js/IPv6.js"); } /** Magic editintros **************************************************** * * Description: Adds editintros on disambiguation pages and BLP pages. * Maintainers: [[User:RockMFR]] */ function addEditIntro(name) { var el = document.getElementById('ca-edit'); if (!el) return; el = el.getElementsByTagName('a')[0]; if (el) el.href += '&editintro=' + name; } if (wgNamespaceNumber == 0) { addOnloadHook(function(){ if (document.getElementById('disambigbox')) addEditIntro('Template:Disambig_editintro'); }); addOnloadHook(function(){ var cats = document.getElementById('mw-normal-catlinks'); if (!cats) return; cats = cats.getElementsByTagName('a'); for (var i = 0; i < cats.length; i++) { if (cats[i].title == 'Category:Living people' || cats[i].title == 'Category:Possibly living people') { addEditIntro('Template:BLP_editintro'); break; } } }); } /* * Description: Stay on the secure server as much as possible * Maintainers: [[User:TheDJ]] */ if(wgServer == 'https://secure.wikimedia.org') { importScript( 'MediaWiki:Common.js/secure.js'); } // Define ta for now. Bugzilla 23175 window.ta = []; // ------------------------------------------------------------------------------- // Force Preview JavaScript code - Start // // To allow any group to bypass being forced to preview, // enter the group name in the permittedGroups array. // E.g. // var permittedGroups = []; // force everyone // var permittedGroups = [ "user"]; // permit logged-in users // var permittedGroups = [ "sysop", "bureaucrat"]; // permit sysop, bureaucrat // ------------------------------------------------------------------------------- var permittedGroups = [ "autoconfirmed"]; Array.prototype.intersects = function() { // -------------------------------------------------------- // Returns true if any element in the argument array // is the same as an element in this array // -------------------------------------------------------- if( !arguments.length ){ return false; } var array2 = arguments[0]; var len1 = this.length; var len2 = array2.length; if( len2 == 0 ){ return false; } for(var i=0; i<len1; i++){ for(var j=0; j<len2; j++) { if( this[i] === array2[j] ) { return true; } } } return false; }; function forcePreview() { if( wgAction != "edit") return; if( wgUserGroups === null) { wgUserGroups = []; } if( wgUserGroups.intersects(permittedGroups) ) { return; } var saveButton = document.getElementById("wpSave"); if( !saveButton ) return; saveButton.disabled = true; saveButton.value = "Ena pela qeyd ke"; saveButton.style.fontWeight = "normal"; document.getElementById("wpPreview").style.fontWeight = "bold"; } addOnloadHook(forcePreview); // ----------------------------------------------------- // Force Preview JavaScript code - End // ----------------------------------------------------- // Sidebar Değişiklikleri function ModifySidebar(action, section, name, link) { try { switch (section) { case "zıwane bini": var target = "p-lang"; break; case "wesayıti": var target = "p-tb"; break; case "geyrayış": var target = "p-navigation"; break; default: var target = "p-" + section; break; } if (action == "add") { var node = document.getElementById(target) .getElementsByTagName('div')[0] .getElementsByTagName('ul')[0]; var aNode = document.createElement('a'); var liNode = document.createElement('li'); aNode.appendChild(document.createTextNode(name)); aNode.setAttribute('href', link); liNode.appendChild(aNode); liNode.className='plainlinks'; node.appendChild(liNode); } if (action == "remove") { var list = document.getElementById(target) .getElementsByTagName('div')[0] .getElementsByTagName('ul')[0]; var listelements = list.getElementsByTagName('li'); for (var i = 0; i < listelements.length; i++) { if (listelements[i].getElementsByTagName('a')[0].innerHTML == name || listelements[i].getElementsByTagName('a')[0].href == link) { list.removeChild(listelements[i]); } } } } catch(e) { // lets just ignore what's happened return; } } function CustomizeModificationsOfSidebar() { //removes [[Xısusi:Bar ke]] from toolbox ModifySidebar("remove", "araçlar", "Dosya Bar ke", "//diq.wikipedia.org/wiki/Xısusi:Bar ke"); //adds [[Wikipediya:Bar ke]] to toolbox ModifySidebar("add", "wesayıti", "Dosya Bar ke", "//diq.wikipedia.org/wiki/Wikipediya:Bar ke"); } addOnloadHook(CustomizeModificationsOfSidebar); /** * Şablon:Galeriya xuzoyın */ function toggleImage(group, remindex, shwindex) { document.getElementById("ImageGroupsGr"+group+"Im"+remindex).style.display="none"; document.getElementById("ImageGroupsGr"+group+"Im"+shwindex).style.display="inline"; } function ImageGroup(){ if (document.URL.match(/printable/g)) return; var divs=document.getElementsByTagName("div"); var i = 0, j = 0; var units, search; var currentimage; var UnitNode; for (i = 0; i < divs.length ; i++) { if (divs[i].className != "ImageGroup") continue; UnitNode=undefined; search=divs[i].getElementsByTagName("div"); for (j = 0; j < search.length ; j++) { if (search[j].className != "ImageGroupUnits") continue; UnitNode=search[j]; break; } if (UnitNode==undefined) continue; units=Array(); for (j = 0 ; j < UnitNode.childNodes.length ; j++ ) { var temp = UnitNode.childNodes[j]; if (temp.className=="center") units.push(temp); } for (j = 0 ; j < units.length ; j++) { currentimage=units[j]; currentimage.id="ImageGroupsGr"+i+"Im"+j; var imghead = document.createElement("div"); var leftlink = document.createElement("a"); var rightlink = document.createElement("a"); if (j != 0) { leftlink.href = "javascript:toggleImage("+i+","+j+","+(j-1)+");"; leftlink.innerHTML="◀"; } if (j != units.length - 1) { rightlink.href = "javascript:toggleImage("+i+","+j+","+(j+1)+");"; rightlink.innerHTML="▶"; } var comment = document.createElement("tt"); comment.innerHTML = "("+ (j+1) + "/" + units.length + ")"; with(imghead) { style.fontSize="110%"; style.fontweight="bold"; appendChild(leftlink); appendChild(comment); appendChild(rightlink); } if (units.length>1) currentimage.insertBefore(imghead,currentimage.childNodes[0]); if (j != 0) currentimage.style.display="none"; } } } addOnloadHook(ImageGroup); /************* *** AJAX transclusion table <//meta.wikimedia.org/wiki/User:Pathoschild/Scripts/AJAX_transclusion_table> *** by [[m:user:Pathoschild]] *************/ // Documentation: // - uses tables with class="attable" function attIntialize() { /* namespace */ var att = {}; /* find AJAX tables */ att.alltables = document.getElementsByTagName('table'); // all tables att.tables = new Array(); // AJAX tables att.count = att.alltables.length; // count all tables var x = 0; // count AJAX tables for(var i=0; i<att.count; i++) { if(att.alltables[i].getAttribute('class')) { if(att.alltables[i].getAttribute('class').match(/\battable\b/)) { att.tables[x] = att.alltables[i]; x++; } } } if(att.tables.length) { /* array of all att rows */ att.rows = new Array; /* rebuild tables with tbodies */ att.countTables = att.tables.length; for(var i=0; i<att.countTables; i++) { /* get elements */ att.table = att.tables[i]; att.trows = att.table.getElementsByTagName('tr'); att.countRows = att.trows.length; /* rebuild and fill row array */ att.tbody = document.createElement('tbody'); for(var x=0; x<att.countRows; x++) { att.countTemp = att.rows.length; att.rows[att.countTemp] = att.trows[x].cloneNode(true); att.rows[att.countTemp].setAttribute('id','oldrow_'+att.countTemp); att.tbody.appendChild(att.rows[att.countTemp]); } att.table.innerHTML = ''; att.table.appendChild(att.tbody); } /* create template add/show link */ att.shlink = document.createElement('a'); att.shlink.setAttribute('style','font-size:0.9em; cursor:pointer;'); att.shlink.appendChild(document.createTextNode('[bımocne] ')); /* add show/hide links */ att.countRows = att.rows.length; for(var i=0; i<att.countRows; i++) { att.row = att.rows[i]; att.firstCell = att.row.getElementsByTagName('td')[0]; // skip rows with no links or cells att.link = att.row.getElementsByTagName('a')[0]; if(att.link && att.link.getAttribute('href').match(/^\/wiki/) && att.firstCell) { att.row.setAttribute('id','oldrow_'+i); att.newlink = att.shlink.cloneNode(true); att.newlink.setAttribute('OnClick','attShow('+i+');'); att.newlink.setAttribute('id','attlink_'+i); att.firstCell.insertBefore(att.newlink,att.firstCell.firstChild); } } } } function attShow(id) { /* get elements */ var att = {}; att.row = document.getElementById('oldrow_'+id); att.tbody = att.row.parentNode; /* build display row */ att.colspan = att.row.getElementsByTagName('td').length; att.newrow = document.createElement('tr'); att.newrow.setAttribute('id','newrow_'+id); att.newcell = document.createElement('td'); att.newcell.setAttribute('colspan',att.colspan); att.newbox = document.createElement('div'); att.newbox.setAttribute('style','margin:0.5em; padding:0.5em; border:2px solid gray;'); att.loader = document.createElement('img'); att.loader.setAttribute('src','//upload.wikimedia.org/wikipedia/commons/d/d2/Spinning_wheel_throbber.gif'); att.newbox.appendChild(att.loader); att.newcell.appendChild(att.newbox); att.newrow.appendChild(att.newcell); att.tbody.insertBefore(att.newrow,att.row.nextSibling); /* get title */ att.links = att.row.getElementsByTagName('a'); att.count = att.links.length; for(var i=0; i<att.count; i++) { if(att.links[i].getAttribute('title')) { att.title = att.links[i].getAttribute('title'); break; } } att.query = sajax_init_object(); att.url = wgServer+'/wiki/'+att.title+'?action=render'; att.query.open('GET',att.url,true); att.query.send(''); att.query.onreadystatechange = function() { if(att.query.readyState==4) { if(att.query.status==200) { att.newbox.innerHTML = att.query.responseText; } else { att.loader.setAttribute('img','//upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Achtung.svg/32px-Achtung.svg.png'); } } } /* update show/hide link */ att.shlink = document.getElementById('attlink_'+id); att.shlink.innerHTML = '[bınımne] '; att.shlink.setAttribute('OnClick','attHide('+id+');'); } function attHide(id) { /* get elements */ var att = {}; att.row = document.getElementById('newrow_'+[id]); att.shlink = document.getElementById('attlink_'+id); /* remove display row */ att.row.parentNode.removeChild(att.row); /* update show/hide link */ att.shlink.innerHTML = '[bımocne] '; att.shlink.setAttribute('OnClick','attShow('+id+');'); } if(!location.href.match('disableatt=true')) { attIntialize(); } /** * Déplacement des [modifier] * * Correction des titres qui s'affichent mal en raison de limitations dues à MediaWiki. * Ce script devrait pouvoir être supprimé lorsque le [[bugzilla:11555]] sera résolu (comportement équivalent) * * Copyright 2006, Marc Mongenet. Licence GPL et GFDL. * * The function looks for <span class="editsection">, and move them * at the end of their parent and display them inline in small font. * var oldEditsectionLinks=true disables the function. */ function setModifySectionStyle() { var process = function(list) { for(var i=0;i!=list.length;i++) { var span=list[i].firstChild if (span.className == "editsection") { span.style.fontSize = "xx-small"; span.style.fontWeight = "normal"; span.style.cssFloat = span.style.styleFloat = "none"; span.parentNode.appendChild(document.createTextNode(" ")); span.parentNode.appendChild(span); } } } try { if (!(typeof oldEditsectionLinks == 'undefined' || oldEditsectionLinks == false)) return; process(document.getElementsByTagName("h2")); process(document.getElementsByTagName("h3")); process(document.getElementsByTagName("h4")); process(document.getElementsByTagName("h5")); process(document.getElementsByTagName("h6")); } catch (e) { } } addOnloadHook(setModifySectionStyle); //****************************************************************** // Ana Sayfadaki Metabox için gereken kod. İlk fırsatta muadili bulunacak //****************************************************************** /* Funcionament de la Plantilla:Metacaixa Implementat per: Usuari:Peleguer. Actualitzat per Joanjoc seguint les indicacions d'en Martorell */ function MetaCaixaInit(){ //S'executa al carregar-se la pàgina, si hi ha metacaixes, // s'assignen els esdeveniments als botons //alert("MetaCaixaInit"); var i=0 //Inicialitzem comptador de caixes for (i=0;i<=9;i++){ var vMc = document.getElementById("mc"+i); if (!vMc) break; //alert("MetaCaixaInit, trobada Metacaixa mc"+i); var j=1 //Inicialitzem comptador de botons dins de la caixa var vPsIni = 0 //Pestanya visible inicial for (j=1;j<=9;j++){ var vBt = document.getElementById("mc"+i+"bt"+j); if (!vBt) break; //alert("MetaCaixaInit, trobat botó mc"+i+"bt"+j); vBt.onclick = MetaCaixaMostraPestanya; //A cada botó assignem l'esdeveniment onclick //alert (vBt.className); if (vBt.className=="mcBotoSel") vPsIni=j; //Si tenim un botó seleccionat, en guardem l'index } //alert ("mc="+i+", ps="+j+", psini="+vPsIni ); if (vPsIni == 0) { //Si no tenim cap botó seleccionat, n'agafem un aleatòriament vPsIni = 1+Math.floor((j-1)*Math.random()) ; //alert ("Activant Pestanya a l'atzar; _mc"+i+"bt"+vPsIni +"_"); document.getElementById("mc"+i+"ps"+vPsIni).style.display = "block"; document.getElementById("mc"+i+"ps"+vPsIni).style.visibility = "visible"; document.getElementById("mc"+i+"bt"+vPsIni).className="mcBotoSel"; } } } function MetaCaixaMostraPestanya(){ //S'executa al clicar una pestanya, //aquella es fa visible i les altres s'oculten var vMcNom = this.id.substr(0,3); //A partir del nom del botó, deduïm el nom de la caixa var vIndex = this.id.substr(5,1); //I l'index var i=1 for (i=1;i<=9;i++){ //busquem totes les pestanyes d'aquella caixa //alert(vMcNom+"ps"+i); var vPsElem = document.getElementById(vMcNom+"ps"+i); if (!vPsElem) break; if (vIndex==i){ //Si és la pestanya bona la mostrem i canviem la classe de botó vPsElem.style.display = "block"; vPsElem.style.visibility = "visible"; document.getElementById(vMcNom+"bt"+i).className="mcBotoSel"; } else { //Sinó, l'ocultem i canviem la classe de botó vPsElem.style.display = "none"; vPsElem.style.visibility = "hidden"; document.getElementById(vMcNom+"bt"+i).className="mcBoto"; } } return false; //evitem la recàrrega de la pàgina } addOnloadHook(MetaCaixaInit); //</syntaxhighlight>