From d101cd9ff083ae099c75bb59f47dda63b6511eab Mon Sep 17 00:00:00 2001 From: firebingo Date: Wed, 23 May 2018 19:24:44 -0700 Subject: [PATCH] Hack for firefox52 weird ui sizing thing. Made only mission available basa's birthday. --- Css/main.css | 2 +- Js/Main.js | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Css/main.css b/Css/main.css index d4471e5..0a80c0d 100644 --- a/Css/main.css +++ b/Css/main.css @@ -72,7 +72,7 @@ body { margin: 0; } #text-container #dialog-box { box-sizing: border-box; position: absolute; bottom: 0; text-align: left; width: 100%; height: 200px; } -#text-container #main-ui-img { width: 100%; transition: opacity 0.1s; } +#text-container #main-ui-img { width: 100%; height:100%; transition: opacity 0.1s; } #dialog-box { color: white; font-weight: bold; text-shadow: 1px 1px 6px black; transition: opacity 0.1s; } diff --git a/Js/Main.js b/Js/Main.js index 0d3d6e1..1e9b42d 100644 --- a/Js/Main.js +++ b/Js/Main.js @@ -71,6 +71,9 @@ function onAllLoaded(success) { onWindowResize(); window.addEventListener("resize", onWindowResize); checkQueryParameters(); + //Firefox52 hack for weird sizing thing. + document.body.style.zoom = 1.0000001; + setTimeout(function(){document.body.style.zoom = 1;},50); }, 0); } @@ -120,7 +123,8 @@ function buildMissionSelectList() { } else { let m = utage.missionsList[i]; //Only allowing 3.5 right now - if(!(m.MstId >= 104001 && m.MstId <= 104008)) { + //if(!(m.MstId >= 104001 && m.MstId <= 104008)) { + if(m.MstId !== 202070) { continue; } opt.setAttribute('value', m.MstId); @@ -354,5 +358,8 @@ function onWindowResize(event) { let res = commonFunctions.getNewResolution(baseDimensions, screenw, screenh, topContainerHeight); player.updateResolution(res); document.getElementById('app-container').style.cssText = `width: ${res.width}px; height: ${res.height}px;`; + //Firefox52 hack for weird sizing thing. + document.body.style.zoom = 1.0000001; + setTimeout(function(){document.body.style.zoom = 1;},50); }, 400); } \ No newline at end of file