Use the Fetch API instead of PrototypeJS
This commit is contained in:
parent
c622ada0df
commit
0876fc3c2e
@ -4,9 +4,6 @@
|
||||
<title>YouP0m Administration</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" media="all" href="/css/style.css">
|
||||
<script type="text/javascript" src="/js/prototype.js"></script>
|
||||
<script type="text/javascript" src="/js/youp0m.js"></script>
|
||||
<script type="text/javascript" src="/js/youp0m-admin.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Welcome on YouP0m!</h1>
|
||||
@ -19,5 +16,7 @@
|
||||
<script type="text/javascript">
|
||||
document.write("<h2>We are loading the newest cute pictures for you, please wait…</h2>");
|
||||
</script>
|
||||
<script type="text/javascript" src="/js/youp0m.js"></script>
|
||||
<script type="text/javascript" src="/js/youp0m-admin.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -50,6 +50,11 @@ function show_picture(id) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (picts.length == 0) {
|
||||
document.body.innerHTML = '<h1>Welcome on YouP0m!</h1><h2>There is no image currently, come back soon!</h2>';
|
||||
return
|
||||
}
|
||||
|
||||
if (id == null || id == "")
|
||||
id = picts[Math.floor(Math.random() * picts.length)].name;
|
||||
|
||||
@ -112,7 +117,7 @@ function display_picture(pict, next) {
|
||||
}
|
||||
|
||||
function display_error(msg) {
|
||||
$$("body")[0].innerHTML = '<h1>An error occurs</h1><h2>' + msg + '</h2>';
|
||||
document.body.innerHTML = '<h1>An error occurs</h1><h2>' + msg + '</h2>';
|
||||
}
|
||||
|
||||
function sync() {
|
||||
|
Loading…
Reference in New Issue
Block a user