Facebook Mafia Wars Exp Remaining

By ThatOneGuy Last update Apr 24, 2010 — Installed 57,542 times.

Need to modify current script to do another thing :)

in
Subscribe to Need to modify current script to do another thing :) 7 posts, 3 voices



Default Dot User

Hello,

I am just starting to learn how to write in GS and would like some help in developing similar script to improve my Mafia Wars experience.

I just want a simple script to replace 'Health' Title (element id _user_health) to a link heal (http://apps.facebook.com/inthemafia/remote/html...)

my Java skill is almost none but have c++ experience.

 
ThatOneGuy Script's Author

Ask and you shall receive (in this instance... feel special).

 
Default Dot User

wow :) I feel special :) thanks so much :)

 
Tim Wilson Scriptwright

I have another suggestion for ya. I've always found it to be annoying that in order to see your mafia, you have to click "My Mafia", then you have to click the "My Mafia" tab in the "Recruit" screen. Why not just make the main "My Mafia" go to you mafia? Here's how.

Add this to the bottom of (but inside) the "if(elementsFound)" check:

	/* TRW: Added to replace the "My Mafia" link to go to the list instead of the recruit screen. */
	var elMafia = document.getElementsByTagName('div');
	var mafiaLink;
	for(var t=0; t<elMafia.length; t++) {
	  mafiaLink = elMafia[t];
	  if(mafiaLink.className == "mafia_link") {
		mafiaLink.className += " gm_checked";
		/* Have to do the replace twice, once for the href, once for the onclick */
		mafiaLink.innerHTML = mafiaLink.innerHTML.replace(/recruit/, 'group');
		mafiaLink.innerHTML = mafiaLink.innerHTML.replace(/recruit/, 'group');
	  }
	}

If you click on your mafia number, it will still take you to the recruit screen.

 
ThatOneGuy Script's Author

Done, will upload now...

 
Default Dot User

Love the addition.

It looks like it is more and more feature to it to the point it may need a little change in the title to "MafiaWars++" lol :)

 
Tim Wilson Scriptwright

Excellent! Any thought to the "bug" I listed in the other discussion?

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel