Forum:JS for adding History to Edit dropmenu

Wikia added a history link to the Edit drop menu for most pages, but not for User: or User talk: pages, so this JS can add it for those pages.

It should be okay wiki-wide for MediaWiki:Common.js or MediaWiki:Common.js, but try it at Special:MyPage/wikia.js first (user-specific JS for current wiki only).

/* Add history to the Edit dropdown menu for User pages */ /* Wikia made this the default functionality, but not for User pages yet */ function UserHistoryDropdownMenuItem { if ( (wgCanonicalNamespace == 'User') || (wgCanonicalNamespace == 'User_talk') ) { $('ul.wikia-menu-button li:first-child ul li:first-child').after('History'); } }

addOnloadHook(UserHistoryDropdownMenuItem);

-- Fandyllic (talk &middot; contr) 30 May 2011 2:10 PM Pacific