IP.Chat - Auto-Resizing Popup

Automatically resizes the chat container to fill the window when in pop-up mode.

Ekde 2014/05/13. Vidu La ĝisdata versio.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name	IP.Chat - Auto-Resizing Popup
// @namespace	Makaze
// @description	Automatically resizes the chat container to fill the window when in pop-up mode.
// @include	*
// @grant	none
// @version	1.0
// ==/UserScript==

if (document.body.id === 'ipboard_body' && document.getElementById('storage_chatroom') != null && window.location.href.match(/_popup=1/)) {
	document.getElementById('messages-display').style.transition = 'height 50ms ease-in-out';

	document.getElementById('messages-display').style.height = window.innerHeight - 30 - 121 + 'px';

	window.addEventListener('resize', function() {
		document.getElementById('messages-display').style.height = window.innerHeight - 30 - 121 + 'px';
	}, false);
}