User:ASnieckus/monobook.js

From WikiEducator
Jump to: navigation, search

Note: After saving, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Clear the cache in Tools → Preferences
$(function () {
  $('#n-recentchanges').after('<li><a href="/Special:NewPages?namespace=all" title="The list of newly created pages">New pages</a></li>');
  // change the font and size used for edit box
  $('#wpTextbox1').css('font-family', 'Courier New').css('font-size', '14px');
  // gardening tool
  if ($.inArray(wgPageName, ['Special:NewPages', 'Special:RecentChanges']) > -1) {
    $.getScript('/extensions/WE/spam.js');
  }
 if (wgAction == 'history') {
   $.getScript('/extensions/WE/deleterevs.js');
 }
}); 
 
//[[User:Henrik/sandbox/google-search]] (please include this line)
function install_search()
{
document.getElementById('searchBody').innerHTML+='<div>'+
'<FORM method=get action="http://www.google.com/search">'+
'<input type=hidden name="ie" value="UTF-8" /><input type=hidden name="oe" value="UTF-8" />'+
'<INPUT id="searchInput" name="q" type="text" accesskey="f" value="" />'+
'<input type="hidden" name="domains" value="wikieducator.org" />'+
'<input type=radio name=sitesearch value="">Web'+
'<input type=radio name=sitesearch value="wikieducator.org" checked />WE'+
'<INPUT type="submit" name="btnG" VALUE="Google Search"  /></FORM></div>';
}
addOnloadHook(install_search);