HomeMediacenter/js/index.js

22 lines
758 B
JavaScript
Raw Normal View History

Req.ready(() => {
Req.post("php/index.php", "action=getMovies&test=2", function (dta) {
2020-03-31 09:44:52 +00:00
console.log(dta);
2020-03-31 17:22:08 +00:00
for (const ii in dta.data) {
document.getElementsByClassName("mediawrapper").item(0).insertAdjacentHTML('beforeend', `
2020-04-01 19:53:36 +00:00
<div class="mediatile">${dta.data[ii].url}</div>`); // <video controls src="${dta.data[ii].url}"></video>
2020-03-31 17:22:08 +00:00
}
2020-03-31 09:44:52 +00:00
});
2020-04-01 19:53:36 +00:00
Req.post("php/index.php", "action=storePic", function (dta) {
2020-04-01 19:53:36 +00:00
console.log(dta);
});
Req.post("php/index.php", "action=readPic", function (dta) {
2020-04-01 19:53:36 +00:00
console.log(dta);
document.getElementById("tempici").src = dta.data;
2020-04-01 19:53:36 +00:00
});
Req.post("php/index.php", "action=getDbSize", function (dta) {
2020-04-01 19:53:36 +00:00
console.log(dta);
});
2020-03-31 09:44:52 +00:00
});