Попытался убрать баг, при котором если после / ввести что-либо, то в img src торчал HTML код

This commit is contained in:
B4D_US3R 2025-01-16 12:28:12 +05:00
parent 8b5d80e212
commit bcd81911cd

View file

@ -2,7 +2,7 @@ import axios from "axios";
let pictureId = document.getElementById("CatGirlPicture");
pictureId.onclick = function() {
axios.get(location.href + "rand").then(function (response) {
axios.get(location.protocol + "//" + location.host + "/rand").then(function (response) {
console.log(response.data)
document.getElementById("CatGirlPicture").setAttribute("src", response.data);
});