User:Freunde/monobook.js

document.write(' '); document.write('#siteNotice { display: none; } '); document.write(' ');

// Lupin's popups mw.loader.load(            'https://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'             + '&action=raw&ctype=text/javascript&dontcountme=s'); // importScript('User:AzaToth/twinkle.js'); TwinkleConfig = { revertMaxRevisions             :       50, userTalkPageMode               :       'window', showSharedIPNotice             :       true, openTalkPage                   :       [ 'agf', 'norm', 'vand' ], openTalkPageOnAutoRevert       :       false, openAOLAnonTalkPage            :       false, summaryAd                      :       " using TW", deletionSummaryAd              :       " using TW", protectionSummaryAd            :       " using TW", watchSpeedyPages               :       [ 'g3', 'g5', 'g10', 'g11', 'g12' ], watchProdPages                 :       true, openUserTalkPageOnSpeedyDelete :       [ 'g1', 'g2', 'g10', 'g11', 'g12', 'a1', 'a7', 'i3', 'i4', 'i5', 'i6', 'i7', 'u3', 't1' ], watchRevertedPages             :       [ 'agf', 'norm', 'vand', 'torev' ], markRevertedPagesAsMinor       :       [ 'agf', 'norm', 'vand', 'torev' ], deleteTalkPageOnDelete         :       false, markWarningsAsMinor            :       true, markAIVReportAsMinor           :       true, markSpeedyPagesAsMinor         :       true, markProdPagesAsMinor           :       true, confirmUsernameToAIV           :       true, offerReasonOnNormalRevert      :       false };

//note: this script MUST be added to the end of your monobook at all times. //so when you add a new script to the end of your monobook, re-order them so this one is on the bottom. addOnloadHook(function {       if(!document.getElementById('wpSummary') || document.getElementById('wpSummary').value != '' || !document.getElementById('wpTextbox1')) return;        var my_value;        if(wgCanonicalNamespace == 'User_talk') {                if(wgPageName.indexOf('/') == -1 && wgTitle.split('/')[0] != wgUserName)                         my_value = 'Respond to '+wgTitle;                else if(wgPageName.indexOf('archive') != -1 && wgTitle.split('/')[0] != wgUserName)                         my_value = 'Reviving archive';                else if(wgPageName.indexOf('archive') != -1 && wgTitle.split('/')[0] == wgUserName)                        my_value = 'Archiving...';                else if(wgPageName.indexOf('/') == -1 && wgTitle.split('/')[0] == wgUserName)                         my_value = 'Reply';                else                        my_value = 'minor edit'; } else if(wgCanonicalNamespace == 'User') { if(wgTitle.split('/')[0] == wgUserName) my_value = 'fixing'; else my_value = 'fixing a minor mistake'; //note: leave as "Project". thats how mediawiki outputs it       } else if(wgCanonicalNamespace == 'Project'||wgCanonicalNamespace == 'Project_talk') { if((/\w+ for deletion/i).test(wgTitle)) my_value = 'Add my opinion'; else if((/requests for adminship/i).test(wgTitle)) my_value = 'Support'; else if((/administrator.s noticeboard/i).test(wgTitle)) my_value = 'Reply'; else if((/administrator intervention against vandalism/i).test(wgTitle)) my_value = 'Reporting user'; else my_value = 'Reply'; } else { my_value = 'minor edit'; }       document.getElementById('wpSummary').value = my_value; document.getElementById('wpSummary').onfocus = function { if(this.value != my_value) return; this.selectionStart = 0; this.selectionEnd = this.value.length; } }); //