From 6e2811773af62e7b3483d2240ce4ff9678a3681f Mon Sep 17 00:00:00 2001 From: Christopher Date: Thu, 1 Feb 2024 03:15:39 +0100 Subject: [PATCH] =?UTF-8?q?Co=C5=9B=20si=C4=99=20popsu=C5=82o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/script.js b/script.js index 44136b6..0c6db9c 100644 --- a/script.js +++ b/script.js @@ -1,10 +1,10 @@ -if(getCookie("api") == "") - addApi(); - let api = getCookie("api") != "" ? getCookie("api") : ""; let city = getCookie("city") != "" ? getCookie("city") : "3093133"; let type = getCookie("type") != "" ? getCookie("type") : "id"; +if(getCookie("api") == "") + addApi(); + function call(){ let api_call = `https://api.openweathermap.org/data/2.5/weather?${type}=${city}&appid=${api}&units=metric&lang=pl`;