delete garbage and add

This commit is contained in:
Данил 2022-09-19 13:25:20 +03:00
parent 5cdaa9630b
commit 3b14992b09

View file

@ -56,7 +56,7 @@ function Wallpaper(data) {
if(data[id-1].media_type === "image") { if(data[id-1].media_type === "image") {
img.innerHTML = ` img.innerHTML = `
<img src="${data[id - 1].url}" alt="${data[id - 1].title}" class="card-img-top"> <img src="${data[id - 1].url}" alt="${data[id - 1].title}" class="card-img">
<p>Author: <strong>${data[id - 1].copyright}</strong></p> <p>Author: <strong>${data[id - 1].copyright}</strong></p>
<p>Date of shooting: <strong>${data[id - 1].date}</strong></p> <p>Date of shooting: <strong>${data[id - 1].date}</strong></p>
<p>Explanation: <strong>${data[id - 1].explanation}</strong></p> <p>Explanation: <strong>${data[id - 1].explanation}</strong></p>
@ -95,8 +95,6 @@ function Wallpaper(data) {
` `
setWallpaper.addEventListener("click", function () { setWallpaper.addEventListener("click", function () {
console.log(`https://img.youtube.com/vi/${data[id - 1].url.slice(30,41)}/maxresdefault.jpg`);
$.ajax({ $.ajax({
url: `http://localhost:8080/api/update/wallpaper`, url: `http://localhost:8080/api/update/wallpaper`,
type: "POST", type: "POST",