The alternative to an empty <td> is to use colspan="2" in the previous <td>.
result.append('<tr>');
result.append('<td title="Meat" style="text-align:left" class="resource">' + formatInt(my_meat()) + ' <img src="/images/itemimages/meat.gif"></td>');
result.append('<td title="Adventures remaining" style="text-align:right" class="resource">' + my_adventures() + ' <img src="/images/itemimages/hourglass.gif"></td>');
table.chit_brick td {
border: 0px;
text-align:center;
vertical-align:middle;
}
table.resource img
td.resource img
I can suggest a different way, maybe you like it more:Is there a better way to space out meat and remaining adventures to the far ends of the row? The method I found works, but I feel it is a little kludgy to stick an empty cell between meat and adventures.
result.append('<td colspan="2"><div class="resource">');
result.append('<div title="Meat" style="float:left"><span>' + formatInt(my_meat()) + '</span><img src="/images/itemimages/meat.gif"></div>');
result.append('<div title="Adventures remaining" style="float:right"><span>' + my_adventures() + '</span><img src="/images/itemimages/hourglass.gif"></div>');
result.append('</div><div style="clear:both"></div></td>');
.resource {
color:darkred;
font-weight:bold;
background-color:#F8F8F8;
padding: 0px 2px;
}
.resource div span, .resource div img {
vertical-align: middle;
}
.resource div img {
max-width:12px;
max-height:12px;
padding-left:3px;
}
result = result.replace_string('<body onload="updateSafetyText();"', '\n<script type="text/javascript" src="chit.js"></script>\n<body');
Another thing I noticed, was an error in calling a non-existent javascript function updateSafetyText(). It's probably KoLmafia's problem it can be "fixed" by using the following line:
Code:result = result.replace_string('<body onload="updateSafetyText();"', '\n<script type="text/javascript" src="chit.js"></script>\n<body');
I'm trying, but failing to duplicate that bug. I checked it in Firefox, IE and Opera. Perhaps that is because my current version is different. I'm attaching my current version of charpane.ash and chit.css so please put those in your relay directory and then tell me if you are still getting the bug. If you are, then what browser are you using? Is that chrome? (I haven't bothered to install chrome.)
You're right, updateSafetyText() is only used in CharPaneDecorator.java. I could've been less lazy and checked . I think it's just an oversight and basics.js can be included in that frame to remedy the missing function. Maybe one of the svn commiters can add it in?
That didn't do anything. It is chrome but I get the same bug in IE as well.
@Bale Sorry, I just meant that the error comes from KoLmafia itself, and that one of the developers can fix it by adding a reference to the "basic.js" file they have in the relay folder.
For style="clear:both" : is a good practice to place that in an empty div or span after using a combination of floats (or clear:left / clear:right respectively) so that the subsequent html elements are not accidentally affected...what is the purpose of <div style="clear:both"></div>?
Second, why isn't vertical-align: middle; included in .resource instead of .resource div span and img?..
@rlbond86 Could you out type zlib chit into the CLI and post the output? Maybe I can try reproduce the error.
> zlib chit
Running ZLib version: r35 (current)
Copy/paste/modify/enter any of the following lines in the CLI to edit settings:
zlib chit.character.avatar = true
zlib chit.character.title = true
zlib chit.checkversion = true
zlib chit.effects.classicons = none
zlib chit.effects.layout = intrinsics,songs,buffs
zlib chit.effects.showicons = true
zlib chit.effects.usermap = false
zlib chit.familiar.hats = spangly sombrero,sugar chapeau
zlib chit.familiar.pants = spangly mariachi pants,double-ice britches,BRICKO pants,pin-stripe slacks,Studded leather boxer shorts,Monster pants,Sugar shorts
zlib chit.familiar.protect = false
zlib chit.familiar.weapons = time sword
zlib chit.floor.layout = update
zlib chit.helpers.dancecard = true
zlib chit.helpers.semirare = false
zlib chit.helpers.wormwood = stats,reward
zlib chit.quests.hide = false
zlib chit.roof.layout = character,stats,familiar,modifiers
zlib chit.stats.layout = hp,mp,axel|muscle,myst,moxie|stomach,liver,spleen|mcd|trail
zlib chit.stats.showbars = true
zlib chit.toolbar.layout = elements,update,quests,trail,helpers
zlib chit.toolbar.moods = true
zlib chit.walls.layout = effects
(If no values were shown, no settings or values matched your input text. Type "zlib vars" to see all.)
Ok, I've looked at your settings and it seems that Character Info Toolbox might not have intended for the last adventure to be added to the stats pane. I could be mistaken though.I'm having a problem with the newest version. The stats window gets even more messed up when the last location has a long name, see the attached screenshot.
zlib chit.roof.layout = character,stats,trail,familiar,modifiers
zlib chit.stats.layout = hp,mp,axel|muscle,myst,moxie|stomach,liver,spleen|mcd