Дольник:Edward Chernenko/monobook.js
< Дольник:Edward Chernenko
Айдать на коробушку
Айдать на сыскальник
Revision as of 21:33, 1 Сечня 2007 by *>Edward Chernenko (addLoadEvent - нужно для ф-ции быстрого отката)
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 / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
/* <pre> */ function addLoadEvent(func) { if (window.addEventListener) window.addEventListener("load", func, false); else if (window.attachEvent) window.attachEvent("onload", func); } /* Помещаем глобальное сообщение MediaWiki:Sitenotice вниз */ function move_site_notice() { var lmod = document.getElementById('lastmod'); var notice = document.getElementById('siteNotice').innerHTML; document.getElementById('f-list').innerHTML = lmod ? ("<div style=\"float: right\">" + notice + "</div>" + lmod.innerHTML) : notice; } addLoadEvent(move_site_notice); /* Включаем режим быстрых откатов (работает только для меня ;)) */ function godRevert_on() { if(document.getElementById('pagehistory')) document.getElementById('contentSub').innerHTML += " <a href=\"http://upreka.net/cgi-bin/revert_mw.cgi?page=" + wgPageName + "\">Откат</a>"; if(window.location.href.match('reverted_ok=1')) document.getElementById('contentSub').innerHTML += "<div class=\"usermessage\">Откат произведён успешно</div>"; } addLoadEvent(godRevert_on); /* </pre> */