|
|
|
@ -1,11 +1,14 @@ |
|
|
|
|
$(document).ready(function () { |
|
|
|
|
function load() { |
|
|
|
|
$.ajax({ |
|
|
|
|
dataType: "json", |
|
|
|
|
url: "http://"+window.location.hostname+"/db.json", |
|
|
|
|
headers: { "Accept": "application/json"}, |
|
|
|
|
success: function (res) { |
|
|
|
|
let strCatalog = ""; |
|
|
|
|
let strSearch = document.getElementById("search").value; |
|
|
|
|
res.forEach(manga => { |
|
|
|
|
if (strSearch != "" && !manga["title"].toLowerCase().includes(strSearch.toLowerCase())) |
|
|
|
|
return; |
|
|
|
|
strCatalog += '<tr>\ |
|
|
|
|
<td class="cover">\ |
|
|
|
|
<img class="thumbnail" src="img/covers/'+manga["id"]+'.jpg"/>\ |
|
|
|
@ -26,5 +29,7 @@ $(document).ready(function () { |
|
|
|
|
document.getElementById("titles").innerHTML = strCatalog; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
$(document).ready(function () { |
|
|
|
|
load(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|