yt.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. $(function () {
  2. var timer;
  3. var fadeInBuffer = false;
  4. $(document).mousemove(function () {
  5. if (!fadeInBuffer) {
  6. if (timer) {
  7. //console.log("clearTimer");
  8. clearTimeout(timer);
  9. timer = 0;
  10. }
  11. //console.log("fadeIn");
  12. $('.fade-object').fadeIn();
  13. $('html').css({
  14. cursor: ''
  15. });
  16. } else {
  17. fadeInBuffer = false;
  18. }
  19. timer = setTimeout(function () {
  20. //console.log("fadeout");
  21. $('.fade-object').fadeOut()
  22. $('html').css({
  23. cursor: 'url(http://www.javascriptkit.com/dhtmltutors/cursor-hand.gif), auto'
  24. });
  25. fadeInBuffer = true;
  26. }, 5000)
  27. });
  28. });
  29. if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
  30. // document.getElementById('pl-mobile').style.display = 'block';
  31. setTimeout(function() {
  32. // window.location.replace('');
  33. }, 10000);
  34. }
  35. else {
  36. window.onYouTubeIframeAPIReady = function() {
  37. // lb.obj = new lb.player();
  38. }
  39. }
  40. function Q(id){
  41. return document.querySelector(id);
  42. }
  43. Q("#go").onload=function(){
  44. if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
  45. //window.location.replace('');
  46. Q("#pl-player").style.display='block';
  47. lb.obj = new lb.player();
  48. }else{
  49. //Q("#step_one").style.display='none';
  50. Q("#pl-player").style.display='block';
  51. lb.obj = new lb.player();
  52. }
  53. }