Bu, səhifəsinin . |
|
Başlıqsız
Cekli, xahiş edirəm bunu səhifəyə əlavə edəsiniz:
var mpTitle = "Halaman Utama"; var isMainPage = (document.title.substr(0, mpTitle.length) == mpTitle) var isDiff = (document.location.search && ( document.location.search.indexOf("diff=") != -1 || document.location.search.indexOf("oldid=") != -1 || document.location.search.indexOf("action=history") != -1 )); if ( isMainPage && !isDiff && (wgCanonicalNamespace != 'Special') ) { document.write('<style type="text/css"> #siteSub, #contentSub, h1.firstHeading { display: none!important; } #content, #content div.thumb, #p-cactions li a, #p-cactions li a:hover, #p-cactions li.selected a { background: #fff!important; } </style>'); var mpSmallEnabled; var mpMinWidth = 700; function mainPageTransform() { var mpContentEl = document.getElementById("bodyContent"); var mpBrowseEl = document.getElementById("EnWpMpBrowse"); var mpContainEl = document.getElementById("EnWpMpBrowseContainer"); var mpMarginEl = document.getElementById("EnWpMpMargin"); var mpEl = document.getElementById("EnWpMainPage"); if (!mpContentEl || !mpBrowseEl || !mpContainEl || !mpMarginEl || !mpEl) return; if (!mpSmallEnabled && mpContentEl.offsetWidth < mpMinWidth) { mpContainEl.insertBefore(mpBrowseEl, mpContainEl.firstChild); mpBrowseEl.className = "EnWpMpBrowseBottom"; mpMarginEl.style.marginRight = 0; mpSmallEnabled = true; } else if (mpSmallEnabled && mpContentEl.offsetWidth > mpMinWidth) { mpEl.insertBefore(mpBrowseEl, mpEl.firstChild); mpBrowseEl.className = "EnWpMpBrowseRight"; mpMarginEl.style.marginRight = "13.8em"; mpSmallEnabled = false; } } var onloadFuncts = [ mainPageTransform ]; if (window.addEventListener) window.addEventListener("resize", mainPageTransform, false); else if (window.attachEvent) window.attachEvent("onresize", mainPageTransform); } function mainpg() { if ((isMainPage || /[\/=:]Halaman_Utama/.test(document.location)) && document.getElementById('ca-nstab-main')) { document.getElementById('ca-nstab-main').firstChild.innerHTML = '<span>Utama<\/span>'; } } addOnloadHook(mainpg); /** == LowcaseTitle == Judul dengan [[Template:Judul|huruf pertama kecil]]. */ if (document.URL.indexOf("=edit") > 0 || document.URL.indexOf("=submit") > 0) {var noJS;} else { document.write('<style type="text/css">#title-override {display: none; speak: none;}<\/style>'); function pTitle() { if (document.getElementById("title-override")) { var pTitle = document.getElementById("pTitle").innerHTML; document.getElementsByTagName("h1")[0].innerHTML = pTitle; } } hookEvent("load", pTitle); }
→ 06:43, 5 oktyabr 2011 (UTC)
Əlavə olundu. --►06:49, 5 oktyabr 2011 (UTC)
Cekli bunu da zəhmət olmasa, yerləşdirərsiniz, deyəsən tapmışam :)
var hasClass = (function (){ var reCache = {} return function (element, className){ return (reCache[className] ? reCache[className] : (reCache[className] = new RegExp("(?:\\s|^)" + className + "(?:\\s|$)"))).test(element.className) } })() function collapsibleTables(){ var Table, HRow, HCell, btn, a, tblIdx = 0, colTables = [] var allTables = document.getElementsByTagName('table') for (var i=0; Table = allTables[i]; i++){ if (!hasClass(Table, 'collapsible')) continue if (!(HRow=Table.rows[0])) continue if (!(HCell=HRow.getElementsByTagName('th')[0])) continue Table.id = 'collapsibleTable' + tblIdx btn = document.createElement('span') btn.style.cssText = 'float:right; font-weight:normal; font-size:smaller' a = document.createElement('a') a.id = 'collapseButton' + tblIdx a.href = 'javascript:collapseTable(' + tblIdx + ');' a.style.color = HCell.style.color a.appendChild(document.createTextNode(NavigationBarHide)) btn.appendChild(a) HCell.insertBefore(btn, HCell.childNodes[0]) colTables[tblIdx++] = Table } for (var i=0; i < tblIdx; i++) if ((tblIdx > NavigationBarShowDefault && hasClass(colTables[i], 'autocollapse')) || hasClass(colTables[i], 'collapsed')) collapseTable(i) } function collapseTable (idx){ var Table = document.getElementById('collapsibleTable' + idx) var btn = document.getElementById('collapseButton' + idx) if (!Table || !btn) return false var Rows = Table.rows var isShown = (btn.firstChild.data == NavigationBarHide) btn.firstChild.data = isShown ? NavigationBarShow : NavigationBarHide var disp = isShown ? 'none' : Rows[0].style.display for (var i=1; i < Rows.length; i++) Rows[i].style.display = disp } function collapsibleDivs(){ var navIdx = 0, colNavs = [], i, NavFrame var divs = document.getElementById('content').getElementsByTagName('div') for (i=0; NavFrame = divs[i]; i++) { if (!hasClass(NavFrame, 'NavFrame')) continue NavFrame.id = 'NavFrame' + navIdx var a = document.createElement('a') a.className = 'NavToggle' a.id = 'NavToggle' + navIdx a.href = 'javascript:collapseDiv(' + navIdx + ');' a.appendChild(document.createTextNode(NavigationBarHide)) for (var j=0; j < NavFrame.childNodes.length; j++) if (hasClass(NavFrame.childNodes[j], 'NavHead')) NavFrame.childNodes[j].appendChild(a) colNavs[navIdx++] = NavFrame } for (i=0; i < navIdx; i++) if ((navIdx > NavigationBarShowDefault && !hasClass(colNavs[i], 'expanded')) || hasClass(colNavs[i], 'collapsed')) collapseDiv(i) } function collapseDiv(idx) { var div = document.getElementById('NavFrame' + idx) var btn = document.getElementById('NavToggle' + idx) if (!div || !btn) return false var isShown = (btn.firstChild.data == NavigationBarHide) btn.firstChild.data = isShown ? NavigationBarShow : NavigationBarHide var disp = isShown ? 'none' : 'block' for (var child = div.firstChild; child != null; child = child.nextSibling) if (hasClass(child, 'NavPic') || hasClass(child, 'NavContent')) child.style.display = disp }
→ 15:33, 7 oktyabr 2011 (UTC)
Əlavə olundu. --►07:01, 8 oktyabr 2011 (UTC)
LinkFA
Həmin hissəni bu cür yazıb yoxlayın:
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 başqa dildəki seçilmiş məqalədir."; } else if ( document.getElementById( InterwikiLinks[i].className + "-ga" ) ) { InterwikiLinks[i].className += " GA" InterwikiLinks[i].title = "Bu başqa dildəki yaxşı məqalədir."; } else if ( document.getElementById( InterwikiLinks[i].className + "-fl" ) ) { InterwikiLinks[i].className += " FL" InterwikiLinks[i].title = "Bu başqa dildəki seçilmiş siyahı və ya portaldır."; } } } } addOnloadHook( LinkFA );
→ 13:46, 8 iyun 2012 (UTC)
Give search results even when page doesn't exist

