polczat full frame fix

Fixes the applet initial size and resize on all browsers

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==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";