From 9d2ecaa56d33d52a446168b1f33f1dd04283edbf Mon Sep 17 00:00:00 2001 From: duong Date: Tue, 17 Oct 2023 03:07:28 -0400 Subject: [PATCH] cats --- templates/index.html | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/templates/index.html b/templates/index.html index ed79af9..958f87b 100644 --- a/templates/index.html +++ b/templates/index.html @@ -206,16 +206,18 @@

Long-term Interests

.then(response => response.json()) .then(data => { for (let i = 0; i < data.length; i++){ - $('.ad').eq(i).html(` -
- ... -
-
-

${data[i].advertiser}

-

${data[i].adText}

+ fetch('https://cataas.com/cat?json=true').then(response => response.json()).then(cat => { + $('.ad').eq(i).html(` +
+ ... +
+
+

${data[i].advertiser}

+

${data[i].adText}

+
-
-
`); +
`); + }); } }); }