User:Becasita/monobook.js
< User:Becasita
Revision as of 12:55, 26 September 2017 by Becasita (talk | contribs) (Creating: Remove duplicated purge button; Add link to Special:WikiActivity; Add browse button.)
Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: hold down Ctrl and click the Refresh or Reload button. Firefox: hold down ⇧ Shift while clicking Reload (or press Ctrl+⇧ Shift+R). Google Chrome and Safari users can just click the Reload button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
/* Remove double purge button. */
if ($('[id="ca-purge"]').length > 1)
{
$('[id="ca-purge"]').slice(1).remove();
}
/* Add button to [[Special:WikiActivity]] to the sidebar. */
$('#p-Yu-Gi-Oh\\.21_Wikia .pBody ul').append(
$('<li>').attr('id', 'n-Activity').append(
$('<a>').attr('href', '/wiki/Special:WikiActivity?useskin=wikia')
.attr('rel', 'nofollow')
.append('Wiki Activity')
));
/* Add "Browse" button to the page header menu. */
$('#p-cactions .pBody ul').append(
$('<li>').attr('id', 'ca-browse').append(
$('<a>').attr('href', '/wiki/Special:Browse/' + wgPageName)
.attr('title', 'Browse this page')
.attr('accesskey', 'b')
.append('Browse')
));