Merge branch 'f0ckdev' into 'master'

hab aufgereumt mamer

See merge request !26
This commit is contained in:
noxy 2016-11-06 01:22:27 +00:00
commit 11b96d9ffc
4 changed files with 53 additions and 52 deletions

View File

@ -12,25 +12,8 @@
{% 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/theme.js"></script>
<script src="./s/scroller.js"></script>
<script src="./s/shit.js"></script>
<script src="./s/theme.js"></script>
</body>
</html>

View File

@ -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/theme.js"></script>
<script src="./s/shit.js"></script>
<script src="./s/theme.js"></script>
</body>
</html>

18
s/scroller.js Normal file
View File

@ -0,0 +1,18 @@
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;
});
}
});
});

30
s/shit.js Normal file
View 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;