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


 * Thanks Fandyllic! I just added it to our wiki. It sure is nice to get straight to the revision history on userpages and user talkpages. Thanks! — Spike <font color="#000000" face="Garamond" size="3">Toronto  23:54, May 31, 2011 (UTC)