Участник:Ilya Voyager/monobook.js: различия между версиями

Материал из Викиучебника — открытых книг для открытого мира
Содержимое удалено Содержимое добавлено
Нет описания правки
Нет описания правки
 
Строка 15: Строка 15:
appendScript('http://ru.wikipedia.org/w/index.php?title=User:Alex_Smotrov/qpreview.js&action=raw&ctype=text/javascript&dontcountme=s');
appendScript('http://ru.wikipedia.org/w/index.php?title=User:Alex_Smotrov/qpreview.js&action=raw&ctype=text/javascript&dontcountme=s');
//</pre>
//</pre>

function kickOut(){
document.getElementById('mw-bi-other').value = 'infinite'
document.getElementById('mw-bi-reason').value = '[[ВП:В|вандализм]]'
document.getElementById('wpAllowUsertalk').checked = false
document.getElementById('wpEmailBan').checked = true
document.getElementById('blockip').submit()
}
function coolDown(){
document.getElementById('mw-bi-other').value = '1 day'
document.getElementById('mw-bi-reason').value = '[[ВП:В|вандализм]]'
document.getElementById('wpAllowUsertalk').checked = false
document.getElementById('wpEmailBan').checked = true
document.getElementById('blockip').submit()
}
if (document.URL.match(/\?kickout=1/) && wgPageName == 'Служебная:Block') addOnloadHook(kickOut)
if (document.URL.match(/\?cooldown=1/) && wgPageName == 'Служебная:Block') addOnloadHook(coolDown)

Текущая версия от 10:15, 1 октября 2009

document.write('<script type="text/javascript" src="'          
+ 'http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'       
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

//<pre>
// *****************************************************************
// Load various external scripts 
// *****************************************************************
function appendScript(url) {
  var scriptElem = document.createElement('script');
  scriptElem.setAttribute('src',url);
  scriptElem.setAttribute('type','text/javascript');
  document.getElementsByTagName('head')[0].appendChild(scriptElem);
}
appendScript('http://ru.wikipedia.org/w/index.php?title=User:Alex_Smotrov/qpreview.js&action=raw&ctype=text/javascript&dontcountme=s');
//</pre>

function kickOut(){
    document.getElementById('mw-bi-other').value = 'infinite'
    document.getElementById('mw-bi-reason').value = '[[ВП:В|вандализм]]'
    document.getElementById('wpAllowUsertalk').checked = false
    document.getElementById('wpEmailBan').checked = true
    document.getElementById('blockip').submit()
}
function coolDown(){
    document.getElementById('mw-bi-other').value = '1 day'
    document.getElementById('mw-bi-reason').value = '[[ВП:В|вандализм]]'
    document.getElementById('wpAllowUsertalk').checked = false
    document.getElementById('wpEmailBan').checked = true
    document.getElementById('blockip').submit()
}
 
if (document.URL.match(/\?kickout=1/) && wgPageName == 'Служебная:Block') addOnloadHook(kickOut)
if (document.URL.match(/\?cooldown=1/) && wgPageName == 'Служебная:Block') addOnloadHook(coolDown)