From e3977f266d188b6a5a519ddcf74d5d4c56387a10 Mon Sep 17 00:00:00 2001 From: BuildTools Date: Tue, 24 Aug 2021 19:49:16 -0400 Subject: [PATCH] secrets --- webroot/js/main.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/webroot/js/main.js b/webroot/js/main.js index ec749c4..4454e8c 100644 --- a/webroot/js/main.js +++ b/webroot/js/main.js @@ -1,19 +1,19 @@ -$(function(){ - +$(function(){ + require('dotenv').config() var $main = $("#main"), $window = $( window ), mainHeight = $main.outerHeight(), mainWidth = $main.outerWidth(), mainAspect = 4/3, - resizeTimer; - + resizeTimer; + $(window).resize( function(e) { clearTimeout(resizeTimer); - resizeTimer = setTimeout(scaleWindow, 100); + resizeTimer = setTimeout(scaleWindow, 100); }); - + function scaleWindow() { var scale, windowAspect; @@ -27,8 +27,8 @@ $(function(){ $main.css({ transform: "translate(-50%, -50%) " + "scale(" + scale + ")" - }); - } + }); + } scaleWindow(); // init - -}); \ No newline at end of file + +});