Bale's Relay Overrides

ereinion

Member
Hi! It seems that with the most recent update to topmenu, there has appeared a rather large white space to the right of the scripts/refresh buttons, and the links get kinda squashed together:
WoiqDXJ.png

I suppose this is a result of the recent changes to the topmenu, and changes made to mafia and your script to work with those. Looking at the topmenu without awesomemenu.ash and topmenu.ash in the relay folder I get this:
zEiOlKJ.png

So maybe it has something to do with the placement of the script-menu having changed slightly? If so, is there something you can do to ensure that it is always at the far right, as I think it used to be? Would this on second thought have been an issue I rather should have taken up in the "new content" thread? If so, I am sorry for any inconvenience this thread may have caused you.

Anyway, here's the html for the top menu :p
With scripts:
HTML:
<html>
<head>
<title>The Kingdom of Loathing</title>
<script type="text/javascript" src="/images/scripts/jquery-1.3.1.min.js"></script>

<style type="text/css">
<!--
BODY, TD, UL {
font-family: arial;
}
.tiny { font-size: 9px; }
IFRAME {
	border: 0px;
	height: 45px;
	margin: 0px;
	padding: 0px;
	min-width: 200px;
	overflow: hidden;
}
-->
</style>

<script language=Javascript src="/images/scripts/core.js"></script>
<script language=Javascript>
function skillson()
{
	skillpane.location.href = 'skills.php?tiny=1';
}
function showskills()
{
	$('#menus, .hidemenu').hide();
	$('#skillbit').show();
}

function skillsoff()
{
	$('#menus, .hidemenu').show();
	$('#skillbit').hide();
	skillpane.location.href = "blank.html";
}

</script>
<script language="Javascript" src="/basics.js"></script><link rel="stylesheet" href="/basics.1.css" /></head>


<body bgcolor=white link=black alink=black vlink=black text=black><center><div id="yep" style="position: absolute; left: 0px; top: 0px; text-align: center; width: 100%;"><center><center><table style="margin-right:100px" cellpadding=0><td><div style="height: 45px; overflow:hidden; margin:0 0 0 0; border:0; bottom: 0px;"><a href="place.php?whichplace=forestvillage&action=fv_friar" target="mainpane"><img src="/images/otherimages/forestvillage/friarcottage.gif" height=61 alt="Florist Friars" title="Florist Friars" style="margin-top:-16px; border:0" /></a></div></td><td><a href="clan_raidlogs.php" target="mainpane"><img src="/images/adventureimages/hobofort.gif" height=45 alt="Clan Raidlog" title="Clan Raidlog" style="margin:0 0 0 0; border: 0" /></a></td><td class=tiny align=center><a href='javascript:skillsoff();'>menu</a> <a href='javascript:skillson();'>skills</a><br><span id='loading'> </span></td><td align=center valign=center><a target=mainpane href="showplayer.php?who=352230"><img title="View Public Charsheet" style="border:0" src="/images/otherimages/smallleftswordguy.gif" width=33 height=40></a></td><td valign=center align=center class=tiny><div id='menus' style='margin: 0px; padding: 0px; display: inline'><a target=mainpane href="charsheet.php">character</a> <a target=mainpane href="inventory.php?which=1">inv</a><a target=mainpane href="inventory.php?which=2"><span style="font-weight:normal;color:#1975FF">ent</span></a><a target=mainpane href="inventory.php?which=3">ory</a> <a target=mainpane href="inventory.php?which=f-1">recent</a> <a target=mainpane href="inventory.php?which=f0">fav</a> <a target=mainpane href="skills.php">skills</a> <a target=mainpane href="questlog.php?which=1">qu</a><a target=mainpane href="questlog.php?which=4"><span style="font-weight:normal;color:#1975FF">es</span></a><a target=mainpane href="questlog.php?which=6">ts</a> <a target=mainpane href="craft.php">craft</a><a target=mainpane href="craft.php?mode=discoveries"><span style="font-weight:normal;color:#1975FF">ing</span></a> <a target=mainpane href="mall.php">mall</a> <a target=mainpane href="clan_hall.php">clan</a> <a target=mainpane href="clan_viplounge.php">VIP</a> <a target=mainpane href="messages.php?box=Inbox">mes</a><a target=mainpane href="messages.php?box=Outbox"><span style="font-weight:normal;color:#1975FF">sag</span></a><a target=mainpane href="sendmessage.php">es</a> <a target=mainpane href="account.php">options</a> <a href="/KoLmafia/logout?pwd=9c7bcf1138797a767f86bd48710980fc" target="_top">log out</a> <br> <a target=mainpane href="main.php">main</a> <a target=mainpane href="campground.php?action=bookshelf">camp</a> <a target=mainpane href="mountains.php">mountains</a> <a target=mainpane href="da.php">dungeon</a> <a target=mainpane href="plains.php">plains</a> <a target=mainpane href="cobbsknob.php">knob</a> <a target=mainpane href="beanstalk.php">bean</a> <a target=mainpane href="place.php?whichplace=knoll_friendly">knoll</a> <a target=mainpane href="beach.php">beach</a> <a target=mainpane href="woods.php">woods</a> <a target=mainpane href="island.php">island</a><br><a target=mainpane href="town.php">town</a> <a target=mainpane href="town_wrong.php"><span style="font-weight:normal;color:#1975FF">(W </span></a>/<a target=mainpane href="town_right.php"> R)</a> <a target=mainpane href="place.php?whichplace=manor1">manor</a> <a target=mainpane href="guild.php?guild=m">guild</a> <a target=mainpane href="bordertown.php">border</a> <a target=mainpane href="forestvillage.php">village</a> <a target=mainpane href="place.php?whichplace=airport">airport</a> <a target=mainpane href="adminmail.php">report bug</a> <a target=_blank href="http://forums.kingdomofloathing.com/vb/index.php">forums</a> <a href="#" onClick='javascript:window.open("donatepopup.php","");'>donate</a> <a target=_blank href="http://kol.coldfront.net/thekolwiki/index.php/Main_Page">wiki</a> <a target=mainpane href="community.php">community</a> <a target=mainpane href=peevpee.php>PvP</a> </div>	<span id='skillbit' style='display: none'>
	<iframe name='skillpane' id='skillpane' src='blank.html'>
	</iframe>
	</span>
	</td><td><a target=_blank href="http://www.noblesse-oblige.org/calendar/"><table cellpadding=0 id="themoons"><tr><td width=15></td><td align=center valign=top align=right class=tiny><img src="/images/itemimages/moon4a.gif"  alt="Ronald, Waxing Gibbous, with a small dark moon passing in front on the left" title="Ronald, Waxing Gibbous, with a small dark moon passing in front on the left" ><td width=20></td><td align=center valign=top align=left class=tiny><img src="/images/itemimages/moon6.gif" alt="Grimace, Waning Gibbous" title="Grimace, Waning Gibbous" ><td width=15></td></tr><tr><td></td><td align=center class=tiny>Ronald</td><td></td><td align=center class=tiny>Grimace</td><td></td></tr></table></a><!--<td width=15></td>-->
</td>
<!--<td width=20 align=center valign=center><img src="/images/otherimages/newmoonpad.gif"></td>-->

<!--
<td width=20></td>
<td class=tiny align=center valign=center>
All material Copyright © 2010,<br><a target="_blank" href="http://asymmetric.net">Asymmetric Publications, LLC</a>
</td>
-->
<td valign=center align=center class=tiny><div id='kolmafia' style='margin: 0px; padding: 0px; display: inline'><table cellpadding=0 cellspacing=0><tr><td><font size=-1><select style='max-width:104px;' onchange='if (this.selectedIndex>0) { top.mainpane.document.location.href="showclan.php?pwd=9c7bcf1138797a767f86bd48710980fc&action=joinclan&confirm=on&whichclan=" + this.options[this.selectedIndex].value; this.options[0].selected=true;}'><option>-change clan-</option><option value=2047000040>'); drop table clans;--</option><option value=90485>Bonus Adventures from Hell</option><option value=2046998096>bumcheekcity's Basements</option><option value=2047000361>Dumbledarth's Army</option><option value=2046982311>Fauwxes with Bauwxes</option><option value=41543>Hardcore Nation</option><option value=38808>Hardcore Oxygenation</option><option value=84118>Hardcore State</option><option value=2046985950>HCO Rest Home</option><option value=2046983142>Hobocore Oxygenation</option><option value=17041>Magnolia</option><option value=9380>Museum of Idiots</option><option value=54233>Shining Path</option><option value=2046997154>The Fax Dump</option><option value=21459>The Hogs of Destiny</option><option value=2046991047>The Loather's of KoL</option><option value=23969>The Mysterious Goblinwhackers of the Fifth</option><option value=67356>The Piglets of Fate</option><option value=2046992778>The Toy Box</option><option value=2046979515>Yggdrasil</option><option value=2047002339>You Have No Chans to Survive Make Your Time</option></select> </td></tr><tr><td align=left valign=center class=tiny><select onchange='if (this.selectedIndex>0) { top.mainpane.location=this.options[this.selectedIndex].value; this.options[0].selected=true;}'><option>-run script-</option><option value='relay_breakables.ash'>breakables</option><option value='relay_Guide.ash'>Guide</option><option value='relay_OCD_dB_Manager.ash'>OCD dB Manager</option><option value='relay_Psychose-a-Matic.ash'>Psychose-a-Matic</option><option value='relay_test.ash'>test</option><option value='relay_Universal_Recovery.ash'>Universal Recovery</option><option value='relay_WOSSMAN.ash'>WOSSMAN</option></select></td><td align=left valign=center>[<a href="topmenu.php">re</a>]</td></tr></table></div></td></tr>
</table>
</center>
</div>
</center>
</body>
</html>

Without scripts:
HTML:
<html>
<head>
<title>The Kingdom of Loathing</title>
<script type="text/javascript" src="/images/scripts/jquery-1.3.1.min.js"></script>

<style type="text/css">
<!--
BODY, TD, UL {
font-family: arial;
}
.tiny { font-size: 9px; }
IFRAME {
	border: 0px;
	height: 45px;
	margin: 0px;
	padding: 0px;
	min-width: 200px;
	overflow: hidden;
}
-->
</style>

<script language=Javascript src="/images/scripts/core.js"></script>
<script language=Javascript>
function skillson()
{
	skillpane.location.href = 'skills.php?tiny=1';
}
function showskills()
{
	$('#menus, .hidemenu').hide();
	$('#skillbit').show();
}

function skillsoff()
{
	$('#menus, .hidemenu').show();
	$('#skillbit').hide();
	skillpane.location.href = "blank.html";
}

</script>
<script language="Javascript" src="/basics.js"></script><link rel="stylesheet" href="/basics.1.css" /></head>


<body bgcolor=white link=black alink=black vlink=black text=black><center><div id="yep" style="position: absolute; left: 0px; top: 0px; text-align: center; width: 100%;"><center><table cellpadding=0 ><tr><td class=tiny align=center><a href='javascript:skillsoff();'>menu</a> <a href='javascript:skillson();'>skills</a><br><span id='loading'> </span></td><td align=center valign=center><img src="/images/otherimages/smallleftswordguy.gif" width=33 height=40></td><td valign=center align=center class=tiny><div id='menus' style='margin: 0px; padding: 0px; display: inline'><a target=mainpane href="charsheet.php">character</a> <a target=mainpane href="inventory.php">inventory</a> <a target=mainpane href="skills.php">skills</a> <a target=mainpane href="questlog.php">quests</a> <a target=mainpane href="craft.php">crafting</a> <a target=mainpane href="mall.php">mall</a> <a target=mainpane href="clan_hall.php">clan</a> <a target=mainpane href="messages.php">messages</a> <a target=mainpane href="account.php">options</a> <a href="/KoLmafia/logout?pwd=9c7bcf1138797a767f86bd48710980fc" target="_top">log out</a> <br> <a target=mainpane href="main.php">main</a> <a target=mainpane href="town.php">town</a> <a target=mainpane href="campground.php">campground</a> <a target=mainpane href="mountains.php">mountains</a> <a target=mainpane href="plains.php">plains</a> <a target=mainpane href="beach.php">beach</a> <a target=mainpane href="woods.php">woods</a> <a target=mainpane href="island.php">island</a><br><a href="#" onClick='javascript:window.open("doc.php?topic=home","","height=400,width=550,scrollbars=yes,resizable=yes");'>documentation</a> <a target=mainpane href="adminmail.php">report bug</a> <a target=_blank href="http://store.asymmetric.net/">store</a> <a href="#" onClick='javascript:window.open("donatepopup.php","");'>donate</a> <a href="#" onClick='javascript:window.open("http://www.kingdomofloathing.com/radio.php","");'>radio</a> <a target=mainpane href="community.php">community</a> <a target=mainpane href=peevpee.php>pvp</a> </div>	<span id='skillbit' style='display: none'>
	<iframe name='skillpane' id='skillpane' src='blank.html'>
	</iframe>
	</span>
	</td><td><table cellpadding=0 id="themoons"><tr><td width=15></td><td align=center valign=top align=right class=tiny><img src="/images/itemimages/moon4a.gif"  alt="Ronald, Waxing Gibbous, with a small dark moon passing in front on the left" title="Ronald, Waxing Gibbous, with a small dark moon passing in front on the left" ><td width=20></td><td align=center valign=top align=left class=tiny><img src="/images/itemimages/moon6.gif" alt="Grimace, Waning Gibbous" title="Grimace, Waning Gibbous" ><td width=15></td></tr><tr><td></td><td align=center class=tiny>Ronald</td><td></td><td align=center class=tiny>Grimace</td><td></td></tr></table><!--<td width=15></td>-->
</td>
<!--<td width=20 align=center valign=center><img src="/images/otherimages/newmoonpad.gif"></td>-->

<!--
<td width=20></td>
<td class=tiny align=center valign=center>
All material Copyright © 2010,<br><a target="_blank" href="http://asymmetric.net">Asymmetric Publications, LLC</a>
</td>
-->
<td valign=center align=center class=tiny><div id='kolmafia' style='margin: 0px; padding: 0px; display: inline'><table cellpadding=0 cellspacing=0><tr><td align=left valign=center class=tiny><select onchange='if (this.selectedIndex>0) { top.mainpane.location=this.options[this.selectedIndex].value; this.options[0].selected=true;}'><option>-run script-</option><option value='relay_breakables.ash'>breakables</option><option value='relay_Guide.ash'>Guide</option><option value='relay_OCD_dB_Manager.ash'>OCD dB Manager</option><option value='relay_Psychose-a-Matic.ash'>Psychose-a-Matic</option><option value='relay_test.ash'>test</option><option value='relay_Universal_Recovery.ash'>Universal Recovery</option><option value='relay_WOSSMAN.ash'>WOSSMAN</option></select></td><td align=left valign=center>[<a href="topmenu.php">re</a>]</td></tr></table></div></td></tr>
</table>
</center>
</div>
</center>
</body>
</html>
 

Bale

Minion
So maybe it has something to do with the placement of the script-menu having changed slightly? If so, is there something you can do to ensure that it is always at the far right, as I think it used to be? Would this on second thought have been an issue I rather should have taken up in the "new content" thread? If so, I am sorry for any inconvenience this thread may have caused you.

I'm just adding the clan drop down above the relay script drop-down. If mafia moves the relay script drop-down back to the right, then I'll be perfectly happy to go with it. If you want it there, then ask politely for it to be moved. Some people have reacted to the adjustment of the topmenu as an emotionally charged issue, so please be polite.

As for the "links get kinda squashed together," I believe you're referring to that unfortunate line break after the VIP room. I'm glad you brought that to my attention. Looking over the html after removing my , it seems that KoL has made a troublesome change to the link-style top menu. Previously, all the links were separated by non-breaking spaces. KoL changed some of those non-breaking spaces to regular spaces that could be broken onto new lines. URGH! I'll have to think about what I can do about this. Obviously I cannot simply change every space to a non-breaking space so I'll need to find a way of identifying only the spaces that need to be changed... Or maybe a style alteration can handle the problem? I just don't know.
 

Veracity

Developer
Staff member
I'll point out that we add TWO dropdowns to the "normal" and "compact" topmenus: the "quick scripts" dropdown and the "relay scripts" dropdown.
 

Bale

Minion
Urm. I suppose I ought to figure out what the quick scripts dropdown looks like and how to co-operate with that. How do I add a simple quick script?
 

ereinion

Member
Thanks for your reply!

Hmm, that does sound rather tricky, I hope you manage to come up with a good solution. From what I can see, it seems that within the div "yep", which as far as I can tell is what contains the links, you replace every whitespace which is between a "</a>" and a "<a" with &nbsp? I haven't really got a good enough understanding of html to say that this is what needs to be done, but I am afraid that is the best I can do. I'm sorry that I can't be of any more help, I'm afraid that I have trouble merely reading what the html does :p

Oh, and there is also another line, which isn't visible in the frame which contains a few more links. You can probably see that the icons for hobopolis and the florist friars exteds a bit further down too.
 

lostcalpolydude

Developer
Staff member
Urm. I suppose I ought to figure out what the quick scripts dropdown looks like and how to co-operate with that. How do I add a simple quick script?

Preferences -> Relay Browser -> "Add quick script links to menu bar (see Links tab)". Then you go to the Script Buttons tab (some text needs updating, apparently) and you can add things to go in that menu, with a few items there by default. I've looked at the Script Buttons section several times before (back before Preferences was rearranged, and I'm guessing it was called Links back then), and I didn't know what it was for until I looked over the recent code changes in mafia; I wonder if there's a good way to make that clearer.
 

Veracity

Developer
Staff member
Go to Preferences/Script Buttons

I have the defaults:

restore hp
restore mp

Here's what it looks like for me:

topmenu.png
 

Bale

Minion
ereinion: Thanks. The solution was as simple as you suggested. Update the script and let me know if you like the result.

lostcalpolydude & Veracity: Thanks. I tried that and was very unhappy. I'm going to have to do some work to make my script play nicely with the scripts menu. I'll tend to that later. Unfortunately if this takes me more than a day I'm not likely to have the time for this until Monday since I'm going away for a trip. :( :)
 

Bale

Minion
There was a simple fix for the quick scripts drop-down. I just check relayAddsQuickScripts and if there's a quick scripts drop-down I move my whitelist drop-down to the left side.

I've committed that fix.
 

ereinion

Member
Yeah, it's much better now, though there still seems to be one linebreak which "shouldn't" be there in the last line of links, but at least I can see all of them now :). The change pushed the scripts menu further right too, so no need to make any requests in the new content thread, I guess.

stZCoXZ.png


Thanks for the quick fix!
 

digitrev

Member
So about awesomemenu.php. It replaces campground.php with campground.php?action=bookshelf, which is normally great, but less useful if you're planning on creating some custom camp actions in the menu. Can you make it so that it'll check to see if there's any action already set, and only replace if there isn't?

Thanks.
 

Winterbay

Active member
I quite like using the drop down menu (i.e. compact mode) and with the most recent update that looks like this:
Skärmdump 2014-08-06 23.36.49.png

Is there any way of making the topmenu part slightly bigger at least? And is there a good way of getting the clan dropdown to not overlap with the Clan dungeon and Florist friar images?
 

Bale

Minion
So about awesomemenu.php. It replaces campground.php with campground.php?action=bookshelf, which is normally great, but less useful if you're planning on creating some custom camp actions in the menu. Can you make it so that it'll check to see if there's any action already set, and only replace if there isn't?

Now that people have to create their own campground link do you think I should be doing it at all, for anyone? Or should I assume that if they want a link to cast bookshelf skills, they'd have made their own?


Is there any way of making the topmenu part slightly bigger at least? And is there a good way of getting the clan dropdown to not overlap with the Clan dungeon and Florist friar images?

I think some of your problem can be solved with KoL's options menu. Options -> Interface -> check "Use Short Character Pane (reload game to see change)"


Enjoy your trip!

Thank you. I'm leaving for Baltimore in the morning and returning Sunday night. I'll only be online sporadically within that range.
 
Top