Forum:Putting a history link in more places

Hi all you intrepid Community Central readers. I got sick of the extra clicks to get to history of a page on diffs and other places, so I coded up some simple Javascript to add the link in most namespaces. So far I've only tested this at Special:MyPage/wikia.js, but it should work elsewhere.

function HistoryOnDiff { /* Does not work for "User:" or "User talk:" */ if (wgCanonicalNamespace == "") { $('p > a[accesskey="c"]').after(' &#124; History of this page (' + wgTitle + ')'); } else { $('p > a[accesskey="c"]').after(' &#124; History of this page (' + wgCanonicalNamespace + ':' + wgTitle + ')'); } }

addOnloadHook(HistoryOnDiff);

I couldn't quite figure out how to make this work on diffs of User: or User talk: pages, but maybe some far more clever JS coder can make it work there too. -- Fandyllic (talk &middot; contr) 10 Aug 2011 5:09 PM Pacific