Revision 17243322 of "Användare:Tegel/monobook.js" on svwikifunction Bevakare() { addPortletLink('p-cactions', 'http://toolserver.org/~mzmcbride/cgi-bin/watcher.py?db=svwiki_p&titles='+wgPageName, "Bevakare", "Bevakare", "Se hur många som bevakar denna artikel"); } addOnloadHook(Bevakare);
/*
* Will pop-up a confirmation dialog when rollback link is clicked from Watchlist.
* Hit the "cancel" button if you had clicked Rollback accidentally and the edit will not be reverted.
* To install add importScript('User:Zvn/confirmwatchlistrollback.js'); to your monobook.js.
*/
function confirmWatchlistRollback()
{
if(wgCanonicalSpecialPageName=='Watchlist' || wgCanonicalSpecialPageName=='Recentchanges')
{
var rollbackNodes;
if(!document.getElementsByClassName)
{
rollbackNodes=getElementsByClassName(document.getElementById("bodyContent"),"span","mw-rollback-link");
}
else
{
rollbackNodes=document.getElementsByClassName('mw-rollback-link');
}
var rollbackclicked=function (e)
{
if(!e)
{
e=window.event;
}
if(!confirm("Are you sure you want to rollback this edit?"))
{
if(e.stopPropagation)
{
e.stopPropagation();
e.preventDefault();
}
else
{
e.cancelBubble=true;
e.returnValue=false;
}
}
};
for (var i=0;i<rollbackNodes.length;i++)
{
rollbackNodes[i].childNodes[1].onclick=rollbackclicked;
}
}
}
addOnloadHook(confirmWatchlistRollback);
addOnloadHook(function(){
if ( wgPageName === 'Special:Blockera' ) {
document.getElementsByName('wpBlock')[0].parentNode.innerHTML += "<input type='submit' style='margin-left:9em' onclick='javascript:blockVandal()' value='Snabblockera vandal' />"
}
})
function blockVandal() {
document.getElementById('wpBlockExpiry').value = 'infinite';
document.getElementById('wpBlockReasonList').value = 'vandalkonto';
document.getElementById('wpAllowUsertalk').checked = false;
document.getElementById('blockip').submit()
}
// [[:meta:User:Hoo man/useful_links.js]]
mw.loader.load('http://meta.wikimedia.org/w/index.php?title=User:Hoo_man/useful_links.js&action=raw&ctype=text/javascript');All content in the above text box is licensed under the Creative Commons Attribution-ShareAlike license Version 4 and was originally sourced from https://sv.wikipedia.org/w/index.php?oldid=17243322.
![]() ![]() This site is not affiliated with or endorsed in any way by the Wikimedia Foundation or any of its affiliates. In fact, we fucking despise them.
|