User:Blaxthos/monobook.js

/* Tabs @ bottom */

addOnloadHook(function {    var tabs = document.getElementById('p-cactions').cloneNode(true);    tabs.id = 'mytabs';    var listitems = tabs.getElementsByTagName('LI');    for (i=0;i<listitems.length;i++) {        if(listitems[i].id) listitems[i].id = 'mytabs-' + listitems[i].id;    }    content = document.getElementById("content");    // Find the content div    content.parentNode.insertBefore(tabs, content.nextSibling);    // Place tab list right after content div });

/**** afd helper ****/ importScript('User:Jnothman/afd_helper/script.js'); /* This is to keep track of who is using this extension: User:Jnothman/afd_helper/script.js */ afdh_summaryprompt = false;

/**** QuickPreview ****/ importScript('User:TheFearow/qstring.js'); addOnloadHook(doAddQuickPreview); function doAddQuickPreview { if ((mw.config.get('wgAction') != "edit") && (mw.config.get('wgAction') != "submit")) return; var qbutton = document.getElementById("wpPreview").cloneNode(false); qbutton.value = "Quick preview"; qbutton.type="button"; qbutton.tabindex="6"; qbutton.accessKey="g"; qbutton.id="dlQuickPreview"; qbutton.title="Preview your changes"; qbutton.addEventListener("click", doQuickPreview, false); document.getElementById("wpPreview").parentNode.insertBefore(qbutton,document.getElementById("wpDiff")); } function doQuickPreview { var bt = document.getElementById("dlQuickPreview"); document.getElementById("contentSub").innerHTML = "Getting preview"; bt.value="Getting preview"; bt.disabled=true; var form = document.editform; var postData = { 'wpMinoredit': form.wpMinoredit.checked, 'wpWatchthis': form.wpWatchthis.checked, 'wpStarttime': form.wpStarttime.value, 'wpEdittime': form.wpEdittime.value, 'wpAutoSummary': form.wpAutoSummary.value, 'wpEditToken': form.wpEditToken.value, 'wpSummary': "Quick preview", 'wpTextbox1': document.editform.wpTextbox1.value }; var addr = document.URL; addr = addr.replace("&action=edit", "&action=submit"); addr += "&wpPreview=true&live=true"; var qwxmlhttp = sajax_init_object(null); qwxmlhttp.overrideMimeType('text/xml'); qwxmlhttp.open( 'POST', addr, true); qwxmlhttp.setRequestHeader('Content-type','application/x-www-form-urlencoded'); qwxmlhttp.onload = function { document.getElementById("wikiPreview").innerHTML =  unescape(qwxmlhttp.responseText.replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&").replace(/&quot;/g,'"'));  bt.disabled=false;  bt.value = "Quick preview";  document.getElementById("contentSub").innerHTML = "";  }  qwxmlhttp.send(QueryString.create(postData)); }

/*** End QuickPreview ***/

/*** LinkFixr ***/ importScript('MediaWiki:LinkFixr.js');

/*** Reword ***/ importScript('User:M/reword.js'); /* Appears to not work/do anything (collides with FF plugin(s)?) */

importScript('User:Blaxthos/hidehugglecontribs.js');