User:OsvátA/monobook.js

From Uncyclopedia, the content-free encyclopedia
Jump to navigation Jump to search

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

  • Internet Explorer: hold down the Ctrl key and click the Refresh or Reload button, or press Ctrl+F5.
  • Firefox: hold down the Shift key while clicking Reload; alternatively press Ctrl+F5 or Ctrl-Shift-R.
  • Opera, Konqueror and Safari users can just click the Reload button.
  • Chrome: press Ctrl+F5 or Shift+F5
// edit section 0 (text until the first section title)
function addEditSection0(){
if(!document.getElementById) return;
var edit = document.getElementById('ca-edit');
if(!edit) return;
var link = ((edit.children) ? edit.children : edit.childNodes)[0].href + '&section=0';
var edit0 = addPortletLink('p-cactions', link, '0', 'ca-edit-0', 
'Bevezető szerkesztése', '0', edit.nextSibling);
if(/selected/.test(edit.className) && /section=0$/.test(window.location.href)) 
edit0.className = 'selected';
if(/istalk/.test(edit.className)) 
edit0.className += (edit0.className.length ? ' istalk' : 'istalk');
}
addOnloadHook(addEditSection0);