You can accomplish this by putting a div element around the playlist table. Assign it a unique id (I use "playlist"), so that it looks like this:
<div id="playlist">
<table id="pl">
[PLAYLIST]
...
</table>
</div>
Now add the following JavaScript function to the JavaScript section in the HTML head:
function fit() {
var playlist = document.getElementById('playlist');
playlist.style.position = 'static'; // important for the onresize event
var top = playlist.offsetTop;
var left = playlist.offsetLeft;
playlist.style.overflowY = 'auto';
playlist.style.top = top + 'px';
playlist.style.left = left + 'px';
playlist.style.right = left + 'px';
playlist.style.bottom = '8px'; // fit this to your taste
playlist.style.position = 'absolute';
}
To make sure it is executed every time the page (re)loads or is resized, the body element has to be modified this way:
<body onload="mouse_capture_init(); fit();" onresize="fit();">