// ==UserScript==
// @name 🔥🔥网易音乐,支持歌词和歌曲下载🔥🔥
// @namespace https://www.softrr.cn/
// @version 1.0.1
// @author hackhase
// @description 网易音乐支持当前页歌词下载,同时支持歌曲mp3下载
// @license MIT
// @icon http://s1.music.126.net/style/favicon.ico?v20180823
// @match *://music.163.com/*
// @require https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.global.prod.js
// @require data:application/javascript,%3Bwindow.Vue%3DVue%3B
// @require https://cdn.jsdelivr.net/npm/[email protected]/dist/index.full.min.js
// @require https://cdn.jsdelivr.net/npm/[email protected]/index.min.js
// @require https://cdn.jsdelivr.net/npm/[email protected]/index.min.js
// @resource element-plus/dist/index.css https://cdn.jsdelivr.net/npm/[email protected]/dist/index.css
// @connect www.softrr.cn
// @connect music.163.com
// @connect music.163.com
// @grant GM_addStyle
// @grant GM_download
// @grant GM_getResourceText
// @grant GM_xmlhttpRequest
// @grant unsafeWindow
// @noframes
// ==/UserScript==
(t=>{if(typeof GM_addStyle=="function"){GM_addStyle(t);return}const e=document.createElement("style");e.textContent=t,document.head.append(e)})(" :root{font-family:Inter,Avenir,Helvetica,Arial,sans-serif;font-size:16px;line-height:24px;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;place-items:center;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}.card{padding:2em}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}.modal-wrapper[data-v-eb552d62]{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#00000080;margin-top:0;display:flex;justify-content:center;align-items:center;z-index:999}.modal[data-v-eb552d62]{background-color:#fff;padding:20px;border-radius:5px}.header[data-v-eb552d62]{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.header h2[data-v-eb552d62]{margin:0;font-size:20px;font-weight:700}.header button[data-v-eb552d62]{border:none;background-color:transparent;font-size:20px;cursor:pointer}.content[data-v-eb552d62]{max-height:400px;overflow:auto;font-size:16px;display:flex;justify-content:space-between}.content .produce[data-v-eb552d62]{flex:60%}.content .produce p[data-v-eb552d62]{margin-top:15px}.content .produce .ipt[data-v-eb552d62]{margin-top:15px;height:30px;border-radius:5px;padding-left:10px}.content .img[data-v-eb552d62]{flex:35%;height:180px;display:flex;align-items:center;justify-content:center}.content .img img[data-v-eb552d62]{width:180px}input[data-v-eb552d62]::-webkit-input-placeholder{color:#aab2bd;font-size:14px;padding-left:5px}.copy[data-v-3070dc36]{width:200px;height:200px;position:fixed;right:10px;top:120px}.copy .btngroup[data-v-3070dc36]{display:flex;flex-direction:column;justify-content:center;align-items:center}.copy .btngroup .lyric[data-v-3070dc36]{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;width:80px;height:40px;border-radius:10%;font-size:14px;color:#fff;background-color:#07031c;cursor:pointer;margin-bottom:10px}.copy .btngroup .down[data-v-3070dc36]{display:flex;align-items:center;justify-content:center;width:80px;height:40px;border-radius:10%;font-size:14px;color:#fff;background-color:red;cursor:pointer}.copy .btngroup .down[data-v-3070dc36]:hover{background-color:#00ff48}.copy .btngroup .lyric[data-v-3070dc36]:hover{background-color:#933814!important} ");
(function (vue, elementPlus, request, CryptoJS) {
'use strict';
var _GM_download = /* @__PURE__ */ (() => typeof GM_download != "undefined" ? GM_download : void 0)();
var _GM_xmlhttpRequest = /* @__PURE__ */ (() => typeof GM_xmlhttpRequest != "undefined" ? GM_xmlhttpRequest : void 0)();
const _export_sfc = (sfc, props) => {
const target = sfc.__vccOpts || sfc;
for (const [key, val] of props) {
target[key] = val;
}
return target;
};
const _withScopeId = (n) => (vue.pushScopeId("data-v-eb552d62"), n = n(), vue.popScopeId(), n);
const _hoisted_1$1 = { class: "modal" };
const _hoisted_2 = { class: "header" };
const _hoisted_3 = { class: "content" };
const _hoisted_4 = { class: "produce" };
const _hoisted_5 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("p", null, "1、扫描右侧公众号,点击关注!", -1));
const _hoisted_6 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("p", null, "2、在软件爬取者后台回复:验证码", -1));
const _hoisted_7 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("p", null, "3、在下方输入框输入获取的验证码后回车", -1));
const _hoisted_8 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("div", { class: "img" }, [
/* @__PURE__ */ vue.createElementVNode("img", {
src: "https://www.softrr.cn/assets/pqz-daa4b840.jpg",
alt: ""
})
], -1));
const _sfc_main$1 = {
__name: "Model",
props: {
title: {
type: String,
required: true
},
code: {
type: Number
}
},
setup(__props, { expose: __expose }) {
const props = __props;
const visible = vue.ref(false);
const openModal = () => {
visible.value = true;
};
const closeModal = () => {
visible.value = false;
};
__expose({
visible,
openModal,
closeModal
});
const codeValue = vue.ref();
const enterCode = () => {
if (codeValue.value == props.code) {
localStorage.setItem("code", codeValue.value);
visible.value = false;
alert("验证成功,请再次点击解析!");
codeValue.value = "";
} else {
alert("验证码错误,请重新输入!");
codeValue.value = "";
}
};
return (_ctx, _cache) => {
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
class: "modal-wrapper",
onClick: vue.withModifiers(closeModal, ["self"])
}, [
vue.createElementVNode("div", _hoisted_1$1, [
vue.createElementVNode("div", _hoisted_2, [
vue.createElementVNode("h2", null, vue.toDisplayString(__props.title), 1),
vue.createElementVNode("button", { onClick: closeModal }, "X")
]),
vue.createElementVNode("div", _hoisted_3, [
vue.createElementVNode("div", _hoisted_4, [
_hoisted_5,
_hoisted_6,
_hoisted_7,
vue.withDirectives(vue.createElementVNode("input", {
class: "ipt",
type: "text",
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => codeValue.value = $event),
onKeydown: vue.withKeys(enterCode, ["enter"]),
placeholder: "请输入验证码后按回车"
}, null, 544), [
[vue.vModelText, codeValue.value]
])
]),
_hoisted_8
])
])
], 512)), [
[vue.vShow, visible.value]
]);
};
}
};
const Model = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-eb552d62"]]);
const getFile = (url, data) => {
return new Promise((resolve, reject) => {
request(
{
url,
method: "POST",
json: true,
headers: {
"content-type": "application/json",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.289 Safari/537.36",
Referer: "https://music.163.com/"
},
form: data
},
function(error, response, body) {
if (!error && response.statusCode == 200) {
resolve(body);
}
}
);
});
};
function d(d2, e, f, g) {
var h = {}, i2 = a(16);
return h.encText = b(d2, g), h.encText = b(h.encText, i2), h.encSecKey = c(i2, e, f), h;
}
function a(a2) {
var d2, e, b2 = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", c2 = "";
for (d2 = 0; a2 > d2; d2 += 1)
e = Math.random() * b2.length, e = Math.floor(e), c2 += b2.charAt(e);
return c2;
}
function b(a2, b2) {
var c2 = CryptoJS.enc.Utf8.parse(b2), d2 = CryptoJS.enc.Utf8.parse("0102030405060708"), e = CryptoJS.enc.Utf8.parse(a2), f = CryptoJS.AES.encrypt(e, c2, {
iv: d2,
mode: CryptoJS.mode.CBC
});
return f.toString();
}
function c(a2, b2, c2) {
var d2;
return setMaxDigits(131), d2 = new RSAKeyPair(b2, "", c2), encryptedString(d2, a2);
}
function RSAKeyPair(a2, b2, c2) {
this.e = biFromHex(a2), this.d = biFromHex(b2), this.m = biFromHex(c2), this.chunkSize = 2 * biHighIndex(this.m), this.radix = 16, this.barrett = new BarrettMu(this.m);
}
function encryptedString(a2, b2) {
for (var f, g, h, i2, j2, k, l, c2 = new Array(), d2 = b2.length, e = 0; d2 > e; )
c2[e] = b2.charCodeAt(e), e++;
for (; 0 != c2.length % a2.chunkSize; )
c2[e++] = 0;
for (f = c2.length, g = "", e = 0; f > e; e += a2.chunkSize) {
for (j2 = new BigInt(), h = 0, i2 = e; i2 < e + a2.chunkSize; ++h)
j2.digits[h] = c2[i2++], j2.digits[h] += c2[i2++] << 8;
k = a2.barrett.powMod(j2, a2.e), l = 16 == a2.radix ? biToHex(k) : biToString(k, a2.radix), g += l + " ";
}
return g.substring(0, g.length - 1);
}
function setMaxDigits(a2) {
maxDigits = a2, ZERO_ARRAY = new Array(maxDigits);
for (var b2 = 0; b2 < ZERO_ARRAY.length; b2++)
ZERO_ARRAY[b2] = 0;
bigZero = new BigInt(), bigOne = new BigInt(), bigOne.digits[0] = 1;
}
function BigInt(a2) {
this.digits = "boolean" == typeof a2 && 1 == a2 ? null : ZERO_ARRAY.slice(0), this.isNeg = false;
}
function biCopy(a2) {
var b2 = new BigInt(true);
return b2.digits = a2.digits.slice(0), b2.isNeg = a2.isNeg, b2;
}
function biFromNumber(a2) {
var c2, b2 = new BigInt();
for (b2.isNeg = 0 > a2, a2 = Math.abs(a2), c2 = 0; a2 > 0; )
b2.digits[c2++] = a2 & maxDigitVal, a2 >>= biRadixBits;
return b2;
}
function reverseStr(a2) {
var c2, b2 = "";
for (c2 = a2.length - 1; c2 > -1; --c2)
b2 += a2.charAt(c2);
return b2;
}
function biToString(a2, b2) {
var d2, e, c2 = new BigInt();
for (c2.digits[0] = b2, d2 = biDivideModulo(a2, c2), e = hexatrigesimalToChar[d2[1].digits[0]]; 1 == biCompare(d2[0], bigZero); )
d2 = biDivideModulo(d2[0], c2), digit = d2[1].digits[0], e += hexatrigesimalToChar[d2[1].digits[0]];
return (a2.isNeg ? "-" : "") + reverseStr(e);
}
function digitToHex(a2) {
var b2 = 15, c2 = "";
for (i = 0; 4 > i; ++i)
c2 += hexToChar[a2 & b2], a2 >>>= 4;
return reverseStr(c2);
}
function biToHex(a2) {
var d2, b2 = "";
for (biHighIndex(a2), d2 = biHighIndex(a2); d2 > -1; --d2)
b2 += digitToHex(a2.digits[d2]);
return b2;
}
function charToHex(a2) {
var b2 = 48, c2 = b2 + 9, d2 = 97, e = d2 + 25, f = 65, g = 90;
return a2 >= b2 && c2 >= a2 ? a2 - b2 : a2 >= f && g >= a2 ? 10 + a2 - f : a2 >= d2 && e >= a2 ? 10 + a2 - d2 : 0;
}
function hexToDigit(a2) {
var d2, b2 = 0, c2 = Math.min(a2.length, 4);
for (d2 = 0; c2 > d2; ++d2)
b2 <<= 4, b2 |= charToHex(a2.charCodeAt(d2));
return b2;
}
function biFromHex(a2) {
var d2, e, b2 = new BigInt(), c2 = a2.length;
for (d2 = c2, e = 0; d2 > 0; d2 -= 4, ++e)
b2.digits[e] = hexToDigit(a2.substr(Math.max(d2 - 4, 0), Math.min(d2, 4)));
return b2;
}
function biAdd(a2, b2) {
var c2, d2, e, f;
if (a2.isNeg != b2.isNeg)
b2.isNeg = !b2.isNeg, c2 = biSubtract(a2, b2), b2.isNeg = !b2.isNeg;
else {
for (c2 = new BigInt(), d2 = 0, f = 0; f < a2.digits.length; ++f)
e = a2.digits[f] + b2.digits[f] + d2, c2.digits[f] = 65535 & e, d2 = Number(e >= biRadix);
c2.isNeg = a2.isNeg;
}
return c2;
}
function biSubtract(a2, b2) {
var c2, d2, e, f;
if (a2.isNeg != b2.isNeg)
b2.isNeg = !b2.isNeg, c2 = biAdd(a2, b2), b2.isNeg = !b2.isNeg;
else {
for (c2 = new BigInt(), e = 0, f = 0; f < a2.digits.length; ++f)
d2 = a2.digits[f] - b2.digits[f] + e, c2.digits[f] = 65535 & d2, c2.digits[f] < 0 && (c2.digits[f] += biRadix), e = 0 - Number(0 > d2);
if (-1 == e) {
for (e = 0, f = 0; f < a2.digits.length; ++f)
d2 = 0 - c2.digits[f] + e, c2.digits[f] = 65535 & d2, c2.digits[f] < 0 && (c2.digits[f] += biRadix), e = 0 - Number(0 > d2);
c2.isNeg = !a2.isNeg;
} else
c2.isNeg = a2.isNeg;
}
return c2;
}
function biHighIndex(a2) {
for (var b2 = a2.digits.length - 1; b2 > 0 && 0 == a2.digits[b2]; )
--b2;
return b2;
}
function biNumBits(a2) {
var e, b2 = biHighIndex(a2), c2 = a2.digits[b2], d2 = (b2 + 1) * bitsPerDigit;
for (e = d2; e > d2 - bitsPerDigit && 0 == (32768 & c2); --e)
c2 <<= 1;
return e;
}
function biMultiply(a2, b2) {
var d2, h, i2, k, c2 = new BigInt(), e = biHighIndex(a2), f = biHighIndex(b2);
for (k = 0; f >= k; ++k) {
for (d2 = 0, i2 = k, j = 0; e >= j; ++j, ++i2)
h = c2.digits[i2] + a2.digits[j] * b2.digits[k] + d2, c2.digits[i2] = h & maxDigitVal, d2 = h >>> biRadixBits;
c2.digits[k + e + 1] = d2;
}
return c2.isNeg = a2.isNeg != b2.isNeg, c2;
}
function biMultiplyDigit(a2, b2) {
var c2, d2, e, f;
for (result = new BigInt(), c2 = biHighIndex(a2), d2 = 0, f = 0; c2 >= f; ++f)
e = result.digits[f] + a2.digits[f] * b2 + d2, result.digits[f] = e & maxDigitVal, d2 = e >>> biRadixBits;
return result.digits[1 + c2] = d2, result;
}
function arrayCopy(a2, b2, c2, d2, e) {
var g, h, f = Math.min(b2 + e, a2.length);
for (g = b2, h = d2; f > g; ++g, ++h)
c2[h] = a2[g];
}
function biShiftLeft(a2, b2) {
var e, f, g, h, c2 = Math.floor(b2 / bitsPerDigit), d2 = new BigInt();
for (arrayCopy(a2.digits, 0, d2.digits, c2, d2.digits.length - c2), e = b2 % bitsPerDigit, f = bitsPerDigit - e, g = d2.digits.length - 1, h = g - 1; g > 0; --g, --h)
d2.digits[g] = d2.digits[g] << e & maxDigitVal | (d2.digits[h] & highBitMasks[e]) >>> f;
return d2.digits[0] = d2.digits[g] << e & maxDigitVal, d2.isNeg = a2.isNeg, d2;
}
function biShiftRight(a2, b2) {
var e, f, g, h, c2 = Math.floor(b2 / bitsPerDigit), d2 = new BigInt();
for (arrayCopy(a2.digits, c2, d2.digits, 0, a2.digits.length - c2), e = b2 % bitsPerDigit, f = bitsPerDigit - e, g = 0, h = g + 1; g < d2.digits.length - 1; ++g, ++h)
d2.digits[g] = d2.digits[g] >>> e | (d2.digits[h] & lowBitMasks[e]) << f;
return d2.digits[d2.digits.length - 1] >>>= e, d2.isNeg = a2.isNeg, d2;
}
function biMultiplyByRadixPower(a2, b2) {
var c2 = new BigInt();
return arrayCopy(a2.digits, 0, c2.digits, b2, c2.digits.length - b2), c2;
}
function biDivideByRadixPower(a2, b2) {
var c2 = new BigInt();
return arrayCopy(a2.digits, b2, c2.digits, 0, c2.digits.length - b2), c2;
}
function biModuloByRadixPower(a2, b2) {
var c2 = new BigInt();
return arrayCopy(a2.digits, 0, c2.digits, 0, b2), c2;
}
function biCompare(a2, b2) {
if (a2.isNeg != b2.isNeg)
return 1 - 2 * Number(a2.isNeg);
for (var c2 = a2.digits.length - 1; c2 >= 0; --c2)
if (a2.digits[c2] != b2.digits[c2])
return a2.isNeg ? 1 - 2 * Number(a2.digits[c2] > b2.digits[c2]) : 1 - 2 * Number(a2.digits[c2] < b2.digits[c2]);
return 0;
}
function biDivideModulo(a2, b2) {
var f, g, h, i2, j2, k, l, m, n, o, p, q, r, s, c2 = biNumBits(a2), d2 = biNumBits(b2), e = b2.isNeg;
if (d2 > c2)
return a2.isNeg ? (f = biCopy(bigOne), f.isNeg = !b2.isNeg, a2.isNeg = false, b2.isNeg = false, g = biSubtract(b2, a2), a2.isNeg = true, b2.isNeg = e) : (f = new BigInt(), g = biCopy(a2)), new Array(f, g);
for (f = new BigInt(), g = a2, h = Math.ceil(d2 / bitsPerDigit) - 1, i2 = 0; b2.digits[h] < biHalfRadix; )
b2 = biShiftLeft(b2, 1), ++i2, ++d2, h = Math.ceil(d2 / bitsPerDigit) - 1;
for (g = biShiftLeft(g, i2), c2 += i2, j2 = Math.ceil(c2 / bitsPerDigit) - 1, k = biMultiplyByRadixPower(b2, j2 - h); -1 != biCompare(g, k); )
++f.digits[j2 - h], g = biSubtract(g, k);
for (l = j2; l > h; --l) {
for (m = l >= g.digits.length ? 0 : g.digits[l], n = l - 1 >= g.digits.length ? 0 : g.digits[l - 1], o = l - 2 >= g.digits.length ? 0 : g.digits[l - 2], p = h >= b2.digits.length ? 0 : b2.digits[h], q = h - 1 >= b2.digits.length ? 0 : b2.digits[h - 1], f.digits[l - h - 1] = m == p ? maxDigitVal : Math.floor((m * biRadix + n) / p), r = f.digits[l - h - 1] * (p * biRadix + q), s = m * biRadixSquared + (n * biRadix + o); r > s; )
--f.digits[l - h - 1], r = f.digits[l - h - 1] * (p * biRadix | q), s = m * biRadix * biRadix + (n * biRadix + o);
k = biMultiplyByRadixPower(b2, l - h - 1), g = biSubtract(g, biMultiplyDigit(k, f.digits[l - h - 1])), g.isNeg && (g = biAdd(g, k), --f.digits[l - h - 1]);
}
return g = biShiftRight(g, i2), f.isNeg = a2.isNeg != e, a2.isNeg && (f = e ? biAdd(f, bigOne) : biSubtract(f, bigOne), b2 = biShiftRight(b2, i2), g = biSubtract(b2, g)), 0 == g.digits[0] && 0 == biHighIndex(g) && (g.isNeg = false), new Array(f, g);
}
function biDivide(a2, b2) {
return biDivideModulo(a2, b2)[0];
}
function BarrettMu(a2) {
this.modulus = biCopy(a2), this.k = biHighIndex(this.modulus) + 1;
var b2 = new BigInt();
b2.digits[2 * this.k] = 1, this.mu = biDivide(b2, this.modulus), this.bkplus1 = new BigInt(), this.bkplus1.digits[this.k + 1] = 1, this.modulo = BarrettMu_modulo, this.multiplyMod = BarrettMu_multiplyMod, this.powMod = BarrettMu_powMod;
}
function BarrettMu_modulo(a2) {
var i2, b2 = biDivideByRadixPower(a2, this.k - 1), c2 = biMultiply(b2, this.mu), d2 = biDivideByRadixPower(c2, this.k + 1), e = biModuloByRadixPower(a2, this.k + 1), f = biMultiply(d2, this.modulus), g = biModuloByRadixPower(f, this.k + 1), h = biSubtract(e, g);
for (h.isNeg && (h = biAdd(h, this.bkplus1)), i2 = biCompare(h, this.modulus) >= 0; i2; )
h = biSubtract(h, this.modulus), i2 = biCompare(h, this.modulus) >= 0;
return h;
}
function BarrettMu_multiplyMod(a2, b2) {
var c2 = biMultiply(a2, b2);
return this.modulo(c2);
}
function BarrettMu_powMod(a2, b2) {
var d2, e, c2 = new BigInt();
for (c2.digits[0] = 1, d2 = a2, e = b2; ; ) {
if (0 != (1 & e.digits[0]) && (c2 = this.multiplyMod(c2, d2)), e = biShiftRight(e, 1), 0 == e.digits[0] && 0 == biHighIndex(e))
break;
d2 = this.multiplyMod(d2, d2);
}
return c2;
}
var maxDigits, ZERO_ARRAY, bigZero, bigOne, hexatrigesimalToChar, hexToChar, highBitMasks, lowBitMasks, biRadixBits = 16, bitsPerDigit = biRadixBits, biRadix = 65536, biHalfRadix = biRadix >>> 1, biRadixSquared = biRadix * biRadix, maxDigitVal = biRadix - 1;
setMaxDigits(20), biFromNumber(1e15), hexatrigesimalToChar = new Array(
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"a",
"b",
"c",
"d",
"e",
"f",
"g",
"h",
"i",
"j",
"k",
"l",
"m",
"n",
"o",
"p",
"q",
"r",
"s",
"t",
"u",
"v",
"w",
"x",
"y",
"z"
), hexToChar = new Array(
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"a",
"b",
"c",
"d",
"e",
"f"
), highBitMasks = new Array(
0,
32768,
49152,
57344,
61440,
63488,
64512,
65024,
65280,
65408,
65472,
65504,
65520,
65528,
65532,
65534,
65535
), lowBitMasks = new Array(
0,
1,
3,
7,
15,
31,
63,
127,
255,
511,
1023,
2047,
4095,
8191,
16383,
32767,
65535
);
function main123(d1) {
var e1 = "010001";
var f1 = "00e0b509f6259df8642dbc35662901477df22677ec152b5ff68ace615bb7b725152b3ab17a876aea8a5aa76d2e417629ec4ee341f56135fccf695280104e0312ecbda92557c93870114af6c9d05c4f7f0c3685b7a46bee255932575cce10b424d813cfe4875d3e82047b97ddef52741d546b8e289dc6935b3ece0462db0a22b8e7";
var g1 = "0CoJUm6Qyw8W8jud";
var bVi3x = d(d1, e1, f1, g1);
var data = {
params: bVi3x.encText,
encSecKey: bVi3x.encSecKey
};
return data;
}
const _hoisted_1 = {
class: "copy",
ref: "btnGroupRef"
};
const lyrUrl = "https://music.163.com/weapi/song/enhance/player/url/v1?csrf_token=";
const _sfc_main = {
__name: "App",
setup(__props) {
const code = vue.ref();
const getCode = () => {
return new Promise((resolve, reject) => {
_GM_xmlhttpRequest({
method: "GET",
url: `https://www.softrr.cn/crawler/getCode`,
headers: {
Referer: "https://www.softrr.cn/",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.289 Safari/537.36"
},
onload: function(res) {
code.value = JSON.parse(res.response).data[0].code;
resolve(code.value);
}
});
});
};
const title = vue.ref("为了减少端口压力,防止滥用,采取必要的验证手段。");
const model = vue.ref("");
const locoCode = vue.ref();
vue.ref([]);
const musicId = vue.ref();
const getRes = async () => {
let pageUrl = window.location.href;
musicId.value = pageUrl.split("=")[pageUrl.split("=").length - 1];
let d1 = `{"ids":"[${musicId.value}]","level":"standard","encodeType":"aac","csrf_token":""}`;
let data = main123(d1);
let resList = await getFile(lyrUrl, data);
return resList;
};
const onLyric = async () => {
locoCode.value = localStorage.getItem("code");
code.value = await getCode();
if (locoCode.value == code.value) {
let iframe = document.getElementsByTagName("iframe")[0];
let doc = iframe.contentWindow.document;
var lyric = doc.getElementById("lyric-content").innerHTML;
let name = doc.getElementsByClassName("tit")[0].innerText;
lyric = lyric.split("</div>")[0].replace(/<br>/g, "\n");
let blob = new Blob([lyric], { type: "text/plain" });
let blobUrl = window.URL.createObjectURL(blob);
_GM_download(blobUrl, name + ".txt");
} else {
model.value.openModal();
}
};
const onMusic = async () => {
locoCode.value = localStorage.getItem("code");
code.value = await getCode();
if (locoCode.value == code.value) {
let resList = await getRes();
let iframe = document.getElementsByTagName("iframe")[0];
let doc = iframe.contentWindow.document;
let name = doc.getElementsByClassName("tit")[0].innerText;
if (resList.code == 200) {
if (resList.data[0].size == 0)
return elementPlus.ElMessage.error("无法下载VIP歌曲!");
let downUrl = resList.data[0].url;
_GM_download(downUrl, name + "-" + musicId.value);
} else {
elementPlus.ElMessage.warning("下载失败!");
}
} else {
model.value.openModal();
}
};
return (_ctx, _cache) => {
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
vue.createElementVNode("div", { class: "btngroup" }, [
vue.createElementVNode("a", {
onClick: onLyric,
class: "lyric"
}, "歌词下载"),
vue.createElementVNode("a", {
onClick: onMusic,
class: "down"
}, "音乐下载")
]),
vue.createVNode(Model, {
title: title.value,
code: code.value,
ref_key: "model",
ref: model
}, null, 8, ["title", "code"])
], 512);
};
}
};
const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3070dc36"]]);
const cssLoader = (e) => {
const t = GM_getResourceText(e);
return GM_addStyle(t), t;
};
cssLoader("element-plus/dist/index.css");
vue.createApp(App).mount(
(() => {
const app = document.createElement("div");
document.body.append(app);
return app;
})()
);
})(Vue, ElementPlus, request, crypto-js);