Hello, I propose to enable the tool created by Magnus Manske (creator of MediaWiki) to provide results from other languages and Commons (via Wikidata) when a page doesn't exist here: links are added to and . This helps to encourage translation and to make readers use your wiki more, because they can be sure to find something even if it's not local (rather than searching directly on the biggest wiki). The Italian and Polish Wikipedias, among others already enabled it by default.
Examples: [1] [2] [3]. More information: Magnus blog.
How to: just add the following line at the end of Common.js.
// Results from Wikidata // [[File:Wdsearch_script_screenshot.png]] if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Search' || ( mw.config.get( 'wgArticleId' ) === 0 && mw.config.get( 'wgCanonicalSpecialPageName' ) === false ) ) { importScriptURI("//en.wikipedia.org/w/index.php?title=MediaWiki:Wdsearch.js&action=raw&ctype=text/javascript"); }
--Nemo 11:02, 12 dekabr 2013 (UTC) (comments, translations and last instructions)
OK. --► 09:14, 12 dekabr 2013 (UTC)
- Nice! Sorry for the wrong pre above, you need to remove the lines you added to the common.js after the last }. -- () 06:26, 13 dekabr 2013 (UTC)
OK. Thanks for the information.
--► 08:33, 13 dekabr 2013 (UTC)
- Great, it works. :) -- () 10:41, 14 dekabr 2013 (UTC)
- Nice! Sorry for the wrong pre above, you need to remove the lines you added to the common.js after the last }. -- () 06:26, 13 dekabr 2013 (UTC)
Announced JavaScript change for badges implementation
Hi! I want to let you know that in near future badges will be deployed on Wikidata and the Wikipedias. They help us with displaying the good and featured article icons next to the sitelinks and will replace the javascript hack which is used at the moment together with the Link GA and Link FA templates. To avoid an overlap where the current system and the new feature conflict, I will add a minor fix to your Common.js which adds the class names to the interwiki links. This is part of my task as a global edit interface editor for the Wikidata team. Thanks, () 20:24, 18 avqust 2014 (UTC)
importMW is not defined
I'm getting this error due to the importMW
call introduced by on . Was that code copied from somewhere else? 00:16, 9 iyul 2015 (UTC)
Prepare for T314318
Please make changes like the following,
https://ca.wikipedia.org/wiki/Especial:ComparePages?page1=MediaWiki%3ACommon.js&rev1=24309161&page2=Usuari%3AArlolra%2Fsandbox%2FMediaWiki%3ACommon.js&rev2=31054319&action=&unhide=
https://ca.wikipedia.org/wiki/Especial:ComparePages?page1=MediaWiki%3ACommon.js&rev1=31055727&page2=Usuari%3AArlolra%2Fsandbox%2FMediaWiki%3ACommon.js&rev2=31058458&action=&unhide=
For more information, see mw:Parsoid/Parser_Unification/Media_structure/FAQ
Thanks, () 15:37, 31 yanvar 2023 (UTC)
- Done in () 23:01, 23 fevral 2023 (UTC)
wikipedia, oxu, kitab, kitabxana, axtar, tap, meqaleler, kitablar, oyrenmek, wiki, bilgi, tarix, tarixi, endir, indir, yukle, izlə, izle, mobil, telefon ucun, azeri, azəri, azerbaycanca, azərbaycanca, sayt, yüklə, pulsuz, pulsuz yüklə, haqqında, haqqinda, məlumat, melumat, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, şəkil, muisiqi, mahnı, kino, film, kitab, oyun, oyunlar, android, ios, apple, samsung, iphone, pc, xiomi, xiaomi, redmi, honor, oppo, nokia, sonya, mi, web, computer, komputer
Bu sehife haqqinda daha cox melumat elde edinBu MediaViki Common js sehifesinin muzakire sehifesidir Yeni serhlerinizi kohnelerin altindan yazin Yeni basliq acin Dord tilda vasitesile yaziniza imza ve tarix elave edin Vikipediyada yenisiniz Kend meydaninda suallarinizi yazin Sehifenin adinin deyisdirilmesi ucun buradan muraciet ede bilersiniz Nezaketli olun Yeni istifadecileri cekindirmeyin Xos niyyetli olun Aqressiyaya yol vermeyinBasliqsiz Son rey 12 il once 4 serh Muzakirede 2 neferCekli xahis edirem bunu sehifeye elave edesiniz var mpTitle Halaman Utama var isMainPage document title substr 0 mpTitle length mpTitle var isDiff document location search amp amp document location search indexOf diff 1 document location search indexOf oldid 1 document location search indexOf action history 1 if isMainPage amp amp isDiff amp amp wgCanonicalNamespace Special document write lt style type text css gt siteSub contentSub h1 firstHeading display none important content content div thumb p cactions li a p cactions li a hover p cactions li selected a background fff important lt style gt var mpSmallEnabled var mpMinWidth 700 function mainPageTransform var mpContentEl document getElementById bodyContent var mpBrowseEl document getElementById EnWpMpBrowse var mpContainEl document getElementById EnWpMpBrowseContainer var mpMarginEl document getElementById EnWpMpMargin var mpEl document getElementById EnWpMainPage if mpContentEl mpBrowseEl mpContainEl mpMarginEl mpEl return if mpSmallEnabled amp amp mpContentEl offsetWidth lt mpMinWidth mpContainEl insertBefore mpBrowseEl mpContainEl firstChild mpBrowseEl className EnWpMpBrowseBottom mpMarginEl style marginRight 0 mpSmallEnabled true else if mpSmallEnabled amp amp mpContentEl offsetWidth gt mpMinWidth mpEl insertBefore mpBrowseEl mpEl firstChild mpBrowseEl className EnWpMpBrowseRight mpMarginEl style marginRight 13 8em mpSmallEnabled false var onloadFuncts mainPageTransform if window addEventListener window addEventListener resize mainPageTransform false else if window attachEvent window attachEvent onresize mainPageTransform function mainpg if isMainPage Halaman Utama test document location amp amp document getElementById ca nstab main document getElementById ca nstab main firstChild innerHTML lt span gt Utama lt span gt addOnloadHook mainpg LowcaseTitle Judul dengan Template Judul huruf pertama kecil if document URL indexOf edit gt 0 document URL indexOf submit gt 0 var noJS else document write lt style type text css gt title override display none speak none lt style gt function pTitle if document getElementById title override var pTitle document getElementById pTitle innerHTML document getElementsByTagName h1 0 innerHTML pTitle hookEvent load pTitle Vago ms 06 43 5 oktyabr 2011 UTC Cavabla Y Elave olundu Safir yuzuklu Ceklimesaj06 49 5 oktyabr 2011 UTC Cavabla Cekli bunu da zehmet olmasa yerlesdirersiniz deyesen tapmisam var hasClass function var reCache return function element className return reCache className reCache className reCache className new RegExp s className s test element className function collapsibleTables var Table HRow HCell btn a tblIdx 0 colTables var allTables document getElementsByTagName table for var i 0 Table allTables i i if hasClass Table collapsible continue if HRow Table rows 0 continue if HCell HRow getElementsByTagName th 0 continue Table id collapsibleTable tblIdx btn document createElement span btn style cssText float right font weight normal font size smaller a document createElement a a id collapseButton tblIdx a href javascript collapseTable tblIdx a style color HCell style color a appendChild document createTextNode NavigationBarHide btn appendChild a HCell insertBefore btn HCell childNodes 0 colTables tblIdx Table for var i 0 i lt tblIdx i if tblIdx gt NavigationBarShowDefault amp amp hasClass colTables i autocollapse hasClass colTables i collapsed collapseTable i function collapseTable idx var Table document getElementById collapsibleTable idx var btn document getElementById collapseButton idx if Table btn return false var Rows Table rows var isShown btn firstChild data NavigationBarHide btn firstChild data isShown NavigationBarShow NavigationBarHide var disp isShown none Rows 0 style display for var i 1 i lt Rows length i Rows i style display disp function collapsibleDivs var navIdx 0 colNavs i NavFrame var divs document getElementById content getElementsByTagName div for i 0 NavFrame divs i i if hasClass NavFrame NavFrame continue NavFrame id NavFrame navIdx var a document createElement a a className NavToggle a id NavToggle navIdx a href javascript collapseDiv navIdx a appendChild document createTextNode NavigationBarHide for var j 0 j lt NavFrame childNodes length j if hasClass NavFrame childNodes j NavHead NavFrame childNodes j appendChild a colNavs navIdx NavFrame for i 0 i lt navIdx i if navIdx gt NavigationBarShowDefault amp amp hasClass colNavs i expanded hasClass colNavs i collapsed collapseDiv i function collapseDiv idx var div document getElementById NavFrame idx var btn document getElementById NavToggle idx if div btn return false var isShown btn firstChild data NavigationBarHide btn firstChild data isShown NavigationBarShow NavigationBarHide var disp isShown none block for var child div firstChild child null child child nextSibling if hasClass child NavPic hasClass child NavContent child style display disp Vago ms 15 33 7 oktyabr 2011 UTC CavablaY Elave olundu Safir yuzuklu Ceklimesaj07 01 8 oktyabr 2011 UTC CavablaLinkFA Son rey 12 il once 1 serh Muzakirede 1 neferHemin hisseni bu cur yazib yoxlayin function LinkFA if document getElementById p lang var InterwikiLinks document getElementById p lang getElementsByTagName li for var i 0 i lt InterwikiLinks length i if document getElementById InterwikiLinks i className fa InterwikiLinks i className FA InterwikiLinks i title Bu basqa dildeki secilmis meqaledir else if document getElementById InterwikiLinks i className ga InterwikiLinks i className GA InterwikiLinks i title Bu basqa dildeki yaxsi meqaledir else if document getElementById InterwikiLinks i className fl InterwikiLinks i className FL InterwikiLinks i title Bu basqa dildeki secilmis siyahi ve ya portaldir addOnloadHook LinkFA Vago ms 13 46 8 iyun 2012 UTC CavablaGive search results even when page doesn t exist Son rey 10 il once 5 serh Muzakirede 2 neferScreenshot of the Earth test search with this script adding links to Wikidata Reasonator Commons and Wikipedia Hello I propose to enable the tool created by Magnus Manske creator of MediaWiki to provide results from other languages and Commons via Wikidata when a page doesn t exist here links are added to Special Search and noarticletext This helps to encourage translation and to make readers use your wiki more because they can be sure to find something even if it s not local rather than searching directly on the biggest wiki The Italian and Polish Wikipedias among others already enabled it by default Examples 1 2 3 More information Magnus blog How to just add the following line at the end of Common js Results from Wikidata File Wdsearch script screenshot png if mw config get wgCanonicalSpecialPageName Search mw config get wgArticleId 0 amp amp mw config get wgCanonicalSpecialPageName false importScriptURI en wikipedia org w index php title MediaWiki Wdsearch js amp action raw amp ctype text javascript Nemo 11 02 12 dekabr 2013 UTC comments translations and last instructions Cavabla Y OK Cekli829 09 14 12 dekabr 2013 UTC CavablaNice Sorry for the wrong pre above you need to remove the lines you added to the common js after the last Nemo bis talk 06 26 13 dekabr 2013 UTC CavablaY OK Thanks for the information Cekli829 08 33 13 dekabr 2013 UTC CavablaGreat it works Nemo bis talk 10 41 14 dekabr 2013 UTC Cavabla dd dd dd Announced JavaScript change for badges implementation Son rey 9 il once 1 serh Muzakirede 1 neferHi I want to let you know that in near future badges will be deployed on Wikidata and the Wikipedias They help us with displaying the good and featured article icons next to the sitelinks and will replace the javascript hack which is used at the moment together with the Link GA and Link FA templates To avoid an overlap where the current system and the new feature conflict I will add a minor fix to your Common js which adds the class names to the interwiki links This is part of my task as a global edit interface editor for the Wikidata team Thanks Bene talk 20 24 18 avqust 2014 UTC CavablaimportMW is not defined Son rey 8 il once 1 serh Muzakirede 1 neferI m getting this error due to the importMW call introduced by Wertuose on 16 August 2014 Was that code copied from somewhere else Helder 00 16 9 iyul 2015 UTC CavablaPrepare for T314318 Son rey 1 il once 2 serh Muzakirede 2 neferPlease make changes like the following https ca wikipedia org wiki Especial ComparePages page1 MediaWiki 3ACommon js amp rev1 24309161 amp page2 Usuari 3AArlolra 2Fsandbox 2FMediaWiki 3ACommon js amp rev2 31054319 amp action amp unhide https ca wikipedia org wiki Especial ComparePages page1 MediaWiki 3ACommon js amp rev1 31055727 amp page2 Usuari 3AArlolra 2Fsandbox 2FMediaWiki 3ACommon js amp rev2 31058458 amp action amp unhide For more information see mw Parsoid Parser Unification Media structure FAQ Thanks Arlolra 15 37 31 yanvar 2023 UTC Cavabla Done in Special Diff 6899438 ABreault WMF 23 01 23 fevral 2023 UTC Cavabla Common js sehifesine qayit