Poke instead
![]() ![]() |
First.. this is very useful. Thank you!! I'd like to suggest an enhancement. I think you should try replacing the Poke link rather than the send message link. The send message link is useful to have. I wouldn't want to lose that. I personally think the Poke link is useless... I know I wouldn't miss it. Another option is not to REPLACE the message link, but ADD the mafia wars profile link just below it. Just some suggestions.. Thanks again for sharing this. |
![]() ![]() |
I made the following changes to replace the poke link instead, it seems to work.
Add a new var line
Replace "sendmsg" with "poke" for the 4 lines that modify the link. Here is the entire block with changes:
//Get the Message element
var poke = document.getElementById("profile_action_poke");
var sendMsg = document.getElementById("profile_action_send_message");
if(sendMsg)
{
try
{
var MsgStr = sendMsg.toString();
var fStart = MsgStr.indexOf("?id="); //Get the FB profile ID start point
var userID = MsgStr.slice(fStart+4);
if(!isNaN(parseInt(userID)))
{
//set the onclick event to open Mafia Wars in a new window/tab
//following line is broken
sendMsg.setAttribute("onclick",""); //setting onclick to blank until mafia wars fix found
//set the href to open Mob Wars in the current window
poke.setAttribute("href", MobProfile + userID);
//changes the Msg link
poke.innerHTML = "Goto Mafia Profile";
poke.setAttribute("ID", "MafiaProfile");
poke.setAttribute("REL", "");
}
|
![]() ![]() |
That's actually what the original script did. The reason I changed it is because I found far more profiles had the "Send Messge" link than the "Poke" link. I guess I could give people a choice using a variable. Some profiles don't have any links at all and I'm trying to figure out how to enable a "Goto Mafia profile" link for those, just haven't had time yet. But thanks for the suggestion, I'll implement that in the next version, as soon as time allows ;) |
![]() ![]() |
I'm thinking about maybe using the "Report/Block" person link to get the ID and then add my own new link and not replace anything, that would be better. Anyway, as soon as I get to it ;) |

