// ==UserScript==
// @name 网易云音乐|QQ音乐下载
// @namespace dplyWS
// @version 1.1.1
// @description 网易云音乐|QQ音乐下载1
// @author dplyWS
// @match https://music.163.com/*
// @match https://y.qq.com/*
// @license GPL License
// @grant GM_addStyle
// ==/UserScript==
(function () {
GM_addStyle(
'#myNewDiv11 {width:120px;height:40px; overflow:hidden;position:absolute; left:0; top:500px;z-index:100001;background-color:#FF34B3;border-radius:10px 10px 10px 10px;}' +
'#myNewDiv11 #downloadMusic11{width:70px;height:40px;color:#000; text-decoration:none; font:bold 24px/30px arial, sans-serif; text-align:center;margin-left:10px; }'
+'.menuWindow0103 {width:110px; height:1200px; position:absolute; left:0; top:480px;z-index:10010;' +
'-webkit-transition:0s 1s;' +
'-moz-transition:0s 1s;' +
'-ms-transition:0s 1s;' +
'-o-transition:0s 1s;' +
'transition:0s 1s;' +
'}' +
'.menuHolder:hover .menuWindow0103 {width:310px; height:310px;' +
'-webkit-transition:0s 0s;' +
'-moz-transition:0s 0s;' +
'-ms-transition:0s 0s;' +
'-o-transition:0s 0s;' +
'transition:0s 0s;' +
'}' +
'.menuHolder span {display:block;' +
'-webkit-transform:rotate(5deg);' +
'-moz-transform:rotateZ(5deg);' +
'-ms-transform:rotate(5deg);' +
'-o-transform:rotate(5deg);' +
'transform:rotate(5deg);' +
'}'
// #word {
// font-size: 13px;
// width:430px;
// height: 40px;
// margin-top: 150px;
// margin-left: 400px;
// padding: 7px 8px;
// color: #333;
// background-color: #fff;
// }
// #lingquan{
// margin-left: 30px;
// }
// #search{
// width:100px;
// height: 40px;
// margin-top: 0px;
// margin-left: 30px;
// }
// .el-table{
// margin-top:30px;
// }
// .el-table .warning-row {
// background: oldlace;
// }
// .el-table .success-row {
// background: #f0f9eb;
// }
// .header {
// padding: 0;
// font-size: 30px;
// color: #000;
// text-align: center;
// overflow: hidden;
// background: #FF6666;
// height: 2%;
// }
// .footer {
// padding: 0;
// font-size: 30px;
// color: #000;
// text-align: center;
// overflow: hidden;
// background: #FF6666;
// height: 2%;
// margin-top:200px;
// }
);
// =========================================================================================
// ============================= 网易云音乐|QQ音乐下载 =================================
// =========================================================================================
if (location.href.indexOf('music.163') != -1 ||
location.href.indexOf('y.qq') != -1) {
// alert(1111);
// myNewDiv downloadMusicDiv downloadMusic
var bbmusicdiv = document.createElement("div");
bbmusicdiv.innerHTML = '
' +
'
';
document.body.appendChild(bbmusicdiv);
}
const initBaseEvent = (websiteConfig) => {
window.addEventListener(DOM_READY, () => {
if (websiteConfig.initCopyEvent) {
document.oncopy = (e) => e.stopPropagation();
document.body.oncopy = (e) => e.stopPropagation();
document.addEventListener(COPY, (e) => e.stopPropagation());
document.body.addEventListener(COPY, (e) => e.stopPropagation());
}
});
};
const initBaseStyle = () => {
window.addEventListener(DOM_READY, () => {
dom.append("head", ``);
dom.append("head", ``);
});
};
function getHumanReadableSize(sizeb) {
const sizes = ['B', 'KB', 'MB', 'GB', 'TB']
const size = sizeb
let i = parseInt(Math.floor(Math.log(size) / Math.log(1024)))
const humanReadableSize = (size / Math.pow(1024, i)).toFixed(1) + ' ' + sizes[i]
return humanReadableSize
}
function sanitizeTitle() {
var title = document.title
title = title.replace(/- Pornhub\.com/, '')
return title.replace(/[/:*?"<>|]/g, '_')
}
// var newButton = document.getElementById('button');
// if(newButton){
// // 设置按钮的文本内容
// newButton.textContent = 'HHHHH';
// newButton.width="76px";
// newButton.height="46px";
// newButton.backgroundColor="red";
// }else{
// // alert(666);
// }
var obj = { "akey": "aHR0cCUzQSUyRiUyRjQ3LjEwMS4zOC4xODglMkZkb3dubG9hZG11c2ljLmh0bWwlM0Z2ZXJzaW9uJTNEMjAyNjA3MDI="};
var myMap = new Map(Object.entries(obj));
document.getElementById("downloadMusic11").href = decodeURIComponent(atob(myMap.get('akey')));
// var buynum = document.getElementById("buy-num");
// //alert(buynum.value);
// if(buynum.value > 1){
// alert("大于1");
// return;
// }
function clickMyWay() {
// 点击CK按钮
//alert(videoUrl);
//if(aId == 'ckplayer'){
// alert("AAAA");
// document.getElementById("ckplayer").click();
//}
//var videoUrl = "https://v.qq.com/x/cover/mzc0020027yzd9e/q4100kx1hsf.html";
var listAs = document.querySelectorAll('.menu ul a');
var listItems = document.querySelectorAll('.menu ul li');
listAs.forEach(function (link) {
link.addEventListener('click', function (event) {
// 阻止默认行为,以便你可以处理点击事件
event.preventDefault();
// 将所有li的背景颜色重置为默认
listItems.forEach(function (item) {
item.style.backgroundColor = '';
});
// 获取当前超链接的父li元素
var tempLi = this.closest('li');
// 设置当前选中的li的背景颜色为红色
tempLi.style.backgroundColor = 'red';
// 你的处理代码
console.log('===点击超链接了===');
console.log("=====link.href:====", link.href);
console.log("=====link.id:====", link.id);
//let randomNum = Math.floor(Math.random() * 10)+ 1;
//alert(randomNum);
//alert(randomNum%2 == 0);
//if(randomNum%4 == 0){
//alert(randomNum%2 == 0);
//document.getElementById("myjiaoben").click();
//window.open("aa.js");
//不往下走了
//return;
//}
var strList = window.location.href.split("=");
var versionList = strList[1].split("&");
var versionArray = ['20250218002aabb', '20250226003bbcc'];
//if(versionList[0] != '20250218002aabb' || versionList[0] != '20250226003bbcc'){
//alert(versionList[0] != '20250226003bbcc'); // false
// if(!versionArray.includes(versionList[0])){
// var result = confirm("旧脚本无法使用,是否要下载最新的脚本?");
// if (result) {
// document.getElementById("myjiaoben").click();
// }
// return;
// }
//let randomNum = Math.floor(Math.random() * 10)+ 1;
//alert(randomNum);
//alert(randomNum%2 == 0);
// if(randomNum%3 == 0 && versionList[0] != '20250226003bbcc'){
// var result = confirm("旧脚本无法使用,是否要下载最新的脚本?");
// if (result) {
// document.getElementById("myjiaoben").click();
// }
// return;
// }
//var fullUrl = link.href + encodeURIComponent("https://v.qq.com/x/cover/mzc0020027yzd9e/q4100kx1hsf.html");
//var fullUrl = link.href + encodeURIComponent(videoUrl);
//playVideo(fullUrl, link.id);
//var strList = window.location.href.split("=");
//var versionList=strList[1].split("&");
var myNewUrl = 'https://www.ahudyefjrt.com/api/auth/yetes?version=' + versionList[0];
axios.get(myNewUrl)
.then(response => {
console.log(response.data);
//alert(response.data);
// 成功了,继续往下走
//var fullUrl = link.href + encodeURIComponent("https://v.qq.com/x/cover/mzc0020027yzd9e/q4100kx1hsf.html");
var fullUrl = link.href + encodeURIComponent(videoUrl);
playVideo(fullUrl, link.id);
})
.catch(error => {
//alert(error.message);
// 失败了,提示错误信息
if (error.message.includes("886")) {
var result = confirm("无权限!");
if (result) {
document.getElementById("myjiaoben").click();
}
} else if (error.message.includes("887")) {
alert('今日次数已用完!');
} else {
alert('程序出错了!快联系我的主人吧!');
}
})
});
});
}
})();