Bug - Fixed Automatic palinshelves doesn't work in relay browser [patch]

For some reason, the various Firefoxes I use do not appear to support the way KoLmafia helps with the Drawn Onward adventure when it presents it in the relay browser.

I see that mafia inserts a call to load /palinshelves.js just before the </html> tag. This appears to not do anything, at least with various versions of Firefox 3 and 4.

I attached a patch that does the following:

  • Move the "action" in palinshelves.js into a function palinshelve()
  • Load palinshelves.js in the <head> tag
  • insert onload='palinshelve()' into the <body> tag

This appears to work for me. If it appears to work for more users than the original palinshelves handling, I would be happy if it could be included in the KoLmafia source.
 

Attachments

  • palinshelves.diff
    1.9 KB · Views: 38

lostcalpolydude

Developer
Staff member
I also noticed that the palindome shelf stuff stopped working at some point in Firefox, and Opera was the only browser where it was still working for me (I don't have Safari installed to test that).
 

xKiv

Active member
I didn't notice it not working (read: I just clicked the button without choosing anything and it was pre-chosen correctly) in chrome this weekend.

ETA: do you have NoScript or some other javascript safety helper?
 

xKiv

Active member
Something might have decided tha javascript is a cross-site attack, is what I meant.
 

Veracity

Developer
Staff member
The existing code works perfectly for me with Safari, but I'm willing to try this out in a few days when I get there again. Consider this a bump.
 
Top