mirror of
https://github.com/Starlio-app/StarlioX
synced 2024-11-22 08:46:22 +03:00
delete garbage and add
This commit is contained in:
parent
5cdaa9630b
commit
3b14992b09
1 changed files with 3 additions and 5 deletions
|
@ -50,13 +50,13 @@ function Wallpaper(data) {
|
||||||
|
|
||||||
let button = document.querySelector(".modal-footer")
|
let button = document.querySelector(".modal-footer")
|
||||||
button.innerHTML = `
|
button.innerHTML = `
|
||||||
<button type="button" class="btn btn-primary" id="setWallpaper">Set Wallpaper</button>
|
<button type="button" class="btn btn-primary" id="setWallpaper">Set Wallpaper</button>
|
||||||
`
|
`
|
||||||
let setWallpaper = document.querySelector("#setWallpaper")
|
let setWallpaper = document.querySelector("#setWallpaper")
|
||||||
|
|
||||||
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",
|
||||||
|
|
Loading…
Add table
Reference in a new issue