// ==UserScript== // @name 🔥🔥B站视频最高清设置,界面优化,支持高清视频下载🔥🔥 // @namespace https://www.softrr.cn/ // @version 1.1.3 // @author hackhase // @description 一进入B站视频就选择最高清设置,界面优化,去掉右上角广告,支持当前播放页面视频高清下载! // @license MIT // @icon https://www.douyin.com/p-pc-weboff.byteimg.com/tos-cn-i-9r5gewecjs/favicon.png // @match *://*.bilibili.com/video/* // @require https://cdn.jsdelivr.net/npm/vue@3.3.11/dist/vue.global.prod.js // @require data:application/javascript,%3Bwindow.Vue%3DVue%3B // @require https://cdn.jsdelivr.net/npm/element-plus@2.5.6/dist/index.full.min.js // @resource element-plus/dist/index.css https://cdn.jsdelivr.net/npm/element-plus@2.5.6/dist/index.css // @connect www.softrr.cn // @connect bili.zhouql.vip // @connect * // @connect www.bilibili.com // @connect www.xiazaitool.com // @grant GM_addStyle // @grant GM_download // @grant GM_getResourceText // @grant GM_xmlhttpRequest // @grant unsafeWindow // @downloadURL none // ==/UserScript== (e=>{if(typeof GM_addStyle=="function"){GM_addStyle(e);return}const r=document.createElement("style");r.textContent=e,document.head.append(r)})(' @charset "UTF-8";: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}}:root{--el-color-white:#ffffff;--el-color-black:#000000;--el-color-primary-rgb:64,158,255;--el-color-success-rgb:103,194,58;--el-color-warning-rgb:230,162,60;--el-color-danger-rgb:245,108,108;--el-color-error-rgb:245,108,108;--el-color-info-rgb:144,147,153;--el-font-size-extra-large:20px;--el-font-size-large:18px;--el-font-size-medium:16px;--el-font-size-base:14px;--el-font-size-small:13px;--el-font-size-extra-small:12px;--el-font-family:"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","\u5FAE\u8F6F\u96C5\u9ED1",Arial,sans-serif;--el-font-weight-primary:500;--el-font-line-height-primary:24px;--el-index-normal:1;--el-index-top:1000;--el-index-popper:2000;--el-border-radius-base:4px;--el-border-radius-small:2px;--el-border-radius-round:20px;--el-border-radius-circle:100%;--el-transition-duration:.3s;--el-transition-duration-fast:.2s;--el-transition-function-ease-in-out-bezier:cubic-bezier(.645, .045, .355, 1);--el-transition-function-fast-bezier:cubic-bezier(.23, 1, .32, 1);--el-transition-all:all var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier);--el-transition-fade:opacity var(--el-transition-duration) var(--el-transition-function-fast-bezier);--el-transition-md-fade:transform var(--el-transition-duration) var(--el-transition-function-fast-bezier),opacity var(--el-transition-duration) var(--el-transition-function-fast-bezier);--el-transition-fade-linear:opacity var(--el-transition-duration-fast) linear;--el-transition-border:border-color var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-transition-box-shadow:box-shadow var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-transition-color:color var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-component-size-large:40px;--el-component-size:32px;--el-component-size-small:24px}:root{color-scheme:light;--el-color-white:#ffffff;--el-color-black:#000000;--el-color-primary:#409eff;--el-color-primary-light-3:#79bbff;--el-color-primary-light-5:#a0cfff;--el-color-primary-light-7:#c6e2ff;--el-color-primary-light-8:#d9ecff;--el-color-primary-light-9:#ecf5ff;--el-color-primary-dark-2:#337ecc;--el-color-success:#67c23a;--el-color-success-light-3:#95d475;--el-color-success-light-5:#b3e19d;--el-color-success-light-7:#d1edc4;--el-color-success-light-8:#e1f3d8;--el-color-success-light-9:#f0f9eb;--el-color-success-dark-2:#529b2e;--el-color-warning:#e6a23c;--el-color-warning-light-3:#eebe77;--el-color-warning-light-5:#f3d19e;--el-color-warning-light-7:#f8e3c5;--el-color-warning-light-8:#faecd8;--el-color-warning-light-9:#fdf6ec;--el-color-warning-dark-2:#b88230;--el-color-danger:#f56c6c;--el-color-danger-light-3:#f89898;--el-color-danger-light-5:#fab6b6;--el-color-danger-light-7:#fcd3d3;--el-color-danger-light-8:#fde2e2;--el-color-danger-light-9:#fef0f0;--el-color-danger-dark-2:#c45656;--el-color-error:#f56c6c;--el-color-error-light-3:#f89898;--el-color-error-light-5:#fab6b6;--el-color-error-light-7:#fcd3d3;--el-color-error-light-8:#fde2e2;--el-color-error-light-9:#fef0f0;--el-color-error-dark-2:#c45656;--el-color-info:#909399;--el-color-info-light-3:#b1b3b8;--el-color-info-light-5:#c8c9cc;--el-color-info-light-7:#dedfe0;--el-color-info-light-8:#e9e9eb;--el-color-info-light-9:#f4f4f5;--el-color-info-dark-2:#73767a;--el-bg-color:#ffffff;--el-bg-color-page:#f2f3f5;--el-bg-color-overlay:#ffffff;--el-text-color-primary:#303133;--el-text-color-regular:#606266;--el-text-color-secondary:#909399;--el-text-color-placeholder:#a8abb2;--el-text-color-disabled:#c0c4cc;--el-border-color:#dcdfe6;--el-border-color-light:#e4e7ed;--el-border-color-lighter:#ebeef5;--el-border-color-extra-light:#f2f6fc;--el-border-color-dark:#d4d7de;--el-border-color-darker:#cdd0d6;--el-fill-color:#f0f2f5;--el-fill-color-light:#f5f7fa;--el-fill-color-lighter:#fafafa;--el-fill-color-extra-light:#fafcff;--el-fill-color-dark:#ebedf0;--el-fill-color-darker:#e6e8eb;--el-fill-color-blank:#ffffff;--el-box-shadow:0px 12px 32px 4px rgba(0, 0, 0, .04),0px 8px 20px rgba(0, 0, 0, .08);--el-box-shadow-light:0px 0px 12px rgba(0, 0, 0, .12);--el-box-shadow-lighter:0px 0px 6px rgba(0, 0, 0, .12);--el-box-shadow-dark:0px 16px 48px 16px rgba(0, 0, 0, .08),0px 12px 32px rgba(0, 0, 0, .12),0px 8px 16px -8px rgba(0, 0, 0, .16);--el-disabled-bg-color:var(--el-fill-color-light);--el-disabled-text-color:var(--el-text-color-placeholder);--el-disabled-border-color:var(--el-border-color-light);--el-overlay-color:rgba(0, 0, 0, .8);--el-overlay-color-light:rgba(0, 0, 0, .7);--el-overlay-color-lighter:rgba(0, 0, 0, .5);--el-mask-color:rgba(255, 255, 255, .9);--el-mask-color-extra-light:rgba(255, 255, 255, .3);--el-border-width:1px;--el-border-style:solid;--el-border-color-hover:var(--el-text-color-disabled);--el-border:var(--el-border-width) var(--el-border-style) var(--el-border-color);--el-svg-monochrome-grey:var(--el-border-color)}.fade-in-linear-enter-active,.fade-in-linear-leave-active{transition:var(--el-transition-fade-linear)}.fade-in-linear-enter-from,.fade-in-linear-leave-to{opacity:0}.el-fade-in-linear-enter-active,.el-fade-in-linear-leave-active{transition:var(--el-transition-fade-linear)}.el-fade-in-linear-enter-from,.el-fade-in-linear-leave-to{opacity:0}.el-fade-in-enter-active,.el-fade-in-leave-active{transition:all var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}.el-fade-in-enter-from,.el-fade-in-leave-active{opacity:0}.el-zoom-in-center-enter-active,.el-zoom-in-center-leave-active{transition:all var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}.el-zoom-in-center-enter-from,.el-zoom-in-center-leave-active{opacity:0;transform:scaleX(0)}.el-zoom-in-top-enter-active,.el-zoom-in-top-leave-active{opacity:1;transform:scaleY(1);transition:var(--el-transition-md-fade);transform-origin:center top}.el-zoom-in-top-enter-active[data-popper-placement^=top],.el-zoom-in-top-leave-active[data-popper-placement^=top]{transform-origin:center bottom}.el-zoom-in-top-enter-from,.el-zoom-in-top-leave-active{opacity:0;transform:scaleY(0)}.el-zoom-in-bottom-enter-active,.el-zoom-in-bottom-leave-active{opacity:1;transform:scaleY(1);transition:var(--el-transition-md-fade);transform-origin:center bottom}.el-zoom-in-bottom-enter-from,.el-zoom-in-bottom-leave-active{opacity:0;transform:scaleY(0)}.el-zoom-in-left-enter-active,.el-zoom-in-left-leave-active{opacity:1;transform:scale(1);transition:var(--el-transition-md-fade);transform-origin:top left}.el-zoom-in-left-enter-from,.el-zoom-in-left-leave-active{opacity:0;transform:scale(.45)}.collapse-transition{transition:var(--el-transition-duration) height ease-in-out,var(--el-transition-duration) padding-top ease-in-out,var(--el-transition-duration) padding-bottom ease-in-out}.el-collapse-transition-enter-active,.el-collapse-transition-leave-active{transition:var(--el-transition-duration) max-height ease-in-out,var(--el-transition-duration) padding-top ease-in-out,var(--el-transition-duration) padding-bottom ease-in-out}.horizontal-collapse-transition{transition:var(--el-transition-duration) width ease-in-out,var(--el-transition-duration) padding-left ease-in-out,var(--el-transition-duration) padding-right ease-in-out}.el-list-enter-active,.el-list-leave-active{transition:all 1s}.el-list-enter-from,.el-list-leave-to{opacity:0;transform:translateY(-30px)}.el-list-leave-active{position:absolute!important}.el-opacity-transition{transition:opacity var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}.el-icon-loading{-webkit-animation:rotating 2s linear infinite;animation:rotating 2s linear infinite}.el-icon--right{margin-left:5px}.el-icon--left{margin-right:5px}@-webkit-keyframes rotating{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes rotating{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.el-icon{--color:inherit;height:1em;width:1em;line-height:1em;display:inline-flex;justify-content:center;align-items:center;position:relative;fill:currentColor;color:var(--color);font-size:inherit}.el-icon.is-loading{-webkit-animation:rotating 2s linear infinite;animation:rotating 2s linear infinite}.el-icon svg{height:1em;width:1em}.el-progress{position:relative;line-height:1;display:flex;align-items:center}.el-progress__text{font-size:14px;color:var(--el-text-color-regular);margin-left:5px;min-width:50px;line-height:1}.el-progress__text i{vertical-align:middle;display:block}.el-progress--circle,.el-progress--dashboard{display:inline-block}.el-progress--circle .el-progress__text,.el-progress--dashboard .el-progress__text{position:absolute;top:50%;left:0;width:100%;text-align:center;margin:0;transform:translateY(-50%)}.el-progress--circle .el-progress__text i,.el-progress--dashboard .el-progress__text i{vertical-align:middle;display:inline-block}.el-progress--without-text .el-progress__text{display:none}.el-progress--without-text .el-progress-bar{padding-right:0;margin-right:0;display:block}.el-progress--text-inside .el-progress-bar{padding-right:0;margin-right:0}.el-progress.is-success .el-progress-bar__inner{background-color:var(--el-color-success)}.el-progress.is-success .el-progress__text{color:var(--el-color-success)}.el-progress.is-warning .el-progress-bar__inner{background-color:var(--el-color-warning)}.el-progress.is-warning .el-progress__text{color:var(--el-color-warning)}.el-progress.is-exception .el-progress-bar__inner{background-color:var(--el-color-danger)}.el-progress.is-exception .el-progress__text{color:var(--el-color-danger)}.el-progress-bar{flex-grow:1;box-sizing:border-box}.el-progress-bar__outer{height:6px;border-radius:100px;background-color:var(--el-border-color-lighter);overflow:hidden;position:relative;vertical-align:middle}.el-progress-bar__inner{position:absolute;left:0;top:0;height:100%;background-color:var(--el-color-primary);text-align:right;border-radius:100px;line-height:1;white-space:nowrap;transition:width .6s ease}.el-progress-bar__inner:after{display:inline-block;content:"";height:100%;vertical-align:middle}.el-progress-bar__inner--indeterminate{transform:translateZ(0);-webkit-animation:indeterminate 3s infinite;animation:indeterminate 3s infinite}.el-progress-bar__inner--striped{background-image:linear-gradient(45deg,rgba(0,0,0,.1) 25%,transparent 25%,transparent 50%,rgba(0,0,0,.1) 50%,rgba(0,0,0,.1) 75%,transparent 75%,transparent);background-size:1.25em 1.25em}.el-progress-bar__inner--striped.el-progress-bar__inner--striped-flow{-webkit-animation:striped-flow 3s linear infinite;animation:striped-flow 3s linear infinite}.el-progress-bar__innerText{display:inline-block;vertical-align:middle;color:#fff;font-size:12px;margin:0 5px}@-webkit-keyframes progress{0%{background-position:0 0}to{background-position:32px 0}}@keyframes progress{0%{background-position:0 0}to{background-position:32px 0}}@-webkit-keyframes indeterminate{0%{left:-100%}to{left:100%}}@keyframes indeterminate{0%{left:-100%}to{left:100%}}@-webkit-keyframes striped-flow{0%{background-position:-100%}to{background-position:100%}}@keyframes striped-flow{0%{background-position:-100%}to{background-position:100%}}.modal-wrapper[data-v-0339af62]{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#00000080;display:flex;justify-content:center;align-items:center;z-index:9999}.modal[data-v-0339af62]{background-color:#fff;padding:20px;border-radius:5px}.header[data-v-0339af62]{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.header h2[data-v-0339af62]{margin:0;font-size:20px;font-weight:700}.header button[data-v-0339af62]{border:none;background-color:transparent;font-size:20px;cursor:pointer}.content[data-v-0339af62]{max-height:400px;overflow:auto;font-size:16px;display:flex;justify-content:space-between}.content .produce p[data-v-0339af62]{margin-top:15px}.content .produce .ipt[data-v-0339af62]{margin-top:15px;height:30px;border-radius:5px;padding-left:10px}.content .img[data-v-0339af62]{display:flex;align-items:center;justify-content:center}.content .img img[data-v-0339af62]{width:180px}input[data-v-0339af62]::-webkit-input-placeholder{color:#aab2bd;font-size:14px;padding-left:5px}.copy[data-v-b5a838b9]{width:160px;position:fixed;right:10px;top:80px;color:#111;z-index:999;display:flex;flex-direction:column}.copy .btnContainer[data-v-b5a838b9]{display:flex;justify-content:center;align-items:center}.copy .btnContainer .btn[data-v-b5a838b9]{width:80px;height:30px;background-color:red;color:#fff;border-radius:10%}.copy .btnContainer .btn[data-v-b5a838b9]:hover{background-color:#87ceeb;color:#fff}.copy .btnContainer .btnDown[data-v-b5a838b9]{display:flex;justify-content:center;align-items:center;width:60px;height:30px;margin-right:10px;background-color:red;color:#fff;border-radius:10%}.copy .btnContainer .btnDown[data-v-b5a838b9]:hover{background-color:#87ceeb;color:#fff}.copy .btnContainer .downList[data-v-b5a838b9]{display:flex;flex-direction:column;justify-content:center;align-items:center}.copy .btnContainer .downList .btnDown1[data-v-b5a838b9]{display:flex;justify-content:center;align-items:center;width:60px;height:30px;margin-right:10px;background-color:#87ceeb;color:#fff;border-radius:10%}.copy .btnContainer .downList .btnDown2[data-v-b5a838b9]{display:flex;justify-content:center;align-items:center;margin-top:5px;width:60px;height:30px;margin-right:10px;background-color:#00f;color:#fff;border-radius:10%}.copy .demo-progress[data-v-b5a838b9]{margin-top:5px} '); (function (vue, elementPlus) { 'use strict'; const hasOwnProperty = Object.prototype.hasOwnProperty; const hasOwn = (val, key) => hasOwnProperty.call(val, key); const isFunction = (val) => typeof val === "function"; const isString = (val) => typeof val === "string"; const isObject = (val) => val !== null && typeof val === "object"; function fromPairs(pairs) { var index = -1, length = pairs == null ? 0 : pairs.length, result = {}; while (++index < length) { var pair = pairs[index]; result[pair[0]] = pair[1]; } return result; } const isUndefined = (val) => val === void 0; const isNumber = (val) => typeof val === "number"; const isStringNumber = (val) => { if (!isString(val)) { return false; } return !Number.isNaN(Number(val)); }; function addUnit(value, defaultUnit = "px") { if (!value) return ""; if (isNumber(value) || isStringNumber(value)) { return `${value}${defaultUnit}`; } else if (isString(value)) { return value; } } /*! Element Plus Icons Vue v2.3.1 */ var check_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({ name: "Check", __name: "check", setup(__props) { return (_ctx, _cache) => (vue.openBlock(), vue.createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ vue.createElementVNode("path", { fill: "currentColor", d: "M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z" }) ])); } }); var check_default = check_vue_vue_type_script_setup_true_lang_default; var circle_check_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({ name: "CircleCheck", __name: "circle-check", setup(__props) { return (_ctx, _cache) => (vue.openBlock(), vue.createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ vue.createElementVNode("path", { fill: "currentColor", d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896" }), vue.createElementVNode("path", { fill: "currentColor", d: "M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z" }) ])); } }); var circle_check_default = circle_check_vue_vue_type_script_setup_true_lang_default; var circle_close_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({ name: "CircleClose", __name: "circle-close", setup(__props) { return (_ctx, _cache) => (vue.openBlock(), vue.createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ vue.createElementVNode("path", { fill: "currentColor", d: "m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z" }), vue.createElementVNode("path", { fill: "currentColor", d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896" }) ])); } }); var circle_close_default = circle_close_vue_vue_type_script_setup_true_lang_default; var close_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({ name: "Close", __name: "close", setup(__props) { return (_ctx, _cache) => (vue.openBlock(), vue.createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ vue.createElementVNode("path", { fill: "currentColor", d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z" }) ])); } }); var close_default = close_vue_vue_type_script_setup_true_lang_default; var warning_filled_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({ name: "WarningFilled", __name: "warning-filled", setup(__props) { return (_ctx, _cache) => (vue.openBlock(), vue.createElementBlock("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ vue.createElementVNode("path", { fill: "currentColor", d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4" }) ])); } }); var warning_filled_default = warning_filled_vue_vue_type_script_setup_true_lang_default; const epPropKey = "__epPropKey"; const definePropType = (val) => val; const isEpProp = (val) => isObject(val) && !!val[epPropKey]; const buildProp = (prop, key) => { if (!isObject(prop) || isEpProp(prop)) return prop; const { values, required, default: defaultValue, type, validator } = prop; const _validator = values || validator ? (val) => { let valid = false; let allowedValues = []; if (values) { allowedValues = Array.from(values); if (hasOwn(prop, "default")) { allowedValues.push(defaultValue); } valid || (valid = allowedValues.includes(val)); } if (validator) valid || (valid = validator(val)); if (!valid && allowedValues.length > 0) { const allowValuesText = [...new Set(allowedValues)].map((value) => JSON.stringify(value)).join(", "); vue.warn(`Invalid prop: validation failed${key ? ` for prop "${key}"` : ""}. Expected one of [${allowValuesText}], got value ${JSON.stringify(val)}.`); } return valid; } : void 0; const epProp = { type, required: !!required, validator: _validator, [epPropKey]: true }; if (hasOwn(prop, "default")) epProp.default = defaultValue; return epProp; }; const buildProps = (props) => fromPairs(Object.entries(props).map(([key, option]) => [ key, buildProp(option, key) ])); const withInstall = (main, extra) => { main.install = (app) => { for (const comp of [main, ...Object.values(extra != null ? extra : {})]) { app.component(comp.name, comp); } }; if (extra) { for (const [key, comp] of Object.entries(extra)) { main[key] = comp; } } return main; }; const defaultNamespace = "el"; const statePrefix = "is-"; const _bem = (namespace, block, blockSuffix, element, modifier) => { let cls = `${namespace}-${block}`; if (blockSuffix) { cls += `-${blockSuffix}`; } if (element) { cls += `__${element}`; } if (modifier) { cls += `--${modifier}`; } return cls; }; const namespaceContextKey = Symbol("namespaceContextKey"); const useGetDerivedNamespace = (namespaceOverrides) => { const derivedNamespace = namespaceOverrides || (vue.getCurrentInstance() ? vue.inject(namespaceContextKey, vue.ref(defaultNamespace)) : vue.ref(defaultNamespace)); const namespace = vue.computed(() => { return vue.unref(derivedNamespace) || defaultNamespace; }); return namespace; }; const useNamespace = (block, namespaceOverrides) => { const namespace = useGetDerivedNamespace(namespaceOverrides); const b = (blockSuffix = "") => _bem(namespace.value, block, blockSuffix, "", ""); const e = (element) => element ? _bem(namespace.value, block, "", element, "") : ""; const m = (modifier) => modifier ? _bem(namespace.value, block, "", "", modifier) : ""; const be = (blockSuffix, element) => blockSuffix && element ? _bem(namespace.value, block, blockSuffix, element, "") : ""; const em = (element, modifier) => element && modifier ? _bem(namespace.value, block, "", element, modifier) : ""; const bm = (blockSuffix, modifier) => blockSuffix && modifier ? _bem(namespace.value, block, blockSuffix, "", modifier) : ""; const bem = (blockSuffix, element, modifier) => blockSuffix && element && modifier ? _bem(namespace.value, block, blockSuffix, element, modifier) : ""; const is = (name, ...args) => { const state = args.length >= 1 ? args[0] : true; return name && state ? `${statePrefix}${name}` : ""; }; const cssVar = (object) => { const styles = {}; for (const key in object) { if (object[key]) { styles[`--${namespace.value}-${key}`] = object[key]; } } return styles; }; const cssVarBlock = (object) => { const styles = {}; for (const key in object) { if (object[key]) { styles[`--${namespace.value}-${block}-${key}`] = object[key]; } } return styles; }; const cssVarName = (name) => `--${namespace.value}-${name}`; const cssVarBlockName = (name) => `--${namespace.value}-${block}-${name}`; return { namespace, b, e, m, be, em, bm, bem, is, cssVar, cssVarName, cssVarBlock, cssVarBlockName }; }; var _export_sfc$1 = (sfc, props) => { const target = sfc.__vccOpts || sfc; for (const [key, val] of props) { target[key] = val; } return target; }; const iconProps = buildProps({ size: { type: definePropType([Number, String]) }, color: { type: String } }); const __default__$1 = vue.defineComponent({ name: "ElIcon", inheritAttrs: false }); const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({ ...__default__$1, props: iconProps, setup(__props) { const props = __props; const ns = useNamespace("icon"); const style2 = vue.computed(() => { const { size, color } = props; if (!size && !color) return {}; return { fontSize: isUndefined(size) ? void 0 : addUnit(size), "--color": color }; }); return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("i", vue.mergeProps({ class: vue.unref(ns).b(), style: vue.unref(style2) }, _ctx.$attrs), [ vue.renderSlot(_ctx.$slots, "default") ], 16); }; } }); var Icon = /* @__PURE__ */ _export_sfc$1(_sfc_main$3, [["__file", "icon.vue"]]); const ElIcon = withInstall(Icon); const progressProps = buildProps({ type: { type: String, default: "line", values: ["line", "circle", "dashboard"] }, percentage: { type: Number, default: 0, validator: (val) => val >= 0 && val <= 100 }, status: { type: String, default: "", values: ["", "success", "exception", "warning"] }, indeterminate: { type: Boolean, default: false }, duration: { type: Number, default: 3 }, strokeWidth: { type: Number, default: 6 }, strokeLinecap: { type: definePropType(String), default: "round" }, textInside: { type: Boolean, default: false }, width: { type: Number, default: 126 }, showText: { type: Boolean, default: true }, color: { type: definePropType([ String, Array, Function ]), default: "" }, striped: Boolean, stripedFlow: Boolean, format: { type: definePropType(Function), default: (percentage) => `${percentage}%` } }); const _hoisted_1$2 = ["aria-valuenow"]; const _hoisted_2$2 = { viewBox: "0 0 100 100" }; const _hoisted_3$2 = ["d", "stroke", "stroke-linecap", "stroke-width"]; const _hoisted_4$2 = ["d", "stroke", "opacity", "stroke-linecap", "stroke-width"]; const _hoisted_5$2 = { key: 0 }; const __default__ = vue.defineComponent({ name: "ElProgress" }); const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({ ...__default__, props: progressProps, setup(__props) { const props = __props; const STATUS_COLOR_MAP = { success: "#13ce66", exception: "#ff4949", warning: "#e6a23c", default: "#20a0ff" }; const ns = useNamespace("progress"); const barStyle = vue.computed(() => ({ width: `${props.percentage}%`, animationDuration: `${props.duration}s`, backgroundColor: getCurrentColor(props.percentage) })); const relativeStrokeWidth = vue.computed(() => (props.strokeWidth / props.width * 100).toFixed(1)); const radius = vue.computed(() => { if (["circle", "dashboard"].includes(props.type)) { return Number.parseInt(`${50 - Number.parseFloat(relativeStrokeWidth.value) / 2}`, 10); } return 0; }); const trackPath = vue.computed(() => { const r = radius.value; const isDashboard = props.type === "dashboard"; return ` M 50 50 m 0 ${isDashboard ? "" : "-"}${r} a ${r} ${r} 0 1 1 0 ${isDashboard ? "-" : ""}${r * 2} a ${r} ${r} 0 1 1 0 ${isDashboard ? "" : "-"}${r * 2} `; }); const perimeter = vue.computed(() => 2 * Math.PI * radius.value); const rate = vue.computed(() => props.type === "dashboard" ? 0.75 : 1); const strokeDashoffset = vue.computed(() => { const offset = -1 * perimeter.value * (1 - rate.value) / 2; return `${offset}px`; }); const trailPathStyle = vue.computed(() => ({ strokeDasharray: `${perimeter.value * rate.value}px, ${perimeter.value}px`, strokeDashoffset: strokeDashoffset.value })); const circlePathStyle = vue.computed(() => ({ strokeDasharray: `${perimeter.value * rate.value * (props.percentage / 100)}px, ${perimeter.value}px`, strokeDashoffset: strokeDashoffset.value, transition: "stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s" })); const stroke = vue.computed(() => { let ret; if (props.color) { ret = getCurrentColor(props.percentage); } else { ret = STATUS_COLOR_MAP[props.status] || STATUS_COLOR_MAP.default; } return ret; }); const statusIcon = vue.computed(() => { if (props.status === "warning") { return warning_filled_default; } if (props.type === "line") { return props.status === "success" ? circle_check_default : circle_close_default; } else { return props.status === "success" ? check_default : close_default; } }); const progressTextSize = vue.computed(() => { return props.type === "line" ? 12 + props.strokeWidth * 0.4 : props.width * 0.111111 + 2; }); const content = vue.computed(() => props.format(props.percentage)); function getColors(color) { const span = 100 / color.length; const seriesColors = color.map((seriesColor, index) => { if (isString(seriesColor)) { return { color: seriesColor, percentage: (index + 1) * span }; } return seriesColor; }); return seriesColors.sort((a, b) => a.percentage - b.percentage); } const getCurrentColor = (percentage) => { var _a; const { color } = props; if (isFunction(color)) { return color(percentage); } else if (isString(color)) { return color; } else { const colors = getColors(color); for (const color2 of colors) { if (color2.percentage > percentage) return color2.color; } return (_a = colors[colors.length - 1]) == null ? void 0 : _a.color; } }; return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("div", { class: vue.normalizeClass([ vue.unref(ns).b(), vue.unref(ns).m(_ctx.type), vue.unref(ns).is(_ctx.status), { [vue.unref(ns).m("without-text")]: !_ctx.showText, [vue.unref(ns).m("text-inside")]: _ctx.textInside } ]), role: "progressbar", "aria-valuenow": _ctx.percentage, "aria-valuemin": "0", "aria-valuemax": "100" }, [ _ctx.type === "line" ? (vue.openBlock(), vue.createElementBlock("div", { key: 0, class: vue.normalizeClass(vue.unref(ns).b("bar")) }, [ vue.createElementVNode("div", { class: vue.normalizeClass(vue.unref(ns).be("bar", "outer")), style: vue.normalizeStyle({ height: `${_ctx.strokeWidth}px` }) }, [ vue.createElementVNode("div", { class: vue.normalizeClass([ vue.unref(ns).be("bar", "inner"), { [vue.unref(ns).bem("bar", "inner", "indeterminate")]: _ctx.indeterminate }, { [vue.unref(ns).bem("bar", "inner", "striped")]: _ctx.striped }, { [vue.unref(ns).bem("bar", "inner", "striped-flow")]: _ctx.stripedFlow } ]), style: vue.normalizeStyle(vue.unref(barStyle)) }, [ (_ctx.showText || _ctx.$slots.default) && _ctx.textInside ? (vue.openBlock(), vue.createElementBlock("div", { key: 0, class: vue.normalizeClass(vue.unref(ns).be("bar", "innerText")) }, [ vue.renderSlot(_ctx.$slots, "default", { percentage: _ctx.percentage }, () => [ vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(content)), 1) ]) ], 2)) : vue.createCommentVNode("v-if", true) ], 6) ], 6) ], 2)) : (vue.openBlock(), vue.createElementBlock("div", { key: 1, class: vue.normalizeClass(vue.unref(ns).b("circle")), style: vue.normalizeStyle({ height: `${_ctx.width}px`, width: `${_ctx.width}px` }) }, [ (vue.openBlock(), vue.createElementBlock("svg", _hoisted_2$2, [ vue.createElementVNode("path", { class: vue.normalizeClass(vue.unref(ns).be("circle", "track")), d: vue.unref(trackPath), stroke: `var(${vue.unref(ns).cssVarName("fill-color-light")}, #e5e9f2)`, "stroke-linecap": _ctx.strokeLinecap, "stroke-width": vue.unref(relativeStrokeWidth), fill: "none", style: vue.normalizeStyle(vue.unref(trailPathStyle)) }, null, 14, _hoisted_3$2), vue.createElementVNode("path", { class: vue.normalizeClass(vue.unref(ns).be("circle", "path")), d: vue.unref(trackPath), stroke: vue.unref(stroke), fill: "none", opacity: _ctx.percentage ? 1 : 0, "stroke-linecap": _ctx.strokeLinecap, "stroke-width": vue.unref(relativeStrokeWidth), style: vue.normalizeStyle(vue.unref(circlePathStyle)) }, null, 14, _hoisted_4$2) ])) ], 6)), (_ctx.showText || _ctx.$slots.default) && !_ctx.textInside ? (vue.openBlock(), vue.createElementBlock("div", { key: 2, class: vue.normalizeClass(vue.unref(ns).e("text")), style: vue.normalizeStyle({ fontSize: `${vue.unref(progressTextSize)}px` }) }, [ vue.renderSlot(_ctx.$slots, "default", { percentage: _ctx.percentage }, () => [ !_ctx.status ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$2, vue.toDisplayString(vue.unref(content)), 1)) : (vue.openBlock(), vue.createBlock(vue.unref(ElIcon), { key: 1 }, { default: vue.withCtx(() => [ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(statusIcon)))) ]), _: 1 })) ]) ], 6)) : vue.createCommentVNode("v-if", true) ], 10, _hoisted_1$2); }; } }); var Progress = /* @__PURE__ */ _export_sfc$1(_sfc_main$2, [["__file", "progress.vue"]]); const ElProgress = withInstall(Progress); 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$1 = (n) => (vue.pushScopeId("data-v-0339af62"), n = n(), vue.popScopeId(), n); const _hoisted_1$1 = { class: "modal" }; const _hoisted_2$1 = { class: "header" }; const _hoisted_3$1 = { class: "content" }; const _hoisted_4$1 = { class: "produce" }; const _hoisted_5$1 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ vue.createElementVNode("p", null, "1、扫描右侧公众号,点击关注!", -1)); const _hoisted_6 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ vue.createElementVNode("p", null, "2、在软件爬取者后台回复:验证码", -1)); const _hoisted_7 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ vue.createElementVNode("p", null, "3、在下方输入框输入获取的验证码后回车", -1)); const _hoisted_8 = /* @__PURE__ */ _withScopeId$1(() => /* @__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 || String } }, 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$1, [ vue.createElementVNode("h2", null, vue.toDisplayString(__props.title), 1), vue.createElementVNode("button", { onClick: closeModal }, "X") ]), vue.createElementVNode("div", _hoisted_3$1, [ vue.createElementVNode("div", _hoisted_4$1, [ _hoisted_5$1, _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-0339af62"]]); 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) { resolve(JSON.parse(res.response).data[0].code); } }); }); }; const getAid = (url) => { return new Promise((resolve, reject) => { _GM_xmlhttpRequest({ method: "GET", url, headers: { "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) { resolve(JSON.parse(res.response)); } }); }); }; let headers = { "authority": "www.xiazaitool.com", "accept": "application/json, text/javascript, */*; q=0.01", "accept-language": "zh-CN,zh;q=0.9", "content-type": "application/json", "origin": "https://xiazaitool.com", "sec-ch-ua": '"Not.A/Brand";v="8", "Chromium";v="114", "Google Chrome";v="114"', "sec-ch-ua-mobile": "?0", "sec-ch-ua-platform": '"Windows"', "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "same-site", "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" }; const getDownUrl = (baseUrl, url) => { return new Promise((resolve, reject) => { _GM_xmlhttpRequest({ method: "POSt", url: baseUrl, headers, data: JSON.stringify({ "platform": "bilibili", "url": url }), onload: function(res) { resolve(JSON.parse(res.response)); }, fetch: true }); }); }; const _withScopeId = (n) => (vue.pushScopeId("data-v-b5a838b9"), n = n(), vue.popScopeId(), n); const _hoisted_1 = { class: "copy" }; const _hoisted_2 = { class: "btnContainer" }; const _hoisted_3 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("br", null, null, -1)); const _hoisted_4 = { class: "downList" }; const _hoisted_5 = { class: "demo-progress" }; const _sfc_main = { __name: "App", setup(__props) { window.onload = function() { var video = document.getElementsByTagName("video")[0]; const timeId = setInterval(() => { if (video.readyState == 4) { btnRef.value.click(); clearInterval(timeId); } }, 500); }; const title = vue.ref("为了减少端口压力,防止滥用,采取必要的验证手段。"); const code = vue.ref(); const optimize = () => { return new Promise((resolve, reject) => { if (document.getElementsByClassName("bpx-player-ctrl-quality-menu-item").length > 0) { var articulation = document.getElementsByClassName("bpx-player-ctrl-quality-menu-item"); document.getElementsByClassName("close-btn")[0].click(); var ad = document.querySelector(".right-container-inner").children[6]; ad.remove(); if (document.getElementById("activity_vote") !== null) { document.getElementById("activity_vote").style.display = "none"; } var arr = []; if (articulation.length > 0) { for (var i = 0; i < articulation.length; i++) { if (articulation[i].children.length == 1) { arr.push(articulation[i]); } } resolve(arr[0]); } else { resolve(0); } } else { let url = window.location.href; window.location.replace(url); } }); }; const locaCode = vue.ref(); locaCode.value = localStorage.getItem("code"); const model = vue.ref(""); const btnRef = vue.ref(""); const onProcess = async () => { code.value = await getCode(); locaCode.value = localStorage.getItem("code"); if (locaCode.value == code.value) { var btn = await optimize(); if (btn == 0) return window.location.reload(true); btn.click(); } else { model.value.openModal(); } }; const downListShow = vue.ref(false); const onDown = async (e) => { code.value = await getCode(); locaCode.value = localStorage.getItem("code"); let title2 = document.querySelector(".video-title").innerText; let url = window.location.href; downListShow.value = false; if (locaCode.value == code.value) { if (e === "普通") { let bvid = url.split("?")[0].split("/")[4]; let baseUrl = "https://bili.zhouql.vip/meta/" + bvid; let response = await getAid(baseUrl); let aid = response.data.aid; let cid = response.data.cid; let aidUrl = "https://bili.zhouql.vip/download/" + aid + "/" + cid; let urlRes = await getAid(aidUrl); let realUrl = urlRes.data.durl[0].url; download(realUrl, title2 + ".mp4"); } if (e === "高清") { let baseUrl = "https://www.xiazaitool.com/video/parseVideoUrl"; let result = await getDownUrl(baseUrl, url); let realUrl = result.voideDeatilVoList[0].url; download(realUrl, title2 + ".mp4"); } } else { model.value.openModal(); } }; const flag = vue.ref(false); const percentage = vue.ref(0); const download = (url, name) => { _GM_download({ url, name, saveAs: true, onprogress: function() { flag.value = true; if (percentage.value < 99) { percentage.value++; } }, onload: function() { percentage.value = 100; flag.value = false; percentage.value = 0; }, onerror: function() { elementPlus.ElMessage.warning("下载出错,请重试!"); } }); }; return (_ctx, _cache) => { const _component_el_progress = ElProgress; return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [ vue.createElementVNode("div", _hoisted_2, [ vue.withDirectives(vue.createElementVNode("button", { onClick: onProcess, class: "btn", ref_key: "btnRef", ref: btnRef }, [ vue.createTextVNode(" 界面 "), _hoisted_3, vue.createTextVNode(" 优化 ") ], 512), [ [vue.vShow, !locaCode.value] ]), vue.createElementVNode("button", { onClick: _cache[0] || (_cache[0] = ($event) => downListShow.value = !downListShow.value), class: "btnDown", ref: "btnDownRef" }, "下载", 512), vue.withDirectives(vue.createElementVNode("div", _hoisted_4, [ vue.createElementVNode("button", { onClick: _cache[1] || (_cache[1] = ($event) => onDown("普通")), class: "btnDown1" }, "普通"), vue.createElementVNode("button", { onClick: _cache[2] || (_cache[2] = ($event) => onDown("高清")), class: "btnDown2" }, "高清") ], 512), [ [vue.vShow, downListShow.value] ]) ]), vue.withDirectives(vue.createElementVNode("div", _hoisted_5, [ vue.createVNode(_component_el_progress, { "text-inside": true, "stroke-width": 26, percentage: percentage.value }, null, 8, ["percentage"]) ], 512), [ [vue.vShow, flag.value] ]), vue.createVNode(Model, { title: title.value, code: code.value, ref_key: "model", ref: model }, null, 8, ["title", "code"]) ]); }; } }; const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b5a838b9"]]); 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);