User

User:CirTap/monobook.js

From Joomla! Documentation

Note: After publishing, 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)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
// on editable pages only 
if (window.wgIsArticle) { addOnloadHook( function () {
var pageUrl = window.wgServer+window.wgScript+'?title='+window.wgPageName;
// add tab BEFORE "Edit" tab
var myActs = document.getElementById('p-cactions').getElementsByTagName('UL')[0];
var myEdit = document.getElementById('ca-edit');
var myEditLead = myEdit.cloneNode(true);
var myEditA = myEditLead.getElementsByTagName('A')[0];
/* add "Edit Lead Section" tab */
myEditLead.id = 'ca-editlead';
myEditA.href += '&section=0';
myEditA.innerHTML = '0';
myEditA.title = 'Edit lead section';
myEditA.accesskey = null;
myActs.insertBefore(myEditLead, myEdit)

/* addPortletLink(portlet-id, href, text, id, tooltip, accesskey, nextnode) */
// purge tab
addPortletLink('p-cactions', pageUrl+'&action=purge', 'Purge', 'ca-purge', 'Purge page cache', null, 'SMACK');

});} // if

// e.o.f. User:CirTap/monobook.js