User:Peter Karlsen/vector.js

importScript('User:Peter Karlsen/recent2.js'); importScript('User:Gracenotes/rollback.js'); importScript('User:AzaToth/twinkle.js'); importScript('User:Mr.Z-man/closeAFD.js'); if( typeof( TwinkleConfig ) == 'undefined' ) TwinkleConfig = {}; TwinkleConfig.openTalkPageOnAutoRevert                 =       true; TwinkleConfig.watchRevertedPages                       =       []; TwinkleConfig.watchSpeedyPages                         =       []; TwinkleConfig.watchWarnings                            =       false; TwinkleConfig.showRollbackLinks                        =       []; function warnVandal { if( document.URL.indexOf("&action=roll") > 0) {   vandalsTalkPageInitialIndex = document.URL.indexOf("from") + 5; vandalsTalkPageCharacterCount = document.URL.indexOf("&token") - document.URL.indexOf("from") - 5; vandalsName = document.URL.substr(vandalsTalkPageInitialIndex, vandalsTalkPageCharacterCount); while(vandalsName.indexOf('+') >= 0) {     vandalsName = vandalsName.replace('+', '_'); }   vandalsTalkPage = "User_talk:" + vandalsName; nameOfVandalizedPage = wgPageName; while(nameOfVandalizedPage.indexOf('_') >= 0) {     nameOfVandalizedPage = nameOfVandalizedPage.replace('_', ' ') }   setTimeout("window.open(\"" + mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/index.php?title=' + vandalsTalkPage + "&action=edit&preview=yes&vanarticle=" + nameOfVandalizedPage + "&type=vand&count=1" + "\", \'twinklewarnwindow\', \'location=no,toolbar=no,status=no,directories=no,scrollbars=yes,width=1200,height=800\')", 3000 ); } } $(warnVandal);