Video Repubblica in HTML5

Allows to watch MP4 videos on the Repubblica.it website with a HTML5 container

当前为 2017-10-16 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Video Repubblica in HTML5
  3. // @namespace http://andrealazzarotto.com/
  4. // @version 1.0.1
  5. // @description Allows to watch MP4 videos on the Repubblica.it website with a HTML5 container
  6. // @author Andrea Lazzarotto
  7. // @match https://video.repubblica.it/*
  8. // @copyright 2012+, Andrea Lazzarotto - GPLv3 License
  9. // @require http://code.jquery.com/jquery-latest.min.js
  10. // @license GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html
  11. // ==/UserScript==
  12.  
  13. $(document).ready(function() {
  14. var contentURL = $('meta[itemprop=contentUrl]').attr('content');
  15. if(!!contentURL && contentURL.indexOf('.mp4') > 0)
  16. $('#playerCont').empty().append('<video src="' + contentURL + '" controls autoplay width="100%" height="100%"></video>');
  17. var isEmbed = (location.href.indexOf("repubblica.it/embed") > 0 && !!unsafeWindow.player_1);
  18. if (isEmbed && !!unsafeWindow.player_1.model.formats.mp4) {
  19. $('#player').empty().append('<video src="' + unsafeWindow.player_1.model.formats.mp4 + '" controls autoplay style="width: 100%; height: 100vh"></video>');
  20. $("body").css("overflow", "hidden");
  21. }
  22. });

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址