User:Ryan Schmidt/monobook.js

// //Start semi-automated deletion function checkdelete { if(queryString("submitdelete")=="true") document.getElementById('deleteconfirm').wpConfirmB.click } addOnloadHook(checkdelete);

function queryString(p) { var re = RegExp('[&?]' + p + '=([^&]*)'); var matches; if (matches = re.exec(document.location)) { try { return decodeURI(matches[1]); } catch (e) { }   }    return null; } // End semi-automated deletion

// ================================================== // Guide-wide search using Google // from pl.wikibooks, maintainer b:pl:User:Piotr // ================================================== function insertGoogleSearch { if ( wgNamespaceNumber != 0 ) { return; }  var google = "http://www.google.com/custom?sa=Google+Search&domains=strategywiki.org/wiki/PAGE&sitesearch=strategywiki.org/wiki/PAGE"; var tb = document.getElementById('nav_right').getElementsByTagName('ul')[0]; var link = document.createElement('a'); var guide = wgPageName.replace(/\/.*/g, ""); link.href = google.replace(/PAGE/g, guide); link.appendChild(document.createTextNode("Search this guide")); var li = document.createElement('li'); li.id = "google-trick-search"; li.appendChild(link); tb.insertBefore(li, tb.firstChild); } addOnloadHook(insertGoogleSearch);

//End Guide-wide search //