Fullscreen VoiceTube

Make VoiceTube Video FullScreen !

目前为 2015-10-04 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name Fullscreen VoiceTube
  3. // @namespace fullscreen.voicetube
  4. // @description Make VoiceTube Video FullScreen !
  5. // @include https://tw.voicetube.com/*
  6. // @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js
  7. // @version 1
  8. // @grant none
  9. // @icon http://tw.blog.voicetube.com/wp-content/uploads/2014/07/unnamed-2.png
  10. // ==/UserScript==
  11.  
  12. jQuery.noConflict()
  13.  
  14. if (location.pathname.search(/videos/) >= 0) {
  15. var VideoPATH = location.pathname
  16. var VideoID = VideoPATH.substring(VideoPATH.indexOf("s/") + 2, VideoPATH.indexOf("s/") + 7)
  17. var EmbedURL = 'https://tw.voicetube.com/embed/' + VideoID
  18. jQuery('#embed-section').append('<a href="javascript:;" id="fullscreenBtn">&nbsp;全螢幕播放</a>')
  19. jQuery('#fullscreenBtn').click(function() {
  20. window.open(EmbedURL, '_blank')
  21. })
  22. } else if (location.pathname.search(/embed/) >= 0) {
  23. var browserHeight = jQuery(window).height()
  24. var YTContainerHeight = browserHeight * 0.85
  25. jQuery('#youtube').css("height", YTContainerHeight + 'px')
  26. jQuery('#caption_block').css({
  27. "font-size": "200%",
  28. "line-height": "150%"
  29. })
  30. };