nike / Kamihime Project R - 1440x960 game window

// ==UserScript==
// @name         Kamihime Project R - 1440x960 game window
// @description  Increases game window size from 960x640 to 1440x960
// @updateURL    https://openuserjs.org/meta/nike/Kamihime_Project_R_-_1440x960_game_window.meta.js
// @license      MIT
// @match        *://osapi.nutaku.com/gadgets/ifr*
// @run-at       document-start
// ==/UserScript==
(function() {

    if (window.location.href.includes("gnkh-api-r.prod.nkh.dmmgames.com")) {
        var interval = setInterval(function() {
            if (document.getElementsByClassName("test-screen center-block")[0]) {
                clearInterval(interval);

                var testScreen = document.getElementsByClassName("test-screen center-block")[0]
                testScreen.style.width = "1460px"
                testScreen.style.paddingBottom = "50px"

                var gameOuter = document.getElementById("game-outer")
                gameOuter.style.width = "1440px"
                gameOuter.style.height = "960px"
                gameOuter.classList.remove("frame")
                
                var frameInterval = setInterval(()=> {
                    if(gameOuter.classList.contains("frame")) {
                        clearInterval(frameInterval)
                        gameOuter.classList.remove("frame")
                    }
                }, 10);

                var shield = document.getElementById("shield")
                shield.style.width = "1440px"
                shield.style.height = "960px"

                var game = document.getElementById("game")
                game.style.width = "1440px"
                game.style.height = "960px"
            }
        }, 10);
    }

})();