Skip to content

Instantly share code, notes, and snippets.

@catalyst518
Created December 2, 2016 17:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save catalyst518/f8c9a854c258974f05cdf99a875bfce1 to your computer and use it in GitHub Desktop.
Save catalyst518/f8c9a854c258974f05cdf99a875bfce1 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Kongregate Larger Game Size
// @namespace http://tampermonkey.net/
// @version 0.3
// @description Maximize the viewport
// @author Some Ball -1, Catalyst
// @include http://www.kongregate.com/games/koalabeast/tagpro*
// @grant none
// ==/UserScript==
function wait() {
if(!window.GameIframe || !window.GameIframe.prototype.setSizeToMaxForWindow) return setTimeout(wait);
let width = window.innerWidth;
let height = window.innerHeight;
var sstmfw = window.GameIframe.prototype.setSizeToMaxForWindow
window.GameIframe.prototype.setSizeToMaxForWindow = function() {
this.config.max_game_width = width;
this.config.max_game_height = height;
return sstmfw.apply(this,arguments);
}
}
wait();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment