Feature - Implemented Tiny feature request: Retain frame size

Dentarthurdent

New member
I have "Remember the size of the character pane and chat" turned on in KoL options. The size of the charpane does not persist, however, when I log in through Mafia. Any chance it could be made to do so?
 

xKiv

Active member
Does rememberDesktopSize do what you want or are you asking for something else?

That's for kolmafia itself.
"Remember the size of the character pane and chat" refers to the "native" iframes in (relay) browser.
I think mafia has prevented that from working as far as I can remember, but take that with a mountain of salt.
 

Veracity

Developer
Staff member
I am unable to see any difference in what KoL sends to the browser with or without that option checked.

Here is what KoL sends with the option un-checked:

Code:
<html><head><title>The Kingdom of Loathing</title><script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-47556088-1', 'kingdomofloathing.com');ga('send', 'pageview');</script></head><frameset id=rootset cols="200,3*,*"><frame name=charpane src="charpane.php"></frame><frameset id=mainset rows="50,*"><frame name=menupane src="topmenu.php" scrolling=no></frame><frame name=mainpane src="main.php"></frame></frameset><frame name=chatpane src="chatlaunch.php"></frame></frameset></html>
and here is how we transform it before sending it to the browser:

Code:
<html><head><title>The Kingdom of Loathing</title><script language="Javascript" src="/basics.js"></script><link rel="stylesheet" href="/basics.1.css" /></head><frameset id=rootset cols="200,3*,*"><frame name=charpane src="charpane.php"></frame><frameset id=mainset rows="50,*"><frame name=menupane src="topmenu.php" scrolling=no></frame><frame name=mainpane src="main.php"></frame></frameset><frame name=chatpane src="chatlaunch.php"></frame></frameset><script src="/onfocus.1.js"></script></html>
1) We remove the google malware
2) We tell the browser to fetch basics.js and basics.css
3) We tell the browser to load onfocus.js

Here is what KoL sends with the option checked:

Code:
<html><head><title>The Kingdom of Loathing</title><script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-47556088-1', 'kingdomofloathing.com');ga('send', 'pageview');</script></head><frameset id=rootset cols="200,3*,*"><frame name=charpane src="charpane.php"></frame><frameset id=mainset rows="50,*"><frame name=menupane src="topmenu.php" scrolling=no></frame><frame name=mainpane src="main.php"></frame></frameset><frame name=chatpane src="chatlaunch.php"></frame></frameset></html>
and here is how we modify it:

Code:
<html><head><title>The Kingdom of Loathing</title><script language="Javascript" src="/basics.js"></script><link rel="stylesheet" href="/basics.1.css" /></head><frameset id=rootset cols="200,3*,*"><frame name=charpane src="charpane.php"></frame><frameset id=mainset rows="50,*"><frame name=menupane src="topmenu.php" scrolling=no></frame><frame name=mainpane src="main.php"></frame></frameset><frame name=chatpane src="chatlaunch.php"></frame></frameset><script src="/onfocus.1.js"></script></html>
I see no difference whatsoever in what KoL is transmitting to the browser. I also have no idea how framesets work and how you can specify the width of frames within them, but I'm not seeing anything in the charpane or chatpane frame to specify the width, whether or not the option is checked.

How is that option supposed to work in a vanilla browser?
 

Veracity

Developer
Staff member
Interesting. Cookies are n the headers sent by KoL. When I turned off the "save the frame size" setting, KoL returned the following cookies in the response to game.php:

Code:
Field: Set-Cookie = [charpwd=deleted; expires=Sun, 23-Feb-2014 16:33:32 GMT, chatpwd=deleted; expires=Sun, 23-Feb-2014 16:33:32 GMT]
I'm not seeing where it sends back "charpwd" or "chatpwd" with some other value.

It seems that we are not necessarily passing all the cookies that KoL uses back and forth between KoL and the browser. We definitely pick and choose what headers we send to KoL; we do not automatically pass everything the browser sends up to KoL, and vice versa, I think.

I think that if we are operating correctly as an HTTP proxy, we need to do a better job with cookies, at least.
 

Dentarthurdent

New member
Cool, thanks!

I recently moved and my new internet provider is breaking executable downloads somehow. I'll be back on the newest version as soon as I can figure that weirdness out.
 
Top