您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
This script allows you to watch and download videos on Video Mediaset.
当前为
// ==UserScript== // @name Video.mediaset.it native video player and direct links // @namespace http://andrealazzarotto.com // @description This script allows you to watch and download videos on Video Mediaset. // @include http://www.video.mediaset.it/video/* // @include http://www.video.mediaset.it/player/playerIFrame* // @version 5.2.2 // @require http://code.jquery.com/jquery-latest.min.js // @grant GM_xmlhttpRequest // @license GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html // ==/UserScript== var boxStyle = function(selector, color) { $(selector).css({ 'padding': '.5em', 'margin': '1em 4em', 'border': '1px solid #888', 'text-align': 'center', 'background-color': color, 'box-shadow': '0 .5em 1.5em 0 rgba(0, 0, 0, .7)', }); } // wrapper for non-Mozilla browsers if(!exportFunction) var exportFunction = function(a,b) {return a;}; $(document).ready(function(){ unsafeWindow.CDN_SELECTOR_URL = "http://video.lazza.dk/vd.php?id="; // kill ads unsafeWindow.adsEnabled = false; // load screenfull library $.getScript("https://cdn.rawgit.com/sindresorhus/screenfull.js/gh-pages/dist/screenfull.min.js"); var isIframe = (window.location.href.indexOf("playerIFrame") > 0); var id = 0; if(isIframe) id = window.location.href.split("id=")[1].split("&")[0]; else { var chunks = window.location.pathname.split("/"); id = chunks[4]; } GM_xmlhttpRequest({ method: 'GET', url: 'http://video.lazza.dk/vd.php?id='+id, headers: { 'Accept': 'application/atom+xml,application/xml,text/xml' }, onload: function(responseDetails) { var r = responseDetails.responseText; var doc = $.parseXML(r); $xml = $( doc ); var videos = $xml.find("video"); var vlinks = []; // parse video URLs videos.each(function (i) { var url = $( videos.get(i) ).attr("src"); var type = url.slice(-3); var name = ""; switch(type) { case "est": name = "Smooth streaming"; break; case "pl)": name = "Apple streaming"; break; case "flv": name = "Video FLV"; break; case "f4v": name = "Video F4V"; break; case "mp4": name = "Video MP4"; break; case "wmv": name = "Video WMV"; break; } vlinks.push( { na: name, url: url } ); }); // display video URLs num = vlinks.length; if(isIframe) $('<div id="video-links">').appendTo('body'); else $('<div id="video-links">').appendTo('#box-apertura'); boxStyle('#video-links', '#cfc'); for(var i=0; i<num; i++) { var o = vlinks[i]; var s = '<a href="'+o.url+'">'+o.na+'</a>'; $(s).appendTo('#video-links'); if(i!=num-1) $('<span> | </span>').css('color','#888').appendTo('#video-links'); } if(isIframe) { $('#video-links').css({ 'position': 'absolute', 'bottom': '1.5em', 'left': '10%', 'right': '10%', 'font-size': '.75em' }) .append("<span id='close'>×</span>"); $("#close").css({ 'font-weight': 'bold', 'color': '#777', 'position': 'absolute', 'right': '1em', 'cursor': 'pointer' }).click(function() { $("#video-links").fadeOut(); }); } $("#spinner").remove(); unsafeWindow.count = 0; setTimeout(function() { unsafeWindow.count++; if((unsafeWindow.myPlayer != null)) { unsafeWindow.myPlayer.wwww = $("#myVideoContainer").css('width'); unsafeWindow.myPlayer.hhhh = $("#myVideoContainer").css('height'); unsafeWindow.myPlayer.mediaPlugin.player.controlStripPlugin.enterFullScreen = exportFunction(function() { unsafeWindow.screenfull.request($("#myVideoContainer")[0]); }, unsafeWindow); unsafeWindow.myPlayer.mediaPlugin.player.controlStripPlugin.exitFullScreen = exportFunction(function() { unsafeWindow.screenfull.exit($("#myVideoContainer")[0]); }, unsafeWindow); $("#myVideoContainer .pf-controls").css('cursor', 'default'); unsafeWindow.screenfull.onchange = exportFunction(function() { if (unsafeWindow.screenfull.isFullscreen) { $("#myVideoContainer").addClass("pf-full-browser"); $("#myVideoContainer, #myVideoContainer video").css({ 'width': '100%', 'height': '100%', 'cursor': 'none' }); } else { $("#myVideoContainer").removeClass("pf-full-browser"); $("#myVideoContainer, #myVideoContainer video").css({ 'width': unsafeWindow.myPlayer.wwww, 'height': unsafeWindow.myPlayer.hhhh, 'cursor': 'auto' }); } }, unsafeWindow); } else { if(unsafeWindow.count < 20) setTimeout(arguments.callee, 500); } }, 500); } }); });
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址