');
GM_openInTab(ozlurlmusic, {active: !0});
}else{
swal("因视频被加密无法找到下载地址");
}
}catch(e){
swal("解析下载地址失败");
}
}
});
}else{
GM_setValue('gomusic', '
'+musicname+' ');
GM_openInTab(ozlurlmusic, {active: !0});
}
}
}
if (qqzcvs==0 ){
swal("支持QQ音乐的歌曲以及MV下载,注意只能进入音乐单曲或者MV的播放页面点击播放后 方可正常使用本菜单的音乐下载功能。例如https://y.qq.com/n/ryqq/player以及https://y.qq.com/n/ryqq/mv/z0039dkb7hz");
}
}
if (location.href.indexOf("kugou.com") > 0 ){
var kugouzcvs=0;
if (location.href.indexOf("/song/#hash=") >=0 ){
var musicname="";
if($(".audioName").length>0){
musicname=$(".audioName").text();
}
GM_setValue('gomusic', '
'+musicname+' ');
GM_openInTab(ozlurlmusic, {active: !0});
kugouzcvs=1;
}
if (location.href.indexOf("kugou.com/ts/") >=0 ){
//return
if (location.href.indexOf("html") >0){
kugouzcvs=1;
if(hash && album_id && album_audio_id){
var musicname="";
var musicurl=false;
var koog ='https://wwwapi.kugou.com/yy/index.php?r=play/getdata&hash='+hash+'&album_id='+album_id+'&album_audio_id='+album_audio_id+'';
GM_xmlhttpRequest({
url: koog,
method: 'GET',
timeout: 10000,
headers: {
'Content-Type': 'application/jsonp',
'Accept': 'application/jsonp',
'Cache-Control': 'public'
},
onload: function(res){
try{
const t = JSON.parse(res.responseText);
musicname=t.data.audio_name;
if (t.data.play_backup_url){
musicurl=t.data.play_backup_url;
GM_setValue('gomusic', '
'+musicname+' ');
GM_openInTab(ozlurlmusic, {active: !0});
}else{
swal("此音频仅限酷狗客户端使用,因此无法被解析下载");
}
}catch(e){
swal("解析下载地址失败");
}
}
});
}
// swal("请先点击播放需要下载的音频,再点击本菜单的下载按钮");
} else{
swal("必须先点击播放需要下载的音乐并进入此类播放页面 https://www.kugou.com/ts/xiangsheng/8873275/110800114.html 方可正常使用本菜单的音乐下载功能。注意只能是音乐单曲播放页面");
}
}
if (kugouzcvs==0){
swal("支持酷狗音乐的歌曲以及听书下载,注意只能进入音乐单曲播放页面 方可正常使用本菜单的音乐下载功能。例如https://www.kugou.com/song/#hash=8D288C3652EABA7CA6EF6CEF790CE9AC&album_id=2996291以及https://www.kugou.com/ts/xiaoshuo/40209350/281880449.html");
}
}
if (location.href.indexOf("qingting.fm") > 0 ){
var qingtingzcvs=0;
if (location.href.indexOf("/channels/") > 0 && location.href.indexOf("/programs/") > 0 ){
var musicname='';
var musicurl='';
qingtingzcvs=1;
var koog ='http://v1.ak47.ink:8102/?'+location.href;
GM_xmlhttpRequest({
url: koog,
method: 'GET',
timeout: 10000,
headers: {
'Content-Type': 'application/jsonp',
'Accept': 'application/jsonp',
'Cache-Control': 'public'
},
onload: function(res){
try{
const t = res.responseText;
if (t.indexOf("qingting.fm") > 0 ){
musicname=$("h1").text();
musicurl=t;
GM_setValue('gomusic', '
'+musicname+' ');
GM_openInTab(ozlurlmusic, {active: !0});
}else{
swal("此音频可能是VIP视频,暂时无法被解析下载");
}
}catch(e){
swal("解析下载地址失败");
}
}
});
}else{
swal("注意只能在单集单曲的播放页面、例如此类页面https://www.qingting.fm/channels/332552/programs/13603766方可正常使用本菜单的下载功能。注意只能是单集播放页面");
}
}
});
if (GM_getValue('menu_top')) {
adsideNav.style.top = GM_getValue('menu_top');
}
if (GM_getValue('menu_right')) {
adsideNav.style.right = GM_getValue('menu_right');
}
}
if ((vurl.indexOf("v.qq.com") > 0 || vurl.indexOf(".youku.com") > 0 || vurl.indexOf(".iqiyi.com") > 0|| vurl.indexOf(".mgtv.com") > 0|| vurl.indexOf(".le.com") > 0 || vurl.indexOf(".sohu.com") > 0) ){
var now = $.now();
$("body").append(siddenav);
addStyle(siddecss);
var ua = navigator.userAgent;
/Safari|iPhone/i.test(ua) && 0 == /chrome/i.test(ua) && $("#zhe_nav").addClass("no-filter");
var drags = {down: !1, x: 0, y: 0, winWid: 0, winHei: 0, clientX: 0, clientY: 0}, adsideNav = $("#zhe_nav")[0],
getCss = function (a, e) {
return a.currentStyle ? a.currentStyle[e] : document.defaultView.getComputedStyle(a, !1)[e]
};
$("#zhe_nav").on("mousedown", function (a) {
drags.down = !0, drags.clientX = a.clientX, drags.clientY = a.clientY, drags.x = getCss(this, "right"), drags.y = getCss(this, "top"), drags.winHei = $(window).height(), drags.winWid = $(window).width(), $(document).on("mousemove", function (a) {
if (drags.winWid > 640 && (a.clientX < 120 || a.clientX > drags.winWid - 50))
return !1;
if (a.clientY < 180 || a.clientY > drags.winHei - 120)
return !1;
var e = a.clientX - drags.clientX,
t = a.clientY - drags.clientY;
adsideNav.style.top = parseInt(drags.y) + t + "px";
adsideNav.style.right = parseInt(drags.x) - e + "px";
GM_setValue('menu_top', parseInt(drags.y) + t + "px");
GM_setValue('menu_right', parseInt(drags.x) - e + "px");
})
}).on("mouseup", function () {
drags.down = !1, $(document).off("mousemove")
});
$('html').on('click', '[data-cat=gogob]', function () {
GM_setValue('govideo', location.href);
GM_openInTab(ozlurlvideo, {active: !0});
});
if (GM_getValue('menu_top')) {
adsideNav.style.top = GM_getValue('menu_top');
}
if (GM_getValue('menu_right')) {
adsideNav.style.right = GM_getValue('menu_right');
}
}
if (vurl.indexOf(ozlurlmusic) >= 0 ){
if (GM_getValue('gomusic')){
console.log(GM_getValue('gomusic'));
$('body').append(GM_getValue('gomusic'));
GM_deleteValue('gomusic');
}
}
if (vurl.indexOf(ozlurlvideo) >= 0 ){
if (GM_getValue('govideo')){
console.log(GM_getValue('govideo'));
$("#inputUrl").attr('value',GM_getValue('govideo'));
$("#btnOk").click();
GM_deleteValue('govideo');
}
}
if (vurl.indexOf("www.x.com/?from=100000") >= 0 ){
window.location.href=ozlurlvideo;
}
if (vurl.indexOf("www.x.com/?from=100001") >= 0 ){
window.location.href=ozlurldh;
}
}
// 1
if(baidspjayumin.search("zhihu.com")> 0) {
if ($('.VideoCard').length > 0 && $('#zdksp_0').length <= 0 && $('.zdkspzh').length <= 0 ) {
$('.VideoCard').before('
下拉网页或者滑动鼠标中间可显示视频下载按钮 ' );
}
$(window).scroll(function(event){
if ($('.zdkspzh').length > 0) {
$(".zdkspzh").hide();
}
$("iframe").each(function(key, val){
if ($('#zdksp_'+key).length <= 0) {
GM_xmlhttpRequest({
method : "GET",
dataType: "json",
url : $(this).attr("src").replace("www.zhihu.com/video","lens.zhihu.com/api/v4/videos"),
onload : function (response) {
var rsp = JSON.parse(response.responseText);
if (rsp.playlist.LD){
rsp.type="普清"
rsp.play_url=rsp.playlist.LD.play_url
}
if (rsp.playlist.HD){
rsp.type="高清"
rsp.play_url=rsp.playlist.HD.play_url
}
if (rsp.playlist.SD){
rsp.type="超清"
rsp.play_url=rsp.playlist.SD.play_url
}
var zkld_play_url=rsp.play_url;
var zkld_play_type= rsp.type;
var zkld_play_fm= rsp.cover_url;
if ($('#zdksp_'+key).length <= 0 ) {
$('.VideoCard').eq(key).before('
'+zkld_play_type+'下载:右键此处另存为可保存本视频 封面:'+zkld_play_fm+' ');
}
}
});
}
})
});
}
if (vurl.search("weixin.qq.com/s")>=0){
setTimeout(function(){
if ($("mpvoice[class='rich_pages']").length > 0 && $('.zdkwxyyzh').length <= 0 ) {
$("mpvoice[class='rich_pages']").before('
音乐地址正在加载中... ' );
$("mpvoice[class='rich_pages']").each(function(key, val){
if ($('#zdkyy_'+key).length <= 0) {
if ($('.zdk_yydown').length > 0) {
$(".zdk_yydown").hide();
}
if ($('#zdkyy_'+key).length <= 0 ) {
$("mpvoice[class='rich_pages']").eq(key).before('
音乐下载'+$(this).attr("name")+':右键此处另存为可保存本音频 ');
}
}
})
}
}, 2000);
setTimeout(function(){
var zkasrc=""
if ($("img").length > 0 && $('.zdkwxyyzh').length <= 0 ) {
$("img").each(function(key, val){
zkasrc=$(this).attr("data-src");
if(typeof(zkasrc)=="undefined"){ }else{
if ($('#zdktp_'+key).length <= 0) {
if ($('#zdktp_'+key).length <= 0 ) {
$(this).attr('src',$(this).data("src"));
$(this).attr('id','zdktp_'+key );
}
}
}
})
} }, 3000);
if ($('.video_iframe.rich_pages').length > 0 && $('.zdkwxspzh').length <= 0 ) {
$('.video_iframe').before('
视频地址正在加载中... ' );
var zkdspdz="https://mp.weixin.qq.com/mp/videoplayer?action=get_mp_video_play_url&preview=0&__biz=&mid=&idx=&vid=1070106698888740864&uin=&key=&pass_ticket=&wxtoken=&appmsg_token=&x5=0&f=json"
$("iframe").each(function(key, val){
if ($('#zdksp_'+key).length <= 0) {
if ($('.zdkwxspzh').length > 0) {
$(".zdkwxspzh").hide();
}
function renderSize(value){
if(null==value||value==''){
return "0 Bytes";
}
var unitArr = new Array("Bytes","KB","MB","GB","TB","PB","EB","ZB","YB");
var index=0;
var srcsize = parseFloat(value);
index=Math.floor(Math.log(srcsize)/Math.log(1024));
var size =srcsize/Math.pow(1024,index);
size=size.toFixed(2);
return size+unitArr[index];
}
GM_xmlhttpRequest({
method : "GET",
dataType: "json",
url : zkdspdz.replace("1070106698888740864",$(this).data("mpvid")),
onload : function (response) {
var rsp = JSON.parse(response.responseText);
if ($('#zdksp_'+key).length <= 0 ) {
$('.video_iframe.rich_pages').eq(key).before('
视频下载'+renderSize(rsp.url_info[0].filesize)+':右键此处另存为可保存本视频 (提醒:只能下载公众号的素材视频,不提供第三方视频网站的下载。例如:腾讯视频之类的) ');
}
}
});
}
})
} }
}
});