IP.Chat - Auto-Resizing Popup

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==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);
}