kot aufräumen
This commit is contained in:
parent
b35a45f55b
commit
77450a379a
|
@ -12,25 +12,7 @@
|
|||
{% endfor %}
|
||||
</ul>
|
||||
<script src="./s/jquery-3.1.0.min.js"></script>
|
||||
<script>
|
||||
var load = false;
|
||||
$(()=>{
|
||||
$(window).scroll(()=>{
|
||||
if($(window).scrollTop() + $(window).height() >= $(document).height() - 130 && !load) {
|
||||
load = true;
|
||||
$.getJSON('./api/p/'+$('#posts').data('last'), (msg) => {
|
||||
var html = "";
|
||||
for(var i = 0; i < msg.items.length; i++)
|
||||
if(msg.items[i].id)
|
||||
html += "<li class=\"post\"><a href=\"./"+msg.items[i].id+"\" title=\""+msg.items[i].mime+"\"><img class=\"thumb\" src=\"./t/"+msg.items[i].id+".png\" /></a></li>\n";
|
||||
$('#posts').append(html);
|
||||
$('#posts').data('last', msg.last);
|
||||
load = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script src="./s/shit.js"></script>
|
||||
<script src="./s/theme.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -47,37 +47,7 @@
|
|||
<span id="themes">theme: </span>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function arrowKeys(e) {
|
||||
switch(e.keyCode) {
|
||||
case 39:
|
||||
var prev = document.getElementById('prev');
|
||||
if(prev) prev.click();
|
||||
break;
|
||||
case 37:
|
||||
var next = document.getElementById('next');
|
||||
if(next) next.click();
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(document.readyState == 'complete' || document.readyState == 'loaded')
|
||||
document.addEventListener('keydown', arrowKeys);
|
||||
else {
|
||||
if(/Chrome/i.test(navigator.userAgent))
|
||||
window.addEventListener('load', function () {
|
||||
document.addEventListener('keydown', arrowKeys);
|
||||
});
|
||||
else
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
document.addEventListener('keydown', arrowKeys);
|
||||
});
|
||||
}
|
||||
var video = document.getElementById('player');
|
||||
video.volume = 0.3;
|
||||
|
||||
var x = document.getElementById("player");
|
||||
x.volume = 0.3;
|
||||
</script>
|
||||
<script src="./s/shit.js"></script>
|
||||
<script src="./s/theme.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
30
s/shit.js
Normal file
30
s/shit.js
Normal file
|
@ -0,0 +1,30 @@
|
|||
function arrowKeys(e) {
|
||||
switch(e.keyCode) {
|
||||
case 39:
|
||||
var prev = document.getElementById('prev');
|
||||
if(prev) prev.click();
|
||||
break;
|
||||
case 37:
|
||||
var next = document.getElementById('next');
|
||||
if(next) next.click();
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(document.readyState == 'complete' || document.readyState ==
|
||||
'loaded')
|
||||
document.addEventListener('keydown', arrowKeys);
|
||||
else {
|
||||
if(/Chrome/i.test(navigator.userAgent))
|
||||
window.addEventListener('load', function () {
|
||||
document.addEventListener('keydown', arrowKeys);
|
||||
});
|
||||
else
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
document.addEventListener('keydown', arrowKeys);
|
||||
});
|
||||
}
|
||||
var video = document.getElementById('player');
|
||||
video.volume = 0.3;
|
||||
|
||||
var x = document.getElementById("player");
|
||||
x.volume = 0.3;
|
Loading…
Reference in New Issue
Block a user