f0ckv1/s/shit.js

30 lines
807 B
JavaScript
Raw Normal View History

2016-11-06 01:11:53 +00:00
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;
}
}
2016-11-06 01:31:49 +00:00
if(document.readyState == 'complete' || document.readyState == 'loaded')
2016-11-06 01:11:53 +00:00
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 x = document.getElementById("player");
2016-11-06 01:34:48 +00:00
if(x) {
x.volume = 0.3;
}