Bugs
|
|
Ok guys, I think I worked out all the bugs... please let me know if you find anything. |
|
|
Nice One Centurion! A true example of KISS (Keep It Simple Stupid) Great little script - well chuffed - thanks. EW |
|
|
very nice script gj dude |
|
|
Thanks guys. |
|
|
I'm using this script and feel like I needed to say thank you as well. Its a great little script! Thanks! |
|
|
I don't know if you would consider this a "bug", but the link you use to do the heal does not have all of the parameters passed on the URL, and it does it as a link instead of the AJAX method Zynga uses. Here's the code to do it. Add this section of code after looking for "_user_max_health":
/* TRW: Added to do heal via AJAX, using the code Zynga built into the "Hospital" link. */
if( elExp[h].className == 'heal_link' ) {
var hospitalLink = elExp[h].getElementsByTagName('a')[0];
var healthHref = hospitalLink.getAttribute("href").replace(/view/, 'heal');
/* Replace "view" with "heal" to do the actual healing.
var healthOnClick = hospitalLink.getAttribute("onclick").replace(/view/, 'heal');
healthHTML = '<a href="' + healthHref + '" onclick="' + healthOnClick + '">' + userHealth + '</a>';
}
In the if() for elementsFound, add this:
if( healthHTML == null ) {
healthHTML = "<a href=\"http://apps.facebook.com/inthemafia/remote/html_server.php?xw_controller=hospital&xw_action=heal\">" + userHealth + "</a>";
}
Then where you set userHealthElement.innerHTML, just set it to the healthHTML variable set above. I also have a suggestion that I've coded. I'm putting that in the other discussion. |
|
|
Nice work with script..very handy :)Thanks |
|
|
Thanks for all the praise. Tim, that is more a design "feature" than a bug. The health button is a link that doesn't use AJAX because I prefer to middle click it, which will load it in a new tab and I can continue attacking/robbing or whatever I was doing because the original tab has not changed screens. It's the same thing for the skill advancement. If I'm the only one that likes this I suppose I can change the script (and figure out how to do the options on GM). |
|
|
ThatOneGuy: Agreed, it isn't completely a bug. However, the middle-click will still work for you. Middle-click uses the link in the "href" attribute. But left-click uses the "onclick" attribute. The other thing is there are other parameters on the URL that get passed back to Facebook. I don't know what they do, I just thought they should be there. It doesn't much matter, I can always modify the script and add it back in. |
|
|
Tim, Done. Also changed all other links to use the AJAX as well. -T1G |
|
|
Nice script! Thanks for taking my suggestions. |
|
|
Found a bug... Posting a notification breaks the script... e.g. Script breaks on posting wishlist, Job request help etc. P.S. - Everything else is fine and looking great. Thanks for the script :) |
|
|
Ok, those sound like they may be in the same realm as the changing city bug that I've already noticed... I will make sure to test those when I think I have that bug fixed. Thanks for letting me know.
|
|
|
Hi there
|
|
|
Anyone using Firefox 2? I'm having problems with the app. The heal link works, and the experience remaining works, but the property rate doesn't, and my suggestion for the "My Mafia" link doesn't work. Anyone else using Firefox 2? |
|
|
It looks like the "My Mafia" link is broken with Mafia Wars Cuba update as well... |
![]() ![]() |
Ok, I've fixed the Cuba bugs, please let me know if you have any other problems :) (I have not gotten the chance to test the notification bug, but will know tomorrow night if that breaks it or not) |
![]() ![]() |
Great script.
|
![]() ![]() |
Yah me too..........I can't enter fight page..........every time I enter Fight page its says loading mafia....then freezes there!! |
![]() ![]() |
Yeah, for whatever reason they set the fight link to be handled differently. I'm not sure why anything I was doing was interfering with it but I fixed it by modifying the fight link back to the working the same as everything else in the game so that it at least works for now. Also, let me know what you guys think of the visual changes. |
![]() ![]() |
cool...........fight page is working.........new visual changes are also good Is there any way of autometically go back to fight page after healing??.......where should i have to change the javascript?? |
![]() ![]() |
Sorry for double post..... I have also one request......Can you change the Inventory links to shortcut for Weapons, Valut and Gifting links like you did in profile/state increase link?? thnks in advance!! |
![]() ![]() |
In response to your first post... if you click on your current health (when it's not 100% it should be a link) then you will heal without leaving the page you are on. In response to the next one... I might, busy schedule for a while to come though so not sure when the urge will hit me to work on this script more though... keep an eye out for updates :) |
![]() ![]() |
Ok, the Inventory link has now been changed as requested. To be honest I wish I had done it sooner! I've been using t for a day now and am already hooked. Also, just wanted to mention: I have friends that are having problems with the fight link when they are using IE or Firefox without any scrips so I'm not sure why, but it definitely seems they have a bug in MafiaWars, but my script continues to fix it :) |
![]() ![]() |
Many many thnks for the inventory quick links!! |

