Greasy Fork

Greasy Fork is available in English.

辣TV视频下载

下载辣TV(http://v.jxntv.cn/*,江西网络电视台的视频站)上的视频

当前为 2016-01-07 提交的版本,查看 最新版本

// ==UserScript==
// @name         辣TV视频下载
// @namespace    http://weibo.com/liangxiafengge
// @version      0.2.1
// @description  下载辣TV(http://v.jxntv.cn/*,江西网络电视台的视频站)上的视频
// @author       凉夏风歌
// @match        http://v.jxntv.cn/*
// @icon         http://v.jxntv.cn/assets/images/iconLogo.jpg
// @run-at 		 document-end
// @grant        none
// ==/UserScript==
/* jshint -W097 */
'use strict';


//获取信息
var playerArea   = document.getElementById("video_sobey");
var videoInfo    = json.video[0].vodAddress;
//建立下载链接
var downIco      = document.createElement('div');
downIco.innerHTML= '<img src="http://www.easyicon.net/api/resizeApi.php?id=1185846&size=16">下载此视频<br>';
var downButton   = document.createElement('a');
downButton.innerHTML='<font color=\'red\'>'+videoInfo.title+'.'+videoInfo.sourceType+'</font>'+'(建议使用Orbit或刀锋下载)';
downButton.href  =  videoInfo.host + videoInfo.clips[0].urls[0];
downButton.target= '_blank';
//downButton.onclick=function(){downloadVideo()};

prependChild(playerArea,downButton);
prependChild(playerArea,downIco);



//在指定节点前插入
function prependChild(parent,newChild){
	    if(parent.firstChild){
	        parent.insertBefore(newChild,parent.firstChild);
	    } else {
	        parent.appendChild(newChild);
	    }
	    return parent;
}