Wikia

Community Central

Make your Wiki Activity button say and do Recent Changes

89,702pages on
this wiki

Forum page

This Forum has been archived

Visit the new Forums
Forums: Index Community Central Forum Make your Wiki Activity button say and do Recent Changes
Wikia's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.
Note: This topic has been unedited for 1271 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.


Thanks to JQuery and my meager JS skills, I've figured out how to make the "Wiki Activity" morph into a "Recent Changes" button.

To make this happen, put the following in Special:MyPage/wikia.js (to enable it only on a specific wiki):

function WikiActivity2RecentChanges() {
	$('a.wikia-button[data-id$="wikiactivity"]').replaceWith('<a data-id="recentchanges" class="wikia-button secondary" accesskey="g" title="Special:RecentChanges" href="/wiki/Special:RecentChanges"><img height="0" width="0" class="sprite activity" src="http://images1.wikia.nocookie.net/common/skins/common/blank.gif">Recent Changes</a>');
}
 
addOnloadHook(WikiActivity2RecentChanges);

Hopefully, this is too simple to have bugs, but if you find any, report them here and maybe I can fix them. -- Fandyllic (talk · contr) 2:30 PM PST 27 Dec 2010

Wouldn't be simpler to change the href attribute instead of rewritting the entire link? --Ciencia Al Poder (talk) -WikiDex 18:52, December 28, 2010 (UTC)
Yeah, but I figured I should change the data-id and title, so it was easier just to redo the whole link. -- Fandyllic (talk · contr) 11:35 AM PST 28 Dec 2010
Would it be possible to make it so it's not under the Random Page button, and instead to the side of it? {{SUBST:User:Blaze_fire12/Signature}} 18:25, January 28, 2011 (UTC)
That problem is actually not my JS code's doing. Try adding the following to your Special:MyPage/wikia.css, see how it looks:
/* Widen area for Random Page and Wiki Activity */
.WikiHeader .buttons {
    width: 290px;
}
-- Fandyllic (talk · contr) 28 Jan 2011 1:47 PM Pacific

Around Wikia's network

Random Wiki