Mafia Wars Facebook - Add 'Goto Mafia Profile' link to Facebook profiles.

By SwissJ Last update May 22, 2010 — Installed 36,953 times.

Script Summary: Adds a 'Goto Mafia Profile' link to Facebook profiles and displays that user's Facebook ID.



Version: 2010.05.22.1317

Thumb

THIS SCRIPT WILL NO LONGER BE UPDATED!!!!!!!! I STOPPED PLAYING MAFIA WARS DUE TO LACK OF TIME AND THE SAME REASON KEEPS ME FROM MAINTAINING THIS SCRIPT ANY LONGER!!!

If anyone wants to take over, feel free!!! You have my blessings!


PLEASE NOTE: if the links are not working, you may have an expired Mafia Wars
cookie. To fix that, log into Mafia Wars at least once using the normal way.
This should update the cookie and the links should work after that!
***********************************************************************************
Updates:
22-May-2010: Quick fix for the promote link (uid is now pid). Also, the "Send Gift" link does not currently work but that's a Zynga issue as it does not work from the Mafia Wars profile page either. I noticed that Zynga is switching to an internal user ID that is no longer related to the Facebook ID so this script may not be working for much longer. YOU HAVE BEEN WARNED :)

10-May-2010: Disable script on "Preview My Profile" pages in privacy settings.
16-Apr-2010: Disable script on application pages (didn't think of that one, thanks Sonar!)
23-Mar-2010: Quick fix for "add to mafia" link. The reason it didn't work at times is because one had to be in New York for the link to work. If you left Mafia Wars in another city, the link failed. This should now work in every city.
22-Jan-2010: Added link to add individual to own mafia using the "war" backdoor.

11-Dec-2009: Fix for fan/group pages and profile link (Zynga is changing things on a daily basis). Now using BASE64 encoded user ID for the profile link, but Zynga still uses plain-text user ID on promote and gifting link. This is turning into such a circus!

10-Dec-2009: Even better user ID detection (hopefully).
09-Dec-2009: Better user ID detection and updated links.

23-Oct-2009: Added "Promote" and "Send Gift" entries so you don't have to look through your mafia list first. Of course, that would work only for mafia members.

20-Oct-2009: Updated again due to FB changes.
14-Oct-2009: Updated due to FB changes.
------------------------------------------------------

This adds a link that will open the user's Mafia Wars profile to every Facebook profile and also displays that user's Facebook ID. It no longer replaces anything but rather adds its own entry to the Facebook menu on the left. Useful to see if someone really is playing Mafia Wars before adding them (as there are a lot of fake profiles posted in groups that will phish info from users).

Script is inspired by this script: http://userscripts.org/scripts/show/55960. Also contains ideas or parts from http://userscripts.org/scripts/show/43573 and http://userscripts.org/scripts/show/48627. Credits to these people!


*****************************************************************************************
PLEASE REPORT ANY PROBLEMS!! I made some changes to try and get it more reliable but some of the methods I use SHOULDN'T technically be working and I'm not sure why they do. So if you encounter any problems, let me know. Thanks!
*****************************************************************************************

And if someone can explain to me how the timing works in Greasemonkey, it would be really helpful!! As it is right now, this script uses a timer to make the modifications but even once these are done, the script runs over and over again, costing a little bit of performance. So if someone can suggest a way to make it run for sure once and then never again on each page, that would be great!