Last active
August 7, 2019 14:29
-
-
Save hkneptune/a9f57257487306668af7228db5520ec9 to your computer and use it in GitHub Desktop.
NOWTV LIVE FULLSCREEN SCRIPT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name NOWTV-LIVE-FULLSCREEN | |
// @namespace https://neptuneli.com/ | |
// @version 1.0 | |
// @description NOWTV LIVE FULLSCREEN SCRIPT | |
// @author Neptune LI (@hkneptune) | |
// @match https://news.now.com/home/live | |
// @match https://news.now.com/home/live331a | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
setTimeout(function(){ | |
jQuery('body').append('<a href="javascript:void(0);" class="full-screen-button" title="Toggle Full Screen">X</a>'); | |
jQuery('.full-screen-button').css({'display':'block','position':'absolute','left':'5px','top':'6px','color':'#adadad','background-color':'#444','padding':'3px','font-size':'12px','width':'12px','height':'12px','text-align':'center','cursor':'pointer','z-index':'9999'}); | |
jQuery('.full-screen-button').on('click', function() { | |
jQuery(this).toggleClass('full-screen'); | |
if (jQuery('.full-screen-button').hasClass('full-screen')) { | |
jQuery('.liveFlashPlayer').css({'display':'block','width':'100%','height':'100%','position':'absolute','z-index':'9998','left':'0','top':'0'}); | |
jQuery('#liveVideo').width('100%').height('100%'); | |
} else { | |
jQuery('.liveFlashPlayer').css({'display':'block','width':'unset','position':'relation','z-index':'9998','left':'0','top':'0'}); | |
jQuery('#liveVideo').width('').height(''); | |
} | |
}); | |
}, 1000); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment