游民星空去除视频跳转

去除游民新闻中的视频跳转!

目前為 2016-11-16 提交的版本,檢視 最新版本

// ==UserScript==
// @name         游民星空去除视频跳转
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  去除游民新闻中的视频跳转!
// @author       CrazyMelody
// @match        http://www.gamersky.com/news*
// @require      http://code.jquery.com/jquery-latest.js
// ==/UserScript==

(function() {
    'use strict';
    var width = 600;
    var height = 500;
    var $div = $(".VideoJumper");
    if($div.size()>0){
        var reg,vid,html;
        console.info($div.size());
        $div.each(function(i,e){
            $div.css({width:"600px",height:"500px"});
            var href = $(e).find("a").attr("href");
            console.info("获取视频地址%s",href);
            if(href.indexOf("youku")>0){
	            reg = /.*id_(.*)==.*/;
	            vid = reg.exec(href)[1];
	            html = "<embed src='http://player.youku.com/player.php/sid/"+vid+"==/v.swf' allowFullScreen='true' quality='high' width='"+width+"' height='"+height+"' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash'></embed>";
	            $(e).html(html);
            }
            if(href.indexOf("letv")>0){
            	reg = /.*\?(.*)&width.*/;
            	vid = reg.exec(href)[1];
            	html = "<embed name='cloudPlayer14792694541520' src='http://yuntv.letv.com/bcloud.swf'"+
            	"pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' "+
            	"width='100%' height='100%' bgcolor='#000000' allowscriptaccess='always' wmode='direct' align='middle' "+
            	"quality='high' allowfullscreen='true' version='10' flashvars='"+vid+"&width="+width+"&height="+height+"&pageControls=0&'>";
                $(e).html(html);
            }
        });
    }
})();

QingJ © 2025

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