polczat full frame fix

Fixes the applet initial size and resize on all browsers

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 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.

(У мене вже є менеджер скриптів, дайте мені встановити його!)

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==
// @author         Endmost
// @name           polczat full frame fix
// @namespace      endmost
// @description    Fixes the applet initial size and resize on all browsers
// @version        1.0.1

// @match http://www.polczat.com.pl/*
// @match http://polczat.com.pl/*
// ==/UserScript==

function addGlobalStyle(css) {
    var head, style;
    head = document.getElementsByTagName('head')[0];
    if (!head) { return; }
    style = document.createElement('style');
    style.type = 'text/css';
    style.innerHTML = css;
    head.appendChild(style);
}

addGlobalStyle("html{ height: 100%; } body { height: 100%; margin: 0px; } applet { display: block; }");

var chatApplet = document.getElementsByTagName("applet")[0];
chatApplet.style.width = "100%";
chatApplet.style.height = "100%";

var chatParent = chatApplet.parentElement;
chatParent.style.height = "100%";

// Misc changes, remove the ugly website title
document.title = "polczat";