辣TV视频下载

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

// ==UserScript==
// @name         辣TV视频下载
// @namespace    http://weibo.com/liangxiafengge
// @version      0.3
// @description  下载辣TV(http://v.jxntv.cn/*,江西网络电视台的视频站)上的视频
// @author       凉夏风歌
// @match        http://v.jxntv.cn/*
// @icon         data:image/jpg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAICAgICAgICAgIDAgICBAUEAgIEBQYFBQUFBQYHBgYGBgYGBwcICAkICAcKCgsLCgoODg4ODg4ODg4ODg4ODg7/2wBDAQMDAwYFBgsHBwsODAoMDhEQEBAQEREODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg7/wAARCABKAEoDAREAAhEBAxEB/8QAHQAAAQUBAQEBAAAAAAAAAAAACQAGBwgKBQQDAv/EADwQAAEDAwIDBQUGBAYDAAAAAAECAwQFBhEABwgSIQkTMUFRFBUiMmEjQlJxgZEWQ1OCFzNEY5KUoaS0/8QAHQEAAQQDAQEAAAAAAAAAAAAAAAQFBggCAwcBCf/EADkRAAECBAIHBgQFBAMAAAAAAAEAAgMEBREhMQYSQVFhcZEHEyKBobFCUsHRFBYy4fAIYnOCcqLx/9oADAMBAAIRAxEAPwA/mhC8EuZFp8aRNmyWokOMguSZTqghCEJGSpSldAABnrocbZr2Gxz3BrQSTkBiShz7vdoTbNDmyLZ2XoY3BrLRKHLkfUpumtqHT4AnDj4B8wUpP3VK1HJuvAeGENY79n86LuOjPYrHjNEapP7lnyixiHnsb6neAqWXXxG763WpyTeW+T1ox3M8tCoWIvID93McBZ/uWT9dM8WfjPxc+3AYey6rTtB6RKi0vJiIR8UTxX4+LDo0KB6ruTPStS4e5V7VGV5S3KhJBz65LhOkTpg7HO6qYS9CYRYy8Fo3BrfsulbHFJv/AGa+0uh7rV92Owfsoc98z2sendyw6MfkNZQqnHh5OPnj7pPUOz2jTgPey0ME7WjUPVtir47PdpOt+REou8tqAl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uHVqbFqkNfzxZDSHUH80rBGsNUOzW2DHfCOswlp4YJhq2W2dW53q9prNW6epcNIhE/v3OtX4OF8regTsNKKmMPxMa3+R/3Tyo9uW9bjJj29QadQo58WIcduOn9m0pGtzIbW5BNczOxpjxRXuef7iT7ruayWhLQhLQhLQhf/9k=
// @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');
var downIcoResource = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAPCAQAAACYNP27AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAAAfQAAAH0AMQEOAcAAACSSURBVBjTnc89DkFhFITh5/N3FZRI2IRCpbAHjRAShVVQSKxDbEJsQ6lWECIWoOIq5HJFZ6ozb2YyOSRq2mklJvPGWWXZX0z8OdPY/zioK6ZIpCFkVCzNRB6IFUyt1MgbO1lo2+uYO5vIQzB0sHaycTT+7AV9F7GrkZCeDnq2Bt/wpWo61ZV7P59k78FR6ad3ewKE7BoY6d7bzQAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxNS0wOC0wMlQyMjo0OTozOSswODowMKys05gAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTUtMDgtMDJUMjI6NDk6MzkrMDg6MDDd8WskAAAATnRFWHRzb2Z0d2FyZQBJbWFnZU1hZ2ljayA2LjguOC0xMCBRMTYgeDg2XzY0IDIwMTUtMDctMTkgaHR0cDovL3d3dy5pbWFnZW1hZ2ljay5vcmcFDJw1AAAAGHRFWHRUaHVtYjo6RG9jdW1lbnQ6OlBhZ2VzADGn/7svAAAAGHRFWHRUaHVtYjo6SW1hZ2U6OkhlaWdodAAxNzbZs5jCAAAAF3RFWHRUaHVtYjo6SW1hZ2U6OldpZHRoADEyN0AyDEwAAAAZdEVYdFRodW1iOjpNaW1ldHlwZQBpbWFnZS9wbmc/slZOAAAAF3RFWHRUaHVtYjo6TVRpbWUAMTQzODUyNjk3OaezloIAAAARdEVYdFRodW1iOjpTaXplADk4OUJCediPFQAAAFp0RVh0VGh1bWI6OlVSSQBmaWxlOi8vL2hvbWUvd3d3cm9vdC93d3cuZWFzeWljb24ubmV0L2Nkbi1pbWcuZWFzeWljb24uY24vc3JjLzExOTA3LzExOTA3NzYucG5nsUsk2QAAAABJRU5ErkJggg==';
downIco.innerHTML='<a href=' + videoInfo.host + videoInfo.clips[0].urls[0] + ' download=' + videoInfo.title + '><button>' +  '<img src=' + downIcoResource + '></img>下载此视频</button></a><font color=\'red\'>(chrome用户请右键选择“另存为”可自动命名)</font><br>';
prependChild(playerArea,downIco);



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