Added new files

This commit is contained in:
2024-07-27 00:25:21 +02:00
parent 2603d13c5c
commit 391c330de5
131 changed files with 1888 additions and 2824 deletions

24
oldprojects/cat/script.js Normal file → Executable file
View File

@@ -1,13 +1,13 @@
function getCat() {
fetch('https://api.thecatapi.com/v1/images/search')
.then(response => response.json())
.then(data => {
let catImg = document.getElementById('cat-img');
catImg.src = data[0].url;
catImg.width = 400;
catImg.height = 400;
})
.catch(error => {
console.error('Error fetching cat picture', error);
});
function getCat() {
fetch('https://api.thecatapi.com/v1/images/search')
.then(response => response.json())
.then(data => {
let catImg = document.getElementById('cat-img');
catImg.src = data[0].url;
catImg.width = 400;
catImg.height = 400;
})
.catch(error => {
console.error('Error fetching cat picture', error);
});
}