Bug - Fixed Charpane effect decoration has a new bug.

Veracity

Developer
Staff member
We've decorated the effect names in the charpane for a long time like this:

Leash of Linguini (21) ↑

The (21) is the remaining duration.
It links to: <host>/Kolmafia/sideCommand/command=uneffect+Leash+of+Linguini&pwd
Hover text: Use a Remedy to remove the Leash of Linguini effect

The ↑ is the link to increase the duration of the effect.
It links to: <host>/Kolmafia/sideCommand/command=cast+1+Leash+of+Linguini&pwd
Hover text: Increase rounds of Leash of Linguini

That was worked reliably for many years.

New behavior: the browser can wrap that line any way it wants.

Leash of Linguini (21) ↑
or
Leash of Linguini
(21) ↑
or
Leash of Linguini (21)


In every case, the hover text and "links" are exactly as described.
But in the last case - when the up arrow is on a line by itself - if you click on it, it tries to uneffect, not increase duration.
I click on the up arrow and the gCLI shows:

Code:
> uneffect Leash of Linguini

Leash of Linguini has no specific item or skill for removal. Trying generics...
You need 1 more soft green echo eyedrop antidote to continue.

This is in the Safari browser, since it seems like a browser thing to submit the wrong URL. But it is new.
 

heeheehee

Developer
Staff member
To confirm: by charpane, you mean in the relay browser, right?

I vaguely recall this being something I paid attention to when I was changing the hardcoded image server to use cloudfront, but only insofar as making sure the images loaded properly.

Can you provide a snippet of HTML for one of these badly-wrapped lines that's behaving badly? I couldn't reproduce in Chromium even after shrinking the pane such that the arrow was on its own line.
 

Veracity

Developer
Staff member
Yes. In the Relay Browser.

This was the KoL supplied line:

Code:
<tr><td></td><td valign='middle' align=right><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/missingavatar.gif" width=30 height=30  onClick='eff("da6f47ae655716b599e530128712c36c");' oncontextmenu='return hardshrug(2556, "Invisible Avatar");'></td><td valign=center><font size=2>Invisible Avatar (4)</font><br></td></tr>

Here is the KoLmafia-modified line:

Code:
<tr><td></td><td valign='middle' align=right><img src="/images/itemimages/missingavatar.gif" width=30 height=30  onClick='eff("da6f47ae655716b599e530128712c36c");' oncontextmenu='return hardshrug(2556, "Invisible Avatar");'></td><td valign=center><font size=2>Invisible Avatar (<a href="/KoLmafia/sideCommand?cmd=uneffect+Invisible+Avatar&pwd=xxx" title="Use a remedy to remove the Invisible Avatar effect">4</a>)&nbsp;<a href="/KoLmafia/sideCommand?cmd=cast+1+CHEAT+CODE%3A+Invisible+Avatar&pwd=xxx" title="Increase rounds of Invisible Avatar"><img src="/images/redup.gif" border=0></a></font><br></td></tr>

If I hover over the up arrow, I see "Increase rounds of Invisible Avatar" and Safari shows me the URL to submit will be "127.0.0.1:60080/KoLmafia/sideCommand?cmd=cast+1+CHEAT+CODE%3A+Invisible+Avatar&pwd=xxx"
If I click on it, it submits "127.0.0.1:60080/KoLmafia/sideCommand?cmd=uneffect+Invisible+Avatar&pwd=xxx"
 

heeheehee

Developer
Staff member
Hm. HTML checks out as far as I can tell. Do you have another browser that reproduces this bug (e.g. Chrome or Firefox)?
 

Veracity

Developer
Staff member
I have both. It is no longer quite so simple to test, since I have to change my default browser now. :)
I'll try it out.
 

heeheehee

Developer
Staff member
If you don't mind, I'm going to declare this "not a bug" because I really can't see anything wrong with the generated HTML, and it doesn't reproduce on other browsers. Feel free to reopen if you disagree, of course.
 

Veracity

Developer
Staff member
I'll switch to Chrome, I guess. Although its rendering is uglier and I don't trust Google even a tiny bit.
 

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Staff member
This sounds suspiciously like my day job 😬. I'll see if I can get it nice for you, V
 

heeheehee

Developer
Staff member
no love for ff I see :(

As far as not changing your default browser, I typically use `relay nobrowser` in my loginScript and then manually navigate to 127.0.0.1:60080.
 

Veracity

Developer
Staff member
no love for ff I see :(

As far as not changing your default browser, I typically use `relay nobrowser` in my loginScript and then manually navigate to 127.0.0.1:60080.
FF was my KoLmafia browser for a long time, but there was a period that it had a memory leak or something and got REALLY slow over the course of playing a KoL session. So, I switched to Safari and - with rare exceptions - it's been just fine for me.

I'm willing to give FF another chance.
 

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Staff member

Veracity

Developer
Staff member
Thanks! I tested it and it works just fine on Safari; the up arrow can no longer be placed on its own line.
Reviewed, merged.
 
Top