Huomao html5 player

火猫全站启用html5播放器

  1. // ==UserScript==
  2. // @name Huomao html5 player
  3. // @namespace https://greasyfork.org/
  4. // @description 火猫全站启用html5播放器
  5. // @include http://www.huomao.com/*
  6. // @include https://www.huomao.com/*
  7. // @version 1.1
  8. // @grant none
  9. // ==/UserScript==
  10. (function() {
  11.  
  12. var flashUrl = location.href;
  13. var normalUrl = /^https?:\/\/www\.huomao\.com\/(\d+)$/ , topicUrl = /^https?:\/\/www\.huomao\.com\/zt\/(\w*)\.html\?room_number=(\d+)$/;
  14. if(normalUrl.test(flashUrl)){
  15. location.href = "?h5player";
  16. }else if(topicUrl.test(flashUrl)){
  17. location.href = "#h5player";
  18. }else{
  19. $(document).ready(function(){
  20. var delLoginPopItvl = setInterval(function(){
  21. if($('#stream-delay-tip.show').length > 0){
  22. $('#stream-delay-tip.show').remove();
  23. clearInterval(delLoginPopItvl);
  24. }
  25. }, 1000);
  26. });
  27. }
  28. })();