User:Rgoodermote/monobook.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, watchWarnings                  :       true, markAIVReportAsMinor           :       true, markSpeedyPagesAsMinor         :       true, markProdPagesAsMinor           :       true, confirmUsernameToAIV           :       true, toolboxButtons                 :       [ ] };importScript('User:AzaToth/twinkle.js'); importScript("User:Lupin/recent2.js"); document.write(' '); importScript('User:TheDJ/Gadget-HotCat.js'); importScript('User:Mr.Z-man/refbuttons.js'); function addSumLink { var ntitle2 = document.getElementById("mw-diff-ntitle2") if (!ntitle2) return; var rbnode = getElementsByClassName(document.getElementById("mw-diff-ntitle2"), "span", "mw-rollback-link"); if (rbnode.length != 0) addRollbackSummaryLink(rbnode[0]); }

function confirmRollback { var url = this.href; var user = url.match(/[?&]from=([^&]*)/); if (!user) return; var user = decodeURIComponent(user[1].replace("+", " ")); var summary = prompt("Enter a summary to use for rollback.\n\nLeave blank to use the default. $user will be replaced with \"" + user + "\".", "") if (summary == undefined) return false; else if (summary == "") return true; this.href += "&summary=" + encodeURIComponent(summary.replace(/\$user/g, user)); return true; };

function addRollbackSummaryLink(rbnode) { var rblink = rbnode.getElementsByTagName("a")[0] var alink = rblink.cloneNode(true); alink.className = ""; //don't confuse other scripts alink.firstChild.nodeValue = "sum"; alink.onclick = confirmRollback; rbnode.insertBefore(alink, rblink.nextSibling); rbnode.insertBefore(document.createTextNode("|"), alink); } addOnloadHook(addSumLink); importScript('User:Ioeth/friendly.js'); importScript('User:AWeenieMan/furme.js'); document.write(''); importScript('User:Cameltrader/Advisor.js'); // if ((typeof auto_mod_loaded == 'undefined')   || !auto_mod_loaded) { auto_mod_loaded = true; auto_mod_exectd = false; function am_get_query_vars{ var res = new Array; var pairs = location.search.substring(1).split("&"); for(var i=0; i < pairs.length; i++){ var pair = pairs[i].split("="); res[unescape(pair[0])] = unescape(pair[1]).replace(/\+/g, ' '); }     return  res; } function am_add_li(portlet, url, text, id, title) { var tabs = document.getElementById('p-'+portlet).getElementsByTagName('ul')[0] var na = document.createElement('a'); na.href = url; na.id = id; na.appendChild(document.createTextNode(text)); if (title) na.title = title; var li = document.createElement('li'); if (id) li.id = id; li.appendChild(na); tabs.appendChild(li); return li; } function am_get_title { //Avoids problems with &amp; etc, but will also include ' - edit this page', etc return document.title.substr(0, document.title.lastIndexOf(' - Wikipedia, the free')); } function am_tidy_title { var editlk = document.getElementById('ca-edit').getElementsByTagName('a')[0].href; editlk = editlk.substring(editlk.indexOf('title=') + 6, editlk.lastIndexOf('&action=edit')); return unescape(editlk); } function am_guess_date { var monthnames = new Array( "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); var today = new Date; return today.getUTCFullYear + ' ' + monthnames[today.getUTCMonth] + ' ' + today.getUTCDate; } function am_make_url(title, before, after, summary) { return 'http://en.wikipedia.org/w/index.php?title='+escape(title)+ '&action=edit'+ '&amaddbefore='+escape(before)+'&amaddafter='+escape(after)+ '&amsummary='+escape(summary); } function auto_mod { if (auto_mod_exectd) return false; auto_mod_exectd = true; qvars = am_get_query_vars; if (qvars['action']=='edit') { if (qvars['amnull']) { document.getElementById('editform').submit; return true; }     if (qvars['amaddafter'] || qvars['amaddbefore'] || qvars['amreplace']) { var summ_el = document.getElementById('wpSummary'); if (summ_el.value != '' && summ_el.value.substr(summ_el.value.length - 3, 3) != '*/ ') { // have already added summary return true; }       var text = document.getElementById('wpTextbox1'); if (qvars['amclear']) text.value = ''; if (qvars['amfind'] && qvars['amreplace'] && qvars["amlocal"]) text.value = text.value.replace(new RegExp(qvars['amfind']), function($0, $1){ return qvars['amreplace'].replace("$0",$0); }) else if (qvars['amfind'] && qvars['amreplace']) text.value = text.value.replace(new RegExp(qvars['amfind'], "g"), function($0, $1){ return qvars['amreplace'].replace("$0",$0); }); if (qvars['amaddafter']) { if (text.value.charAt(text.value.length-1) != '\n') text.value += '\n'; text.value += qvars['amaddafter']; }       if (qvars['amaddbefore']) { if (text.value.charAt(0) != '\n') text.value = '\n' + text.value; text.value = qvars['amaddbefore'] + text.value; }       summ_el.value += (qvars['amsummary'] || ' '); if (qvars['amminor']) { document.getElementById("wpMinoredit").checked = true; } else { document.getElementById("wpMinoredit").checked = false; }

if (qvars['amautosave']) { document.getElementById('editform').submit; }     }      return true; }   return false; } function am_add_onload(f) { // borrowed from WP:US if (window.addEventListener) window.addEventListener("load",f,false); else if (window.attachEvent) window.attachEvent("onload",f); } } // end if auto_mod_loaded //