Медиавики:Log.js
Эзоҳ: Баъди захира намудан, Шумо метавонед тағйиротҳои худро аз хотираи браузер гузариш карда, бубинед. Дар браузерҳои Mozilla / Firefox / Safari: тугмаи Shift-ро пахш намуда бо мушак Reload-ро пахш кунед, ё Ctrl-Shift-R-ро пахш намоед (Cmd-Shift-R барои компютерҳои Apple Mac); дар браузери IE: тугмаи Ctrl-ро пахш намуда бо мушак Refresh-ро пахш намоед, ё Ctrl-F5-ро пахш намоед; дар браузери Konqueror:: бо мушак Reload-ро пахш кунед, ё тугмаи F5-ро пахш намоед; дар браузери Opera ба Шумо пурра тоза кардани хотираи браузер ба воситаи Tools→Preferences лозим аст.
//global script for [[Special:Log]]; called from [[MediaWiki:Common.js]]
$(function(){
mw.loader.using( 'mediawiki.util' ).done( function () {
//remove "AbuseFilter label" input: useless in logs
$('label[for="tagfilter"]').closest('p').remove()
//<select>: sort "page-related, then user-related"
var sel = $('select[name="type"]')
$.each(
['upload','move','protect','review','stable','delete','newusers','rights','renameuser','block'],
function(i, type){
sel.children('[value="' + type + '"]').appendTo(sel)
}
)
//<select>: mark useless logs with gray color and move to the bottom
mw.util.addCSS('.log-unused {color:gray}')
sel.children().each(function(i, op){
if( /gbl|global|abuse|import|merge|patrol/.test( op.value ) )
$(op).addClass('log-unused').appendTo(sel)
})
//on userright log: option to run alternative "API Log" script
if( /&type=rights|\/rights/.test(document.URL) ){
$('<span style="float:right; margin-left:1em; color:#0645AD; cursor:pointer">'
+ '[намуди алтернативӣ]</span>')
.prependTo( mw.util.$content.find('p:first') )
.click(function(e){
if( window.rightsLog ) rightsLog()
else importMW('Tool/RightsLog')
})
}
} );
})