Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// ==UserScript==
// @name Kongregate Larger Game Size
// @namespace http://tampermonkey.net/
// @version 0.4
// @author Some Ball -1
// @include http://www.kongregate.com/games/koalabeast/tagpro*
// @grant none
// ==/UserScript==
function wait() {
if(!window.GameIframe || !window.GameIframe.prototype.setSizeToMaxForWindow) return setTimeout(wait);
let chatbox = document.getElementById('chat_container_cell');
chatbox.parentNode.removeChild(chatbox);
let heightPadding = 0;
var sstmfw = window.GameIframe.prototype.setSizeToMaxForWindow;
window.GameIframe.prototype.setSizeToMaxForWindow = function() {
let stuff = [$("flashframecontent"), $("maingamecontent"), $("gameholder"), $("game"), $("gameiframe"), document.getElementsByClassName('game_table')[0]];
for(var i = 0;i < stuff.length;i++) {
stuff[i].style.width = $(stuff[i]).style.height = '100%';
}
let maingame = $("maingame");
maingame.style.margin = 0;
maingame.style.width = (window.document.body.clientWidth-20)+'px'; //clientWidth instead of window.innerWidth to account for scrollbar, -20 for the 10px padding on either side
maingame.style.height = (window.innerHeight-heightPadding)+'px';
};
}
wait();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.