MediaWiki:AbuseFilter.js
Билгалдаккхар: Ӏалашйинчул тӀаьхьа хийцамаш га браузеран кэш цӀанйан йезаш хила мега.
- Firefox / Safari: Shift тӀетаӀийна йитина, гӀирсийн панелан тӀера тӀетаӀайе Карлайаккха йа Ctrl+F5 йа Ctrl+R (⌘+R Mac тӀехь)
- Google Chrome: тӀетаӀайе Ctrl+Shift+R (⌘+Shift+R Mac тӀехь)
- Internet Explorer / Edge: тӀетаӀийна йитина Ctrl, тӀетаӀайе Карлайаккха йа тӀетаӀайе Ctrl+F5
- Opera: тӀетаӀайе Ctrl+F5.
afTBoxMaxHeight = 350 //px
mw.util.addCSS('tr.mw-abusefilter-list-disabled td.TablePager_col_af_public_comments * {opacity:0.5}')
function resizeTextBoxes(){
fix('wpFilterRules')
fix('wpFilterNotes')
fix('wpTestFilter')
return
function fix(id){
var t = document.getElementById(id)
if (!t) return
addHandler(t, 'keyup', onKeyUp)
resize(t)
}
function onKeyUp(e){
e = e || window.event
var t = e.target || e.srcElement
resize(t)
}
function resize(t){
var adjHeight = t.clientHeight
if (adjHeight > afTBoxMaxHeight) return
adjHeight = Math.max(t.scrollHeight, adjHeight)
adjHeight = Math.min(afTBoxMaxHeight, adjHeight)
if (adjHeight > t.clientHeight) t.style.height = adjHeight+'px'
}
}
function improveSelectBox(){
var sel = document.getElementById('wpFilterBuilder'), opt, key
if (!sel) return
for (var i=1; i<sel.length; i++){
opt = sel.options[i]
key = opt.value.match(/^[a-z_]+/)
if (!key) continue
key = key[0]
if (opt.text.indexOf(key)==-1)
opt.text = opt.text + ' ('+key+')'
//opt.text = key + ': '+ opt.text
if (opt.title == '') opt.title = opt.value
}
}
$(resizeTextBoxes)
$(improveSelectBox)
if (/\/examine\//.test(document.URL)) importScript('MediaWiki:AbuseLog